=== ggherdov_ is now known as ggherdov === zyga_ is now known as zga === zga is now known as zyga === marcoceppi_ is now known as marcoceppi [18:21] would an argument called bzr update --fail-if-diverged really be so much to ask for? [18:21] I 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 Up [18:22] why not just use pull then? [18:22] Because in 99.999% of cases 'up' is what I want [18:23] It's only that one-time-in-almost-never case that they have divergant history in the first place === vila_ is now known as vila === wedgwood is now known as Guest7585 [23:16] hello, what is the incantation to make bzr to branch from LP, but use as many bits from my local repo as possible? [23:16] i am finding the help for `bzr branch` to be slightly hard to comprehend [23:17] use 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 trunk [23:17] There is no invocation, that's just how it works. [23:17] Assuming you _have_ a local repo, anyway. [23:19] fullermd: hm, i should explain more... i do a bzr branch lp:~colleague/project/branch and it is grabbing a lot of data over the network [23:19] but i also have a ./trunk/ locally on my disk [23:19] i'm not sure how to grab ~colleague/project/branch without downloading everything... [23:28] fullermd: should i just `bzr branch ./trunk foo` and then inside foo/ do `bzr pull lp:~colleague/project/branch` ? [23:35] Well, that would be one way. But a better way would just be to make a repo. [23:40] i'm reading through http://wiki.bazaar.canonical.com/SharedRepositoryTutorial and i don't get how to combine a local repo with remote branches [23:41] if you just create a shared repository [23:41] every branch inside that shared repo will share the commit data [23:41] There's no real "combining". A repo is a purely local construct, all your interaction with remotes remains at the branch level. [23:41] So you'd just have both trunk and foo inside a repo locally. [23:41] so 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 diverged [23:42] so 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] i assume so [23:42] Well, you'd need the step of "change local trunk so it uses the repo" to get the objects into it. [23:43] But that aside, yes. [23:43] wouldn't just branching into the shared repoistory do that? [23:43] I'd presume he'd just make the repo around the current location. [23:43] ah [23:43] you would have to repack it [23:43] Wouldn't do anything. [23:43] You'd need reconfigure --use-shared (I think that's what it's called; xref docs) [23:44] doesn'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] No, it's perfectly reasonable to have a standalone branch located inside but not using a shared repo. [23:44] interesting [23:45] * achiang studies http://stackoverflow.com/questions/6500282/can-i-take-a-bazaar-branch-and-make-it-my-main-shared-repository [23:45] It's not majorly different from having one branch stuck inside another, after all. [23:46] for that stack overflow post, to create a new shared repo with 'only' the objects that the branches you want inside it are using [23:46] just create a shared repo, then branch the ..branches into it and it will get the stuff it needs [23:46] don't bother with copying the .bzr directory as bazaar does the work for you! [23:47] * achiang thinks the 2nd answer looks interesting [23:47] the one calling bzr reconfigure [23:47] i think thats too much work [23:48] say you have branchA and branchB, you want to put inside a shared repo [23:48] cd shared_repo [23:48] branching the branches in would require resetting all the per-branch config (like parent locations). [23:48] IT's easier to just do it in place. [23:48] bzr init-repo --no-trees. [23:48] (space before the dot) [23:48] then just bzr branch branchA and bzr branch branchB [23:49] it will branch the old branches that you want to convert, make them used the shared repo automatically and only copy the objects it needs [23:49] Much simpler to start from ~/work/whatever/trunk and just do bzr init-repo ~/work/whatever ; bzr reconfig --use-shared ~/work/whatever/trunk [23:50] or that [23:50] depends on how the folder structure is set up, and you arn't creating a repo in some random directory with other stuff in it [23:51] Well, you can just mv the branch wholesale to some new place if things are too cluttered already. [23:51] fullermd: thanks, i just did that: cd trunk ; bzr init-repo ../ ; bzr reconfigure --use-shared [23:51] But that's independent of the repo step, and you should do that anyway ;) [23:51] then i did cd .. ; bzr branch lp:~colleague/project/branch and it was super-fast [23:51] so thanks! [23:51] Eggselent. [23:52] this 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 whatnot [23:53] the 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 works [23:54] mgrandi: what would be wrong with the .bzr directory? [23:54] the 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 hand [23:55] i 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 whatever [23:55] Grabbing 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] on 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 something [23:56] mgrandi: what fullermd says, you have to make sure you backup all the relevant .bzr directories [23:56] mgrandi: but there are no portability issues [23:56] only one i can think of is if there is any OS specific stuff to a checkout, like symlinks maybe? [23:57] The 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] mgrandi: there are no symlinks under .bzr/ [23:58] yeah, but the checkout of the branch could have them or something [23:58] but you are probably right that the .bzr format is fine to just tar up and save somewhere [23:58] mgrandi: you're not including those, that's why you're backing up just .bzr/ [23:59] ah [23:59] http://stackoverflow.com/questions/1976857/bzr-create-tgz-file-containing-full-repository is what i was referring to [23:59] The 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" ;)