/srv/irclogs.ubuntu.com/2014/02/06/#bzr.txt

=== ggherdov_ is now known as ggherdov
=== zyga_ is now known as zga
=== zga is now known as zyga
=== marcoceppi_ is now known as marcoceppi
LeoNerdwould an argument called  bzr update --fail-if-diverged  really be so much to ask for?18:21
LeoNerdI keep getting upset that 'bzr up' causes pending merges on divergant history. I _never_ want merges. If the history has diverged I want to rebase it because that implies I Have Messed Up18:21
mgzwhy not just use pull then?18:22
LeoNerdBecause in 99.999% of cases 'up' is what I want18:22
LeoNerdIt's only that one-time-in-almost-never case that they have divergant history in the first place18:23
=== vila_ is now known as vila
=== wedgwood is now known as Guest7585
achianghello, what is the incantation to make bzr to branch from LP, but use as many bits from my local repo as possible?23:16
achiangi am finding the help for `bzr branch` to be slightly hard to comprehend23:16
achianguse case is: large branch in LP, slow network, want to grab something that hasn't been merged yet, and i have a local copy of trunk23:17
fullermdThere is no invocation, that's just how it works.23:17
fullermdAssuming you _have_ a local repo, anyway.23:17
achiangfullermd: hm, i should explain more... i do a bzr branch lp:~colleague/project/branch and it is grabbing a lot of data over the network23:19
achiangbut i also have a ./trunk/ locally on my disk23:19
achiangi'm not sure how to grab ~colleague/project/branch without downloading everything...23:19
achiangfullermd: should i just `bzr branch ./trunk foo` and then inside foo/ do `bzr pull lp:~colleague/project/branch` ?23:28
fullermdWell, that would be one way.  But a better way would just be to make a repo.23:35
achiangi'm reading through http://wiki.bazaar.canonical.com/SharedRepositoryTutorial and i don't get how to combine a local repo with remote branches23:40
mgrandiif you just create a shared repository23:41
mgrandievery branch inside that shared repo will share the commit data23:41
fullermdThere's no real "combining".  A repo is a purely local construct, all your interaction with remotes remains at the branch level.23:41
fullermdSo you'd just have both trunk and foo inside a repo locally.23:41
mgrandiso if you have two branches that have diverged, say, 12 commits, but the first 10 are the same, then it will store 14 commits, and share the first 10, while storing the unique 4 when they diverged23:41
achiangso create a local repo, then bzr branch "remote" and the branch command will try to use as many objects from the local repo as possible, and download the rest from the remote?23:42
mgrandii assume so23:42
fullermdWell, you'd need the step of "change local trunk so it uses the repo" to get the objects into it.23:42
fullermdBut that aside, yes.23:43
mgrandiwouldn't just branching into the shared repoistory do that?23:43
fullermdI'd presume he'd just make the repo around the current location.23:43
mgrandiah23:43
mgrandiyou would have to repack it23:43
fullermdWouldn't do anything.23:43
fullermdYou'd need reconfigure --use-shared (I think that's what it's called; xref docs)23:43
mgrandidoesn't it figure out that there is now a shared repo and put the pack in the shared repo rather then the local branch .bzr file?23:44
fullermdNo, it's perfectly reasonable to have a standalone branch located inside but not using a shared repo.23:44
mgrandiinteresting23:44
* achiang studies http://stackoverflow.com/questions/6500282/can-i-take-a-bazaar-branch-and-make-it-my-main-shared-repository23:45
fullermdIt's not majorly different from having one branch stuck inside another, after all.23:45
mgrandifor that stack overflow post, to create a new shared repo with 'only' the objects that the branches you want inside it are using23:46
mgrandijust create a shared repo, then branch the ..branches into it and it will get the stuff it needs23:46
mgrandidon't bother with copying the .bzr directory as bazaar does the work for you!23:46
* achiang thinks the 2nd answer looks interesting23:47
achiangthe one calling bzr reconfigure23:47
mgrandii think thats too much work23:47
mgrandisay you have branchA and branchB, you want to put inside a shared repo23:48
mgrandicd shared_repo23:48
fullermdbranching the branches in would require resetting all the per-branch config (like parent locations).23:48
fullermdIT's easier to just do it in place.23:48
mgrandibzr init-repo --no-trees.23:48
mgrandi(space before the dot)23:48
mgrandithen just bzr branch branchA and bzr branch branchB23:48
mgrandiit will branch the old branches that you want to convert, make them used the shared repo automatically and only copy the objects it needs23:49
fullermdMuch simpler to start from ~/work/whatever/trunk and just do bzr init-repo ~/work/whatever ; bzr reconfig --use-shared ~/work/whatever/trunk23:49
mgrandior that23:50
mgrandidepends on how the folder structure is set up, and you arn't creating a repo in some random directory with other stuff in it23:50
fullermdWell, you can just mv the branch wholesale to some new place if things are too cluttered already.23:51
achiangfullermd: thanks, i just did that: cd trunk ; bzr init-repo ../ ; bzr reconfigure --use-shared23:51
fullermdBut that's independent of the repo step, and you should do that anyway   ;)23:51
achiangthen i did cd .. ; bzr branch lp:~colleague/project/branch and it was super-fast23:51
achiangso thanks!23:51
fullermdEggselent.23:51
mgrandithis reminds me when i was trying to figure out how best to 'archive' a bzr repo, as someone told me the .bzr folder might not be the best thing to transfer across filesystems and whatnot23:52
mgrandithe solution i found on SO was to create a new repo and then do a email merge request for the entire branch and have that saved as a file, seems a bit hackish but it works23:53
jelmermgrandi: what would be wrong with the .bzr directory?23:54
jelmerthe only thing I can think of is that if your backup actually does go bad that it's easier to recover from an email merge request by hand23:54
mgrandii dunno, someone mentioned that it 'could' be not the most portable thing if you are creating a branch on windows, copy to linux or mac or whatever23:55
fullermdGrabbing a .bzr of just a branch might miss all the repo stuff if it's using one, grabbing the .bzr of a repo won't get any of the branches in it...23:55
mgrandion the website, it says the best 'backup' of a bzr repo is to use bzr itself, but that doesn't really lend itself to like, saving it as an archive or something23:55
jelmermgrandi: what fullermd says, you have to make sure you backup all the relevant .bzr directories23:56
jelmermgrandi: but there are no portability issues23:56
mgrandionly one i can think of is if there is any OS specific stuff to a checkout, like symlinks maybe?23:56
fullermdThe simplest way to back up a _repo_ would be to just tar the whole thing up.  For a _branch_, just 'branch' it somewhere temporary and tar that up.23:57
jelmermgrandi: there are no symlinks under .bzr/23:57
mgrandiyeah, but the checkout of the branch could have them or something23:58
mgrandibut you are probably right that the .bzr format is fine to just tar up and save somewhere23:58
jelmermgrandi: you're not including those, that's why you're backing up just .bzr/23:58
mgrandiah23:59
mgrandihttp://stackoverflow.com/questions/1976857/bzr-create-tgz-file-containing-full-repository is what i was referring to23:59
fullermdThe alternate answer is "use git-bzr or something to turn it into a git repo, then create a new email account, use git-send-email to dump an endless stream of patches into it, then just carry the mbox around"  ;)23:59

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