[01:22] <jono> hi all
[01:22] <jono> is there a Python bazaar module that I can use to check out code?
[01:24] <Peng> jono: import bzrlib. Aside from some build code and about 20 lines in the "bzr" executable, that's the entirety of bzr.
[01:26] <jono> Peng so I can use it to check out code?
[01:27] <Peng> jono: I don't know what exactly you mean by "check out code", but probably.
[01:28] <jono> Peng bzr branch lp:foo
[01:29] <jono> peng are there docs anywhere for it
[01:29] <jono> ?
[01:29] <jono> ahaha found them
[01:30] <Peng> jono: That should be easy enough to do, but I honestly do not know how. You could check out bzrlib/builtins.py:cmd_branch to see how "bzr branch" does it, or maybe the docs give an example.
[01:30] <jono> ok cool
[01:30] <jono> I want to add an example to Acire :)
[01:31] <Peng> subprocess.call(['bzr', 'branch', 'lp:foo']) is cheating, right? ;D
[01:31] <Peng> (Sorry, I shouldn't encourage that.)
[01:32] <jono> haha
[01:32] <jono> that *is* cheating
[01:32] <jono> :)
[01:37] <jono> Peng any idea what the full qualified path of a branch on LP is?
[01:37] <jono> remote_branch = Branch.open("lp:python-snippets")
[01:37] <jono> does not work
[01:39] <Peng> Your code should ask the directory service, which I also do not know how to do.
[01:43] <Peng> s/should/might have to/
[01:43] <jono> can anyone else help me figure this out?
[01:43] <jono> thanks Peng
[01:43]  * Peng inserts several *shrug*s
[01:43] <jono> lol
[01:44] <jono> lifeless, surely you must know :)
[01:44] <jono> you are an expect among these parts :)
[01:53] <Peng> He's gone. :<
[04:36] <chromakode> hey #bzr, can I revert/remove a specific commit from the history?
[04:37] <chromakode> (a bad merge)
[04:38] <Peng> You can revert the changes it made -- "bzr merge . -r 50..49" or so -- but you can't remove the revision from history.
[04:39] <Peng> Well, if it's the most recent revision, you can use "bzr revert -r -2", or even "bzr uncommit" to remove it from history. (But the latter would be a pain for users if you've already pushed it.)
[04:39] <chromakode> yeah -- it's already got commits on top of it
[04:39] <chromakode> :(
[04:39] <chromakode> best is to revert. I didn't know you could do a range backwards!
[04:41] <chromakode> Peng: what exactly are the revnos I should pick for that example?
[04:41] <chromakode> I want to get rid of revno 88, retaining 89 and 90
[04:42] <Peng> chromakode: Should be 88..87, but try it and see.
[04:42] <Peng> You can always "bzr revert" if it goes horribly wrong.
[04:43] <chromakode> neato!
[04:44] <fullermd> Er, "revert -r-2" wouldn't remove anything from history...
[04:45] <chromakode> he was saying uncommit would remove it from the history
[04:45] <chromakode> I suppose you'd commit back the following 2 commits
[04:45] <chromakode> this looks good. thanks.
[04:46] <Peng> Yeah, that was worded a bit badly.
[04:47] <chromakode> Peng: so, if the revnos are in reversed order, it treats the diff in reverse?
[04:47] <chromakode> that's really cool
[04:50] <Peng> Right. :D
[04:50] <chromakode> hmm. it's giving me a lot of conflicts.
[04:51] <chromakode> is there any way to tell it "use the merge-tree version!"?
[04:52] <Peng> "bzr resolve" can do it, at least if you're using a very recent version of bzr.dev.
[04:53] <chromakode> checked there :(
[04:53] <Peng> Um, it shouldn't conflict too badly, unless, well, a lot of conflicting changes have been made since.
[04:54] <chromakode> urgh.
[04:55] <chromakode> yes. they have. to every header file
[04:55]  * chromakode slaps his teammates
[09:49] <wgrant> If I'm using a lightweight checkout with a treeless repository, is there some way to store uncommitted changes before I switch, like switch-pipe does? Should I just shelve?
[09:49] <fullermd> shelve should work.  Whether unshelve will work well...
[09:50] <fullermd> I'd guess it probably should, at least as well as e.g. an update across that pair of revs with local changes.
[09:53] <wgrant> Hm, so the shelf is stored in the checkout. I seeeeee.
[09:53]  * wgrant checks how pipeline does it.
[09:53] <fullermd> Yeah, shelf is WT-local.
[09:54] <wgrant> Ah, it uses shelf but directs it to the branch. Hmm.
[10:12] <lifeless> wgrant: bzr shelve; bzr switch; bzr unshelve - will work fine.
[10:12] <lifeless> wgrant: as the checkout is constant in the environment you described
[10:14] <wgrant> lifeless: Right, but is there a way to store uncommitted changes in the branch?
[10:15] <lifeless> no
[10:16] <lifeless> commit them to a new branch
[10:16] <lifeless> or to a tag
[10:16] <lifeless> or something
[10:16] <lifeless> why though?
[10:19] <wgrant> I thought I'd try lightweight checkouts, since Launchpad trees are huge and slow, and it seems to work well with pipeline.
[10:23] <lifeless> sure
[10:23] <lifeless> that doesn't answer the question
[10:24] <lifeless> why do you need to stash the change, not commit it, and tie it to the branch
[10:29] <wgrant> lifeless: I might have realised half-way through a change that it needs a change in a some other branch.
[10:29] <wgrant> Although I guess that's more covered by the pipeline case.
[10:29] <lifeless> wgrant: sure; shelve; switch; make change; commit; switch back; merge; commit; unshelve.
[10:30] <wgrant> lifeless: I guess. It's just a bit different from the great workflow that pipeline gives.
[10:30] <lifeless> wgrant: sure; you're working with the primitives.
[10:30] <lifeless> wgrant: what I *don't* get is how that is different
[10:31] <lifeless> as in, I don't see where the changes are stashed affecting your use case
[10:32] <wgrant> I sort of like attaching the changes to their branch.
[10:32] <wgrant> Makes it easy to keep track of them.
[10:32] <wgrant> If they're attached to the branch I can be lazy and shelve without a message.
[10:33] <fullermd> You can always commit them and uncommit them later.  Unless you forget, of course.
[10:33] <wgrant> True.
[10:34] <lifeless> wgrant: changes to the core to make it better sought after
[10:35] <lifeless> personally, in my pending dir I shelve everything to one space, no comments, and I don't get more or less confused
[10:35] <lifeless> wgrant: we could though, when shelving default to attaching the nick as a comment
[10:35] <lifeless> what do you think?
[10:35] <wgrant> lifeless: That might be handy.
[10:36] <lifeless> file a bug
[10:36] <wgrant> Also, last time I tried this shelve didn't let me get a diff. It might be more usable now that it does.
[10:51] <wgrant> Is there a repo: or similar branch alias?
[10:51] <lifeless> what would that mean
[10:51] <j^> hi, is there an example somewhere of how to use post_change_branch_tip
[10:52] <lifeless> sure, theres a few plugins around now that use it
[10:52] <wgrant> lifeless: It would be an alias for the repo of the current branch, so I could say bzr switch repo:somebranch
[10:52] <lifeless> wgrant: just say 'bzr switch somebranch'
[10:52] <lifeless> wgrant: it will dtrt
[10:52] <j^> i.e. http://doc.bazaar.canonical.com/latest/en/admin-guide/hooks-plugins.html?highlight=post_change_branch_tip
[10:52] <wgrant> lifeless: ...oh. That is nice.
[10:53] <j^> links to http://doc.bazaar-vcs.org/en/plugin-guide
[10:53] <j^> which gives 404
[10:54] <lifeless> j^: hmm, not sure about that
[10:54] <lifeless> anyhow
[10:56] <spiv> j^: http://doc.bazaar.canonical.com/plugins/en/ works
[10:57] <j^> still confused about how post_change_branch_tip works
[10:58] <lifeless> http://github.com/djmitche/buildbot/blob/06ce8e7e79b2ffa1a301ac45c7155899d6a0e6da/contrib/bzr_buildbot.py has an example of it
[10:58] <spiv> j^: the bzr-email plugin has an example of using it, see http://bazaar.launchpad.net/~bzr/bzr-email/trunk/annotate/head%3A/__init__.py#L106
[10:58] <lifeless> j^: but what are you confused about in particulalr
[10:58] <lifeless> spiv: google for the hook name, its interesting on the 2nd and later pagers
[11:00] <j^> i have a server where several people push changes to, i want to run a command on the server each time someone pushes new versions, post_change_branch_tip seamed to be the right hook, can not make out how to enable it on the server though
[11:00] <lifeless> j^: install it on the server
[11:00] <lifeless> e.g. if you have a setup.py, run setup.py so as to install it into bzrlib/plugins/ wherever that is in your python path
[11:03] <spiv> j^: as lifeless says, install the plugin with the hook on the server (and install it system-wide, so that it will be loaded by any user that runs 'bzr'), and make sure people push using the smart server (e.g. bzr+ssh, not sftp).
[11:03]  * spiv wanders off
[11:16] <lifeless> hmm
[11:16] <lifeless> I was sure I had writted a diff hook
[11:28] <lifeless> spiv: I would love news_merge to use ReST parser
[11:28] <lifeless> spiv: my other NEWS files use alternative section markers
[12:40] <lifeless> spiv: lp:bzr-commitfromnews
[12:40] <jelmer__> was the darcs 2.4 release announcement just cross-posted to the bazaar and git lists?
[12:41] <jelmer> moin lifeless, spiv
[12:41] <jelmer> lifeless: Happy birthday!
[12:41] <lifeless> jelmer: thanks ;)
[12:44] <jelmer> lifeless, will commitfromnews also use --fixes ?
[12:44] <fullermd> jelmer: It wasn't cross-posted.  The mails were just re-arranged after it was sent, allowing it to appear on any list that's convenient   :p
[20:13] <lifeless> and moin
[21:03] <lifeless> jelmer: hi
[21:03] <jelmer> lifeless: hello
[21:03] <lifeless> jelmer: I'd like it to do --fixes automatically, haven't looked at what is needed yet.
[21:04] <lifeless> jelmer: I filed a bug when I registered the project saying this; if you wanted to fixit :)
[21:04] <jelmer> lifeless: Ah, sorry
[21:04] <jelmer> lifeless: it works well, btw
[21:05] <jelmer> thanks for publishing it
[21:05] <lifeless> my pleasure
[21:06] <lifeless> I'm trying to be a bit rougher on development friction
[21:08] <jelmer> what do you mean with development friction?
[21:10] <jelmer> I haven't heard friction being used in this context, only as something that exists between people.
[21:13] <lifeless> I mean between me and machine
[21:13] <lifeless> and me and tools
[21:13] <lifeless> http://en.wikipedia.org/wiki/Friction
[21:14] <lifeless> effort put into writing code = F
[21:14] <lifeless> things that sap that effort and make it get less work done = Ff
[21:15] <lifeless> I *think* the concept of interpersonal friction comes from the analogy between anger and heat
[21:16] <lifeless> as the energy friction bleeds off is heat
[21:18] <jelmer> lifeless: Ah, thanks.
[21:23] <lifeless> jelmer: if you'd like to add fixes support that would be awesome
[21:23] <jelmer> lifeless: I might have a look at that when I have a moment to spare.
[21:24] <lifeless> :P
[21:24] <lifeless> I'll probably look at it when I need to use a fixes clause
[21:24] <lifeless> I just haven't so far
[21:24] <jelmer> having --fixes might actually save me quite some time
[21:25] <maxb> I have a svn repository, with lots of legacy branches that are merged to trunk, but there's no metadata to say so. (Before svnmerge, or 1.5 merge tracking, and not svk). Is manually mangling in some bzr-svn bzr:merge revprops a neat trick or a terrible shoot-self-in-foot idea?
[21:25] <jelmer> I usually forget to specify --fixes, then I uncommit, look up the bug number in NEWS and recommit with --fixes
[21:25] <lifeless> jelmer: so, when I forget I ignore it ;P
[21:25] <lifeless> jelmer: but you might want to just fix the process next time - to make time on the basis that you'll save time :>
[21:25] <jelmer> heh
[21:26] <jelmer> maxb: It's a good way to shoot yourself in the foot..
[21:26] <maxb> hmm. It seemed so tempting
[21:26] <maxb> Anything in particular I'm liable to break?
[21:26] <jelmer> maxb: if you're sure there are no branches out there that were created from that svn repo using bzr-svn you could attempt it
[21:27] <maxb> I can ensure that
[21:27] <lifeless> maxb: the revids from bzr-svn are deterministic
[21:27] <maxb> which is indeed a great thing about it
[21:27] <lifeless> maxb: so if anyone else, ever, runs bzr-svn, they wouldn't be able to merge with you
[21:28] <maxb> Presumably, yes, they will, if I've munged the svn repo before anyone ever bzr-svn's it
[21:28] <lifeless> maxb: or perhaps it is 'if anyone else ever has, ...'
[21:28] <lifeless> right
[21:31] <maxb> It's a company repository, and freshly cvs2svn-ed, so I can state confidently that there are no prior bzr-svn-ifications in the wild
[21:32] <jelmer> maxb: ah, should indeed be possible in that case.
[21:33] <maxb> Unfortunately I couldn't sell a direct cvs2bzr to the powers that be :-)
[21:33] <jelmer> maxb: please note that bzr-svn doesn't interpret svn:merge
[21:33] <maxb> oh. that's unfortunate. I may have to have a go at hacking on that, then
[21:34] <maxb> Presumably there's no reason why it couldn't, just no one's written the code?
[21:35] <maxb> Oh, except I'd be glibly ignoring subtree mergeinfo
[21:36] <jelmer> maxb: There is a reason, bzr doesn't support tracking cherrypicks
[21:37] <jelmer> maxb: So you have to do analysis of the svn:mergeinfo data to see if *all* revisions for a particular path are merged before you can add the last revision in svn:mergeinfo for that path as a parent
[21:38] <maxb> tricky, but doable
[21:38] <jelmer> maxb: Expensive, performance-wise.
[21:38] <jelmer> It also requires a mapping format change.
[21:39] <jelmer> personally I'd rather see somebody investigate the possibility of tracking cherrypicks, even if we don't start doing smart things with that data yet.
[21:41] <maxb> Even if you did track cherrypicks, you'd still want to resolve them into full-ancestry merges when that was the actual case
[21:41] <jelmer> yes, but that logic would be in bazaar, not bzr-svn
[21:41] <maxb> true
[21:42] <jelmer> (.. and bzr-hg and bzr-git)
[21:42] <maxb> hg and git track cherrypicks ?
[21:43] <jelmer> git does at least, on a revision level
[21:43] <maxb> whoa, I completely missed that
[21:43] <jelmer> it does it (at least optionally) by simply putting the sha of the cherrypicked commit in the newly created commit
[21:44] <jelmer> I'm not sure if it actually uses it do improve merge quality
[21:44] <lifeless> AFAIK it doesn't
[21:46] <maxb> I think my next step is to spend some more time poring over bzr-svn's guts
[21:55] <lifeless> I wish lp mailed me back saying 'your bug might be a dup, look at XYZ'
[21:55]  * lifeless files bugs
[21:58] <jelmer> lifeless: Yes, me too.
[21:59] <jelmer> maxb: tbh, I don't think that sort of analysis would belong in the default bzr-svn mapping.
[22:00] <jelmer> maxb: I don't want to discourage you, but I think I should mention that upfront.
[22:04] <maxb> jelmer: It's a fair comment. It might be desirable only for people using bzr-svn for a onetime migration away from svn
[22:05] <jelmer> maxb: it's also only a temporary solution, since it we would need another mapping change (and an upgrade path) when proper cherrypicking support in bzrlib would be added
[22:12] <maxb> The mapping issue is a hard one, but I'm already contemplating using a custom-hacked bzr-svn to migrate some slightly screwy history out of svn anyway
[22:13] <maxb> (The problem there is tags which don't show up in bzr because they were made from a mixed-revision working copy, so bzr-svn treats them as branches)
[22:16] <maxb> I guess I'll need to make sure I also change the revision-id generation so that they are different to what an unhacked bzr-svn expects
[22:17] <lifeless> jelmer: bug 529227 bug 529226
[22:18] <jelmer> maxb: You can just create a new mapping format
[22:18] <jelmer> maxb: That should change the revid as well
[22:18] <jelmer> maxb: actually, you should be able to just use a vanilla bzr-svn plugin and provide your own plugin that registers a new mapping format that does what you need.
[22:19] <maxb> interesting. It's clear that I need to spend some more time learning about the internals :-)
[22:22] <Demosthenes> can someone tell me what this python error means? bazaar quit working today at noon and returns this on every invocation. http://pastebin.com/wpgG4hsX
[22:24] <beuno> Demosthenes, I have no idea what that error is, but you are using a very old version of bzr
[22:24] <Demosthenes> lenny standard
[22:29] <maxb> Demosthenes: I'm guessing it means that a .pyc file has been corrupted
[22:30] <Demosthenes> i'm checking files now
[22:30] <maxb> I'd start wondering about the health of your hard disk :-(
[22:31] <maxb> I'd also strongly recommend upgrading bzr if you use it regularly. Debian stable is far too stable for an active project like Bazaar
[22:32] <jelmer> lifeless: Thanks, subscribing
[22:32] <Peng> Presumably /usr/lib/python2.5/socket.pyc
[22:32] <Demosthenes> maxb: i'm seriously concerned myself, as i haven't made changes in a bit...
[22:32] <Demosthenes> i'm running a compare against my last backup for /usr
[22:54] <Demosthenes> eww i'm having some files i'd never change not match...