/srv/irclogs.ubuntu.com/2009/06/28/#bzr.txt

Raimhi00:11
Raimwhat should I do if bzr instructs me to run 'bzr upgrade' but then it tells me that it is already at the latest format version?00:11
Raimsee http://pbot.rmdir.de/c09c1e95ebc98ddbc7148e2c3a228cc800:11
Peng_Raim: It's telling you to upgrade http://code.bitlbee.org/bitlbee/00:13
Peng_Damn LF.00:13
Peng_Raim: , not your local repo.00:13
RaimPeng_: ah!00:13
Peng_Actually, it's telling you to upgrade http://code.bitlbee.org/.00:13
Raimyeah, I understand00:13
Raimand by reading the message again it even said exactly that00:14
Peng_Unless you actually run code.bitlbee.org, you can't fix it, but it does encourage you to send them an email, and it helps explain why you'll have awful performance pulling from that repo. :"D00:15
Peng_s/"//00:16
itistodayhi there, i'm new to bazaar and DVCS in general, was wondering if someone could help explain to me what the difference between 'pull' and 'merge' is?00:22
=== Kissaki is now known as Kissaki^0ff
mzzthat had better be in the manual, it's kinda important00:36
* mzz checks00:36
mzzitistoday: "pull" either turns the branch you're running it in into a copy of the branch you're pulling from (while keeping any uncomitted changes) or complains if it can't do so because you have committed changes that aren't in the branch you're pulling00:39
flvr8it isn't explained well in the user guide, but the man page has a good concise summary (i.e. man bzr)00:39
mzzitistoday: "merge" should only be done on a branch with no uncommitted changes and combines anything you've committed with anything in the branch you merge that you don't have yet, after which you get to review the result and commit it if it makes sense00:40
mzzweird that this isn't explained properly in the manual, imho it's kinda important to understand the difference00:40
itistodaythanks, although sorry, i'm still a little confused... so first, for both 'pull' and 'merge' you need to have an existing branch to run the command from?00:42
mzzitistoday: it is important to realise that merge is normally done in a clean working dir, and you need to commit the result if it makes sense. "merge" always creates a brand new revision nobody else has yet, even if the resulting text is identical to some revision that already exists. pull fast-forwards, you don't add any revisions other than what you're pulling in.00:42
mzzyes, both pull and merge need two branches00:42
itistodayso... I'm assuming the answer to this is 'no', but is then 'pulling' simply merging and then committing? if no, then what's the difference?00:43
mzzitistoday: if in doubt pulling if you can and merging if pull complains will often work, but in some workflows you may want to explicitly commit a merge even though a pull would be possible.00:43
mzzitistoday: pull does not create any new revisions that aren't already in the branch you're pulling. after merge you always have to commit the result (even if there are no conflicts)00:44
mzzitistoday: (this also means that you can merge and then revert if you did not like the result. With pull you'd have to remember the previous revision yourself to be able to do that)00:45
itistodaymzz:  thanks, kinda getting it, still have more questions tough, so then is 'pull' as if you were to remove your entire local branch and use the 'branch' command?00:46
mzzitistoday: yep00:46
itistodayok... that makes a whole lot more sense00:46
mzzitistoday: but only if you don't have any revisions locally that aren't in what you pull. If you do it'll complain that the branches have diverged.00:46
mzzitistoday: so other than that you can't easily undo it if you don't quite remember what the previous revision was, and assuming no *uncommitted* local changes, "pull" is quite safe00:47
itistodaymzz: does that mean: local branch must have a revision number less than the one from where you're pulling?00:47
mzzitistoday: revision numbers in bzr confuse me. You'll have to read the manual for that one.00:47
itistodayi guess that was a bad question, but essentially does that mean that you cannot have made any changes to the branch you have that are not in the one you're pulling from?00:48
mzzitistoday: (what if you committed one extra revision and you're pulling from a branch that has two (unrelated) new revisions?)00:48
mzzitistoday: no *committed* changes, yes.00:49
mzzitistoday: "pull" will attempt to keep uncommitted changes (just like "up" does in things like svn and cvs)00:49
itistodayok, cool :-) i think i get pull now00:50
itistodaythanks!00:50
mzzitistoday: actually so will merge, but using that is usually a bad idea, since it means it's hard to tell which changes are part of the merge and which are yours!00:50
itistodaythat was going to be my next question00:50
itistodayso you can merge when you have uncommitted changes?00:50
Peng_By default, merge yells at you if you have uncommitted changes. You have to pass --force to do it.00:50
mzzah, I didn't know that.00:51
itistodayPeng_: thanks! What does the --uncommitted option mean?00:51
mzz(because I'm pretty good at making sure I have no uncommitted changes before merging myself)00:51
itistoday--uncommitted: "Apply uncommitted changes from a working copy, instead of branch changes."00:51
itistodaydoes that mean only grab the uncommitted files from the place you're merging from?00:52
Peng_itistoday: Yeah.00:52
Peng_itistoday: That merges the uncommitted changes in the source branch's working tree into yours, instead of merging the new revisions and ignoring the working tree.00:52
itistodaythat's really weird00:52
Peng_It's really useful.00:53
mzzI don't think I've used that, but that's my fault.00:53
itistodayi'm sure, i'm just new to this entire thing, it's all fascinating to me00:53
Peng_Say you're making some changes in a branch, but then decide they should be in a new branch. Do "bzr branch", "bzr merge --uncommitted", and then "bzr revert" in the source branch. Bang!00:53
mzzI think I'd usually end up just committing those uncommitted changes to the other branch, then merging regularly.00:53
mzzah, that's actually useful.00:53
itistodayPeng_: great example! thanks00:54
mzzalthough unsurprisingly there are other ways to do that :)00:54
itistodayso, one other thing regarding pull.. in the user's guide part 6.2.3:00:54
itistoday6.2.3   Refreshing a mirror branch00:55
itistoday"Use the pull command to do this:"00:55
itistodaycd trunk; bzr pull00:55
itistodaythat seems to be similar to 'update'00:55
itistodaywhat's the difference?00:55
Peng_itistoday: Pull is about branches, while update is about working trees.00:55
itistodayok, the terminology still hasn't stuck quite yet, is this right: pull is more granular than update? i.e. update does it for all the branches..?00:56
mzz"up" becomes important if you have working trees and their corresponding branch in different locations.00:56
Peng_itistoday: Pull is "copy new revisions from branch X to Y". The pull command also implicitly runs "bzr update". Update is "update my working tree with new changes in branch X".00:57
itistodayPeng_: does 'new revisions' there mean the 'history' from branch X to Y?00:58
mzzsounds right to me00:58
itistodayand then 'update' takes the latest history and makes it visible to the file system for you to work?00:58
Peng_itistoday: Yeah.00:58
mzzyep00:58
itistodayawesome! thank you both very much for helping explain this :-)00:59
mzzitistoday: if this is just the result of "bzr branch" (aka "get") you'll end up with working tree and branch in the same spot, and won't have much use for "update"00:59
mzzitistoday: but there are ways to get the branch revision updated that don't automatically update the working tree afterwards, in which case you'll need "update". It'll probably be obvious once it happens.00:59
mzzerr, branch history, not revision01:00
mzz"bzr help working-trees" mentions a few, I think01:00
itistodaymzz: thanks, i'll keep that in mind01:01
itistodayi looked over a quick git tutorial, it seems to take a different approach with where branches are stored, i.e. it seems like the entire folder contains the repository01:01
mzzdoes someone know if there's a plugin I overlooked that automates creating a new branch for a lightweight checkout and switching to it?01:01
mzzitistoday: I haven't used git much, but see 10.2.5 in the manual01:02
mzzI use a variation of that setup: my lightweight checkout isn't below the repository.01:03
itistodaymzz: k, reading...01:03
mzzI'm looking for a more convenient way to do the "bzr branch ...", "bzr switch ..." mentioned there.01:03
mzzperhaps I should just write a plugin.01:03
* mzz throws together a "relswitch" plugin01:05
flvr8is there a generalized way to create server aliases, a la "lp"?01:06
mzzflvr8: I just came across the "bookmark" plugin, which may do what you want01:06
flvr8thanks, will take a look01:06
Peng_flvr8: Better than writing Python code, you mean?01:08
flvr8Peng_: heh, i take it "lp" is hardcoded somewhere? are there other "presets"?01:09
mzzoh, huh. ":this" partially fixes what was annoying me.01:10
mzzflvr8: "lp:" is a bit fancier than it looks (deals with logins and some transformations of the path too iirc, it's not just a fixed prefix)01:11
itistodaymzz: that seems a bit different from how git does it, i think. i think git sortof hides the branches from you, whereas with bzr you have to have the directory structure already laid out (repo/branches), i think git does (folder <- invisible branches)01:11
flvr8mzz: ah, of course01:11
mzzitistoday: git does have a directory structure, but it's below .git, iirc.01:11
mzzitistoday: I suck at git, but afaict it's considered acceptable to peek inside .git. That's *much* less common with .bzr.01:12
itistodaymzz: ah ok, then it should be possible to do something similar with 'bzr'?01:12
mzzitistoday: well, I do think the two are pretty similar, but I haven't compared them in any amount of depth :)01:12
mzzitistoday: I just found out about the magical ":this" location which points at the current branch. I think that can make them more similar01:14
mzzlet's see01:14
itistodaythe idea would be to have a branch with a .bzr folder in it, and to be able to change the working directory of that to another branch, without changing the folder's location01:15
mzzI don't think you can have a .bzr folder, but you can have a .hidden-repo folder. Give me a minute, experimenting.01:15
itistodayk01:15
itistodaythe .hidden-repo folder would have to reside within the branch itself... i'm not sure if that's possible with bazaar, which i think expects the repo to be the parent folder01:17
mzzyay lightweight checkouts01:18
mzzitistoday: haven't thought this through, but http://paste.pocoo.org/show/125465/01:19
mzzitistoday: note that putting the checkout inside the repo works just fine (that's how that example in the manual I mentioned does it)01:20
mzzitistoday: I'm interested in doing it this way because I have my repo on a network mount while I want my checkout to be local.01:20
itistodaymzz: so initially in that example :this points to .hidden-repo/trunk ?01:21
mzzitistoday: yeah, because that's what we checked out01:22
itistodaywith the checkout, do you still have access to all the revisions?01:22
mzzitistoday: as long as the repository is reachable01:22
mzzerr, as long as the branch is reachable is better01:22
mzzit's a lightweight checkout, which means it has just a working tree. For anything involving history it needs the branch and its repository01:23
itistodaywhich it transparently accesses?01:23
mzzitistoday: might actually want to peek at what ends up in .bzr to understand what's going on here, imho.01:24
mzzitistoday: the checkout remembers the location of its branch01:24
itistodaymzz: so the lightweight checkout acts as an alias to the branch?01:24
mzzsee "bzr help checkouts"01:25
itistodaythanks, yeah, it seems like an alias01:26
mzzoh, I forgot --no-trees on the init-repo01:26
itistodaywhat does that do?01:26
itistodayer... i'll have a look at the manual01:26
mzzstop it from putting working directories in .hidden-repo, which is kinda silly here01:26
itistodaycool, that makes sense, thanks for the example :-)01:27
mzznotice there's very little to a branch without a working tree: just a revision id, tags, and branch.conf01:28
itistodayneat01:29
itistodaybut yeah, i think the main difference here between git is that with bzr the repo must be in a different directory than the working tree01:30
mzzand bzr gives you quite a bit of flexibility in where you put the repo, the branch, and the working tree (in the same place is simplest, but you can spread them out a bit too)01:30
mzzyou might even be able to put the repo inside the checkout and .bzrignore it01:30
itistodaynow that would be cool01:31
mzzwell, I think it'd be confusing.01:31
mzzif you mess up the .bzrignore you could end up committing the repo to itself, or something equally daft.01:31
mzzlet's see though.01:31
Peng_flvr8: lp: is provided by the built-in Launchpad plugin (bzrlib.plugins.launchpad), using bzrlib's directory service API. You could totally write a plugin to provide something similar, but you can't just add "foo: = http://bzr.foo.org/" to some config file.01:32
mzzthe bookmark plugin mostly does just that, iiuc01:32
mzzitistoday: http://paste.pocoo.org/show/125470/ does seem to work, although I still think it's confusing.01:34
flvr8Peng_: thanks01:35
mzzitistoday: to improve this setup further you'd want a :repo alias so you don't have to specify those paths relative to the branch01:37
itistodaymzz: thanks! is there any easy way to set that alias?01:37
flvr8does anybody have experience with the bzr-emailer-notifier script? it's sending emails ok for two of the repositories, but not the third. (and there are a bunch of 'No handlers could be found for logger "bzr" errors' in the log, which makes me wonder if it's hung up on a lock per #141172 or #172392 -- any way to tell?)01:37
mzzitistoday: and adding that to bzr is pretty trivial, although it is arguably a misfeature because branches are normally just an optimization, you're not supposed to care about their location01:37
mzzitistoday: I'm tempted to just write it anyway though.01:38
mzzlemme grab a snack and do that.01:38
itistodaymzz: :-)01:38
itistodaywow this is neat01:41
itistodayso, i did something very similar to what you did, mzz01:41
itistodayexcept i had a branch to start with already01:42
itistodayso after creating the repo in the branch (.bzr-repo)01:42
itistodayi branched to it like this: bzr branch . .bzr-repo/trunk01:42
itistodaythen I deleted everything inside the folder *except* for the .bzr-repo folder01:42
itistodayand did a lightweight checkout from the .bzr-repo/trunk01:43
itistodayand now it appears i have the same setup01:43
mzzyep (remember to make that a --no-trees repo, bit faster that way)01:43
itistodayyeah i did :-)01:44
itistodayis there a bzr command though to do what i did via rm -rf  and bzr checkout --lightweight?01:44
itistodayi.e. turning the current branch into a checkout from someplace else?01:44
itistodayit seems like a dangerous thing to do though so there might not be01:44
itistodayjust want to know if what i did would be the standard way of doing that01:45
mzzlemme see01:45
mzzitistoday: bzr reconfigure --lightweight-checkout --bind-to .bzr-repo/trunk .01:48
itistodaywowww01:49
itistodaylet me see if that works...01:49
itistodayincredible01:52
itistodaybazaar is awesome :-)01:52
itistodayi might write a blog post on this if that's OK? i'll of course be sure to credit you and your examples01:52
mzzmmm, drat. "lookups" is not an instance variable, so I can't just hack up the existing AliasDirectory so you get the same style of alias. Oh well.01:52
itistodayi think people would be interesting for the git people to know that this can be done in bazaar01:53
itistoday*think people = think it01:53
itistodayhow does the autocompletion work in bzr shell?01:58
itistodayi type 'br[tab]' and it just puts a tab01:58
mzzitistoday: meh. Try http://paste.pocoo.org/show/125474/ (put in ~/.bazaar/plugins, then turn the ":this/.." in earlier examples into "repo:")02:10
* mzz found various fun locations differing from the one he wanted02:11
mzzitistoday: tab-completion works for me02:12
itistodayi'm on OS X02:12
itistodayoh well, not a big deal02:12
itistodayre plugin: neat!02:12
itistodayill try it right now :-D02:12
mzz(I was ending up with locations at various spots below .bzr, which wasn't what I wanted)02:13
mzz(took me a while to realise I had to go through .bzrdir)02:13
itistodayit might be useful for me to learn python at this point, if only to be able to customize bzr to my liking :-)02:13
itistodaynot sure what what you mean ..?02:14
mzzcan be quite useful to do ad hoc scripts or plugins02:14
mzzjust that I was getting the code wrong initially02:14
itistodayhow do i setup the plugin folder properly with this paste?02:15
itistodayi've always seen plugins as directories, and they usually have some sort of specific setup with an __init__.py file in it02:15
itistodaymzz: ping02:18
mzzitistoday: http://paste.pocoo.org/show/125477/ is slightly cleaner02:19
itistodaymzz: how do I setup the plugin though?02:20
mzzitistoday: just store as ~/.bazaar/plugins/repoalias.py, or ~/.bazaar/plugins/repoalias/__init__.py if you prefer02:20
itistodaydoesn't seem to work via the second method...02:21
itistodayUnable to load plugin 'repoalias' from '/Users/gslepak/.bazaar/plugins'02:22
itistodayUnable to load plugin 'repoalias' from '/Users/gslepak/.bazaar/plugins'02:22
itistodayerr, sorry for the dup02:22
mzzno? urgh, now what did I do wrong02:23
itistodaymzz: have you tried it?02:23
mzzthere should be a message above the failure02:23
mzzyes, I have02:23
mzzwell, I've tried way one, and I can't think of a reason for way 2 to fail02:23
mzz(don't do both at the same time though)02:23
itistodayi tried method 1 too02:23
itistodaysame message02:23
itistodaywonder if there's any way to get what the reason is?02:24
mzzno further output? Also check ~/.bzr.log02:24
itistodayyeah, there is02:25
itistoday1 sec02:25
itistodayhttp://paste.pocoo.org/show/125478/02:25
itistodaydoesn't seem to like RepositoryDirectory02:26
mzzthat traceback makes no sense to me02:27
mzzoh wait02:27
mzzitistoday: how did you paste this code over? Did you accidentally end up with the call to directory_service.directories.register indented?02:28
itistodaylet me check02:28
itistodayyes02:28
itistodaysorry, i don't know python02:28
mzzitistoday: indentation is syntax in python. Using the "download" button of the pastebin is strongly recommended.02:28
mzz(under "paste details")02:29
mzzor I guess I could just stuff this thing on launchpad02:29
itistodayk, will remember that from now on for python code02:29
itistodayok that seemed to work :-)02:30
itistodayalthough i'm probalby using it incorrectly: bzr branch . :repo/expirmental02:30
itistodaybzr: ERROR: ":repo/expirmental" is not a valid location alias.02:30
mzzitistoday: repo:, not :repo. Sorry about that.02:31
itistoday:-D02:31
itistodaymzz: thanks! sorry about that02:31
itistodayi like that syntax a lot actually02:31
mzzI actually think I like repo: better, so I think I'll keep it02:31
itistodayyeah02:31
itistodaydefinitely02:31
mzzhmm, what to call the plugin02:32
itistodaymzz: you might want to consider making this a real plugin?02:32
itistodayi think lots of people would find this useful02:32
mzzhardest part: think of a name02:32
itistodayrepoalias is pretty good i think...02:32
mzzrepoalias it is02:32
itistoday:-)02:32
itistodayyup, seems like it02:34
mzzitistoday: just give me a minute, pushing etc02:36
itistodaymzz: sure :-)02:36
* mzz is figuring out whether lp can host branches without having a whole project for them02:38
wgrantmzz: Use +junk in place of the project name.02:38
mzz"bzr push lp:+junk/repoalias" fails02:39
wgrantmzz: You need your username in there too.02:39
wgrantbzr push lp:~username/+junk/branch02:39
mzzyeah, got it. Thanks!02:39
mzzitistoday: bzr get lp:~marienz/+junk/repoalias02:40
itistodaymzz: awesome, thanks!02:41
itistodayif I get time i'll write a blog entry on this plugin and using bazaar like git here: http://taoeffect.com/blog02:42
mzznotice this is just a hack so far, I don't know if there are any gotchas if you actually use this02:44
itistodaymzz: k, will be sure to mention that if i post it02:45
mzzadded it to the list on the wiki too02:48
mzzI guess I'll turn it into a proper lp project if people use it02:48
itistodayjust used it with merge, seems to be working fine :-)02:48
itistodaymzz: if i find any bugs in it, what would be the best way to report them to you?02:49
* mzz wonders if launchpad has a way to file bugs on a person instead of a project02:51
mzzitistoday: I'm actually more reachable through irc than through email, I'm weird like that. Just poke me in here.02:52
itistodaymzz: k, sure thing, yeah, and it would be neat if launchpad could do that, although if you decide to turn it into a project that would solve it02:52
itistodayalready, i'm heading out, thanks again mzz for all your help, and the awesome plugin!02:59
=== davidstrauss_ is now known as davidstrauss
kfogelIf I see this:07:36
kfogelworking tree: Working tree format 407:36
kfogel        branch: Branch format 607:36
kfogel    repository: Development repository format - rich roots, group compression and chk inventories07:36
kfogel... from 'bzr info -v', does that mean I'm using brisbane core?07:36
wgrant'chk inventories' == brisbane core07:37
wgrantNot sure if that's 2a, though.07:37
mwhudson2a has branch7 too07:37
mwhudsonkfogel: run bzr upgrade --2a in the *branch* directory07:38
wgrantRight, my 2a has that repository type but branch707:38
mwhudson(it will be very quick)07:38
mwhudsonalthough07:38
mwhudsonyou should probably recreate the working tree too07:38
kfogelmwhudson: this is the mysql-server branch that I created, using the script you've seen by email.  I ran 'bzr upgrade --2a mysql-server' to get this!07:39
mwhudsonkfogel: it's a standalone branch?07:40
kfogelmwhudson: yes07:40
wgrantI though branch7 was only needed for stacking. Does 2a force it just because it's a good opportunity?07:40
kfogelmwhudson: it is not in a repo other than itself07:41
mwhudsonkfogel: strange!07:41
mwhudsonwgrant: yes, i think so07:41
mwhudsonwgrant: any client that can understand a chk repo can certainly understand branch707:42
wgrantmwhudson: That is true.07:42
kfogelmwhudson: this appears to be bzr 1.16, not 1.16.1, fwiw (it's on devpad).07:42
mwhudsonkfogel: i don't think any of the fixes will have made a difference here07:43
mwhudsonkfogel: you did run reconcile before updgrade, right?07:43
kfogelmwhudson: yup.  I just ran that script, as per my email.07:44
mwhudsongood07:44
wgrantWhat benefit does the reconcile bring?07:44
mwhudsonwell, you could try running bzr upgrade --2a again...07:44
wgrant(apart from making a nice heater)07:44
mwhudsonwgrant: inconsistent revision information in the revision graphs can mess the conversion up07:45
mwhudson(i don't really know the details tbh)07:45
* mwhudson goes to cook dinner07:45
wgrantmwhudson: Ah, right.07:46
kfogelmwhudson: bzr upgrade --2a will take another four days?07:46
mwhudsonkfogel: it really shouldn't07:46
mwhudsonchanging the branch format is easier07:46
mwhudsonmaybe tar it up first though...07:46
kfogeltime bzr upgrade --2a07:47
kfogelstarting upgrade of file:///home/kfogel/lp-testing/mysql-server/07:47
kfogelmaking backup of file:///home/kfogel/lp-testing/mysql-server/.bzr07:47
kfogel  to file:///home/kfogel/lp-testing/mysql-server/backup.bzr07:47
kfogelbzr: ERROR: File exists: u'/home/kfogel/lp-testing/mysql-server/backup.bzr/': [\07:47
kfogelErrno 17] File exists: '/home/kfogel/lp-testing/mysql-server/backup.bzr/'07:47
mwhudsonrm -rf backup.bzr07:47
kfogelmwhudson: done (well, moved it elsewhere).  now re-running07:48
kfogelmwhudson: thanks for taking time out from cooking dinner07:48
kfogelmwhudson: upgrade completed :-)07:49
kfogel22 milliseconds07:49
kfogelbzr info -v now says branch format 707:50
mwhudsonkfogel: yay08:31
=== lamont` is now known as lamont
Lo-lan-doG'day all…16:18
Lo-lan-doI'm reading http://bazaar-vcs.org/Roadmap/BrisbaneCore/PlusOne and the last feature listed there appeals to me for a client.16:20
Lo-lan-doAny hint whether we're talking months or years here?16:20
=== Kissaki^0ff is now known as Kissaki
Glenjaminis there a mirror for bzr downloads somewhere? lp seems to be down16:53
james_wGlenjamin: should be back up17:31
Glenjaminmm, got it now17:36
Glenjaminaltho i'm having a problem installing bzrtools on linx17:36
Glenjamini;ve installed bzr and bzrtools via easy_install, but they both seem to be eggs, instead of bzrtools going into the plugins folder17:37
SamBGlenjamin: but does "bzr plugins" list bzrtools?18:54
=== asabil_ is now known as asabil
=== Noya_ is now known as Noya
GlenjaminSamB: cheers for replying, i figured our that easy_install did an egg, which didnt work - but setup.py install did it properly23:11
=== Kissaki is now known as Kissaki^0ff
=== RAOF__ is now known as RAOF
dobeyabentley: not around are you?23:58

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