/srv/irclogs.ubuntu.com/2014/01/16/#bzr.txt

=== jelmer_ is now known as jelmer
=== _thumper_ is now known as thumper
=== SamB_ is now known as SamB
=== Logan__ is now known as Logan_
=== jam1 is now known as jam
rindolfHi all. How can I remove old and no-longer-needed data from .bzr? Something like "git clean -dxf" or "svn cleanup".11:53
zygarindolf: what do you mean?11:54
zygarindolf: ignored files that you don't add to the repository?11:54
zygarindolf: bzr clean-tree --help; maybe?11:54
rindolfzyga: no, the junk/cruft inside the ".bzr"/dot-bzr.11:54
zygaah11:54
zygabzr pack --clean-obsolete-packs ; should do it11:54
rindolfThanks!11:56
rindolfzyga: thanks, let me try.11:56
rindolfzyga: OK, I did it and it was time consuming and .bzr is still 296M whereas the working copy directories are 150M.12:02
zygarindolf: well, bzr keeps all history so it's well expected that the history folder (.bzr) is larger than the working copy12:03
rindolfzyga: but that's not the case for it in .git.12:03
zygarindolf: there is no other cruft to remove I'm afraid, bzr keeps the history and a few indices to find the data12:03
zygarindolf: it is12:03
zygarindolf: git keeps the history just as bzr12:03
rindolfzyga: at least not usually.12:03
zygarindolf: I don't believe you are correct, unless you do "shallow" clones that ignore all the history apart from the few most recent changes12:04
zygarindolf: bzr can do that too12:04
zygarindolf: you can create a lightweight checkout of an existing branch that will *not* keep the history locally12:04
zygarindolf: depending on how you work that might be useful to you12:04
rindolfzyga: OK.12:05
LeoNerdSince the current state is inferred from the history that got us here, information theory states that the history is necessarily at least as large as the state itself12:06
zygarindolf: you can do a lightweight checkout with bzr checkout --lightweight URL12:06
* zyga thinks that sliding history window would be a nice backup feature if bzr scaled well for large binary files12:07
rindolfLeoNerd: I think git compresses the history though.12:07
zygaanyway, back to work12:07
zygarindolf: bzr does as well12:07
zygarindolf: you might be using an older format that has less efficient compression, you can run bzr upgrade --2a; to get the latest format; then re-do the pack command as above12:08
zygarindolf: if you had started with an older repository format this will usually save some space12:08
rindolfzyga: thanks.12:09
rindolfzyga: «The branch format Meta directory format 1 is already at the most recent format.»12:09
zygarindolf: then that's the best bzr can do for you now12:10
rindolfzyga: OK, thanks.12:12
=== mbarnett` is now known as mbarnett
fullermdgit gc does gc unref'd revs, which bzr pack doesn't.  Usually not a huge difference, but special cases can make it bigger.15:25
fullermd('course, git clean _is_ straight analogous to bzr clean-tree; it's a WT operation, not a history one)15:26
zygafullermd: is there are way to 'git gc' in bzr from the command line?15:31
fullermdThe part that does repacking/recompressing/whatnot, sure, that's what bzr pack does.  The part that gc's stuff, no.15:33
achianghello, i have 2 separate trees: call them 'code' and 'tests'. i'd like to merge tests => code and have both code and tests in a single branch21:53
achiangis there a way to do this while preserving the history of 'tests'21:53
achiangis it as simple as a bzr merge?21:53
achianghm, no.21:55
achiangmaybe it's bzr join ?21:55
achianghttp://stackoverflow.com/questions/9849466/how-to-combine-repositories-into-a-single-one-in-bazaar21:57
jelmerachiang: yep, bzr join sounds like what you are looking for21:57
achiangi can't figure out the join syntax though, even after looking at the help21:57
achianghttps://answers.launchpad.net/bzr/+question/7156322:00
achiangif i have modern bzr (post 12.04), do i need to do anything specific to get rich-root?22:01
achianguh, i have branch format 7, whatever that means22:03
achiangoh, ok. and repository format 2a22:04
achianghopefully that's good enough to try join22:04
achiangjelmer: any clues?22:06
fullermdPlenty.  Rich root worries are mostly a pre-2.0 thing.  To use join you'd just stick one branch under another and then run the command on it.22:07
fullermdAnd then commit it, of course.  Join is really just a bit of sugar around merge.22:07
jelmerwhat fullermd says :)22:08
achianghm. ok22:08
fullermdWell, in that case, fullermd also gets a 20 foot high pile of gold coins delivered to his front door today   ;p22:09
achiangconfused... :-/ http://pastebin.ubuntu.com/6764485/22:11
achiangfullermd: any ideas what i did wrong above?22:14
SamBzyga: often, git *does* manage to scrunch histories up enough to take less space than the working tree.  (This is obviously easier on projects with shorter histories.)22:15
fullermdDo those branches have any shared history?22:16
achiangfullermd: they really shouldn't22:16
achiangfullermd: no, they do not have any shared history22:16
fullermdWell, that says they have the same root id.  Which I guess without shared history means they're old enough to have come from pre-rich-root branches, which all have the same root.22:17
fullermdSo I guess your best bet is to just use merge, then mv all the files into a subdir.22:17
achiangi tried that and got a different error22:18
fullermdAt one time there was a plugin called merge-into or something that would automate it, but I think it was abandoned when join came around, so I doubt it still works.22:18
fullermdIWBNI merge had an arg that could do that...   I think a unicorn is scheduled to deliver it next week.22:19
achiangoh wait22:19
achiangi screwed up my cp -a before22:19
achianglet me try again with fresh branches22:19
achiangi bet it will work22:19
fullermdYou can just use 'branch' instead of cp to do it.22:19
fullermde.g., (cd trunk ; bzr branch ../tests)22:19
achiangok, will try that22:23
achiangfullermd: ok, it works much better when you do not overwrite .bzr/ in the containing tree ;)22:30
fullermdOh, yes, that might have bad side effects.22:30
achiangthanks22:32
zygaSamB: this is true of bzr as well, both use compression22:39
achiangi have a local branch that takes a long time to pull. i'd like to update this branch with the contents of another test branch that's been pushed up to LP (but not merged into trunk yet).22:50
achiangis there a way to do so without introducing an actual merge in my local branch?22:50
achiangmaybe it's bzr merge --pull22:52
achiangyay, that did it22:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!