[00:00] <jelmer> lifeless: I think it comes down to two things: in order to do branch management when using a lightweight checkout you have to change directories (since the branches are in a different location, you have to "cd ../branches && bzr branch branch-foo branch-bar && cd ../wt && bzr switch branch-bar" and "bzr switch" is too slow
[00:00] <lifeless> jelmer: ok
[00:01] <lifeless> so the former - heres what I do
[00:01] <lifeless> bzr init-repo --no-trees proj
[00:01] <lifeless> cd proj
[00:01] <lifeless> bzr branch/init trunk
[00:01] <lifeless> bzr checkout --lightweight trunk working
[00:01] <lifeless> ln -s $(pwd)/working ~/.bazaar/plugins/proj
[00:02] <SamB> hmm, isn't there a "bzr switch -b" or something lately added?
[00:02] <lifeless> SamB: yes
[00:02] <lifeless> today though, I use
[00:02] <lifeless> bzr push ../new-branch; bzr switch new-branch
[00:03] <lifeless> so its not ideal, but it is pretty easy
[00:03] <SamB> not bad
[00:03] <jelmer> lifeless: ah, I hadn't considered "bzr push"
[00:03] <lifeless> jelmer: well, can also spell 'bzr branch . ../new-branch'
[00:03] <lifeless> or bzr branch ../trunk ../new-branch, if I want to be absolutely sure about provenance
[00:04] <jelmer> lifeless: but (now that we're talking about UI) I still consider this a big hassle compared to colocated branches
[00:04] <lifeless> jelmer: switch _should_ be very fast. please file bugs if its slow
[00:05] <lifeless> jelmer: typing .bzr/branches/new-branch would be equally awkward, I should think.
[00:05] <lifeless> jelmer: I think the big UI win of colocated branches isn't the colocation, its the search-path and location glue
[00:05] <lifeless> this isn't to say I don't like colocated branches/git style branches; just that I'm trying to really understand what makes things good
[00:06] <jelmer> lifeless: yeah, perhaps git style branches is a better description than colocated branches.
[00:07] <jelmer> lifeless: the setup you did is nontrivial (more than one command)
[00:07] <jelmer> lifeless: and the combined action of creating and switching to a new branch is more than one command
[00:07] <lifeless> so, we're trying to plan a better UI before making many random changes
[00:08] <lifeless> jelmer: but have you seen jam's switch -b feature?
[00:09] <jelmer> lifeless: it breaks looms :-/
[00:10] <SamB> lifeless: please contribute any tips to GitStyleBranches ;-)
[00:10] <jelmer> lifeless: but no, I hadn't. That does indeed make the second bit easier
[00:11] <lifeless> jelmer: I'll fix looms up monday
[00:11] <lifeless> I wonder if perhaps it should be in switch --new or something
[00:12] <jelmer> lifeless: Yeah, --new would probably be more intuitive to new users
[00:12] <lifeless> did it get into 1.17?
[00:12] <jelmer> lifeless: -b does remind me of the git argument, but other than that it doesn't make much sense
[00:12] <jelmer> lifeless: as far as I can tell it's only in  bzr.dev
[00:13] <jelmer> lifeless: it's not in rc1 at least
[00:15] <SamB> jelmer: well, the long name can be meaningful
[00:16] <SamB> short names are often pretty crazy, so probably won't bother people
[00:19] <lifeless> I don't think thats a good reason to use a crazy short option
[00:20] <SamB> well, it's not quite crazy either ...
[00:20] <SamB> it actually *does* do a "bzr branch" under the covers, doesn't it?
[00:20] <lifeless> bzr branch?
[00:20] <lifeless> yes
[00:21] <SamB> so how is -b a crazy short name for the flag?
[00:21] <lifeless>      branch --branch
[00:21] <lifeless> would be the long version, if -b stands for branch
[00:21] <SamB> eh?
[00:22] <SamB> I thought it was "switch" we were talking about, sorry
[00:22] <lifeless> for switch I proposed --new
[00:22] <lifeless> in a loom you probably want a new thread
[00:22] <lifeless> in a pipeline a new pipe at the current place {like looms}
[01:11] <SamB> who should I talk to about bzr-fastimport?
[01:17] <jelmer> SamB: ianc
[01:23] <SamB> hmm, is there some command-line equivalent of BZR_PDB=1 ?
[01:29] <bob2> jelmer: yes, branching into a dir inside a git repo
[01:33] <jelmer> SamB: not that I'm aware of
[01:34] <SamB> 'twould be useful for running bzr under gud, I think
[01:34] <jelmer> bob2: that's the equivalent of trying to push from bzr into git, which doesn't work yet
[01:34] <jelmer> SamB: gud?
[01:34] <SamB> jelmer: basically, s/gud/emacs/
[01:35] <SamB> gud is the bit that integrates debuggers into the UI
[01:35] <SamB> so, like, you'd see stuff in the left margin
[01:47] <bob2> jelmer: cd gitmanageddir/something/somethingelse ; bzr co /brbranch ?
[02:08] <lifeless> SamB: what do you mean command-line equivalent?
[02:15] <SamB> lifeless: I mean, an argument
[02:15] <SamB> that is, a flag
[02:15] <lifeless> no
[02:16] <SamB> for some reason M-x pdb doesn't like it if I enter an environment-variable setting before the command to run :-(
[03:04] <mtaylor> lifeless: question on MOTU process...
[03:04] <mtaylor> lifeless: there are two different processes, one for packages that are in ubuntu already, and one for ones that aren't... do packages that are auto-imported from debian but have no truly ubuntu specific package count as the former or the later?
[03:17] <lifeless> uhm
[03:18] <lifeless> there aren't really two processes
[03:18] <lifeless> or I don't know what you mean
[03:18] <lifeless> are you talking about new packages, or changes to an existing package
[03:32] <mtaylor> lifeless: well, that's the question - if the package is in but only via automatic debian import, and I want to upload a version to ubuntu - does that count as changes to an existing package, or as a new package?
[03:32] <lifeless> its a change to an existing package
[03:33] <mtaylor> ok
[03:33] <lifeless> but the process is the same
[03:33] <lifeless> which is why I don't really know what you mean
[03:33] <mtaylor> so - there was this place that said changes to existing packages shouldn't use revu, but instead should attach debdiffs to bug reports against the package
[03:35] <mtaylor> lifeless: https://wiki.ubuntu.com/SponsorshipProcess ... linked to from https://wiki.ubuntu.com/MOTU/Packages/REVU
[03:36] <lifeless> ok
[03:37] <lifeless> so uhm, I guess thts a different process
[03:37] <lifeless> but the basics: review the delta, universe-sponsors-queue, upload, are the same
[03:37] <lifeless> regardless of new package or change to existing
[03:37] <mtaylor> sure...
[03:38] <mtaylor> but my process to request review as an external-n00b-luser is quite different
[03:38] <lifeless> and in fact, REVU is meant to be replaced by lp code reviews eventually ;)
[03:38] <mtaylor> k
[05:39] <SamB> jelmer: nice, that subunit you uploaded actually works ;-)
[05:39] <SamB> I mean, not only can I use it, but dpkg stops uselessly trying to compile the code for Python 2.3 and is now *aware* that it works ;-)
[05:40] <SamB> (oddly enough, I could actually use it even before that :-)
[06:05] <jml> jelmer, http://code.mumak.net/2009/07/unittest-it-aint-broke-lets-fix-it.html
[08:10] <mrooney> Anyone know how to use the bzr pager plugin?
[08:10] <mrooney> I figured I could just install it and then a command like "bzr cdiff" would just do the right thing and go to less with more than a screen of output
[08:10] <mrooney> But apparently that isn't right.
[10:22] <Jesse1> hi
[10:22] <jelmer> hi jml
[10:22] <jelmer> hi Jesse1 I mean :-)
[10:22] <jml> jelmer, hello :)
[10:22] <jml> I'll take your greeting as it stands.
[10:22] <Jesse1> i'm new to irc
[10:22] <Jesse1> and bzr
[10:23] <Jesse1> i'm thinking of using bzr to track wikipedia entries
[10:23] <Jesse1> so as to reduce the load on wikipedia servers
[10:23] <Jesse1> but i don't know how i can manipulate the revision ids a la bzr-svn
[10:25] <Jesse1> i'm not a registered freenode user, so i'm not sure if what i said was heard at all...
[10:25] <ndurner> We hear you :-)
[10:26] <Jesse1> sweet
[10:27] <Jesse1> as i understand, bzr-svn does the rev-id manipulation at SvnBranch level, so branching from a svn repo already gets the cooked rev-id's
[10:28] <Jesse1> but what i want to do doesn't sound as complicated as that
[10:29] <Jesse1> s/what/what if/
[10:29] <Jesse1> ouch that was wrong
[10:30] <Jesse1> so i'm thinking if i can generate revision ids for wikipedia entries e.w.o/w/foo&oldid=1234
[10:30] <Jesse1> as en.wikipedia.org-foo:1234
[10:30] <Jesse1> and stuff such a revision in the repo?
[10:31] <jelmer> Jesse1: yes, but you'll probably have to do the same sort of thing as bzr-svn to do so
[10:31] <Jesse1> they subclassed bzrlib.branch.Branch
[10:31] <Jesse1> wait, "they" is actually you
[10:32] <jelmer> Jesse1: alternatively, you could create a Python script that just does an import from wikipedia into a bzr branch
[10:32] <Jesse1> a silly etiquette question: shall i prefix my messages with the intended recipient?
[10:32] <Jesse1> and how do i massage the revision ids?
[10:33] <jelmer> Jesse1: you can't change revision ids after the revision has been added, but when creating a new revision from within the bzr API you cna specify the new revision id
[10:33] <spiv> Jesse1: perhap you can generate a fast-import file of your data and import that?
[10:33]  * spiv isn't really here...
[10:34] <Jesse1> i recalled parent revisions can be changed?
[10:36] <Jesse1> jelmer: so i can specify the new revision id when creating new revision?
[10:36] <jelmer> Jesse1: parent revision ids can't be changed either
[10:36] <jelmer> Jesse1: yes, when creating a new revision you can specify the new revision id (but only from the API, this is not exposed on the command-line)
[10:36] <Jesse1> suer i understand
[10:37] <Jesse1> WorkingTree.commit() doesn't seem to have a place for revision id?
[10:39] <jelmer> Jesse1: it does, IIRC it's called "rev_id"
[10:39] <Jesse1> since bzrlib.workingtree.WorkingTree doesn't have docstring on commit()
[10:39] <Jesse1> i can only guess from the argument names
[10:39] <Jesse1> and i guess rev_id is parceled in *args?
[10:40]  * jelmer nods
[10:40] <Jesse1> what's the triple star in front of your name? (sorry i'm such a newbie)
[10:41] <jelmer> oh, it indicates an action
[10:41] <Jesse1> oic
[10:41] <Jesse1> thx
[10:42] <Jesse1> undocumented *args is eveil...
[10:43] <ronny> moin
[10:43] <Jesse1> thanks jelmer jml & spiv
[10:43] <jelmer> moin ronny
[10:43] <Jesse1> i'll look more into the docs and try
[10:44] <jml> Jesse1, I didn't do anything :)
[10:44] <Jesse1> oh really
[10:44] <Jesse1> there's never too much gracias
[10:45] <Jesse1> bye
[13:43] <Muttley> hi, I'm using bzr-svn to push my bzr branch up to the wordpress svn server and I've just realised it's trying to download the revision info for the entire repository
[13:44] <Muttley> did i screw up somewhere or is that just how it works
[13:44] <LarstiQ> fsvo download, that is how it works
[13:45] <Muttley> basically I had my bzr branch that I work in and just did: bzr push http://svn.wp-plugins.org/myplugin/trunk/
[13:45] <LarstiQ> but the revision info getting of the entire repository bzr-svn needs to do, it caches, and is pretty fast
[13:45] <LarstiQ> Muttley: which version of bzr and bzr-svn?
[13:46] <Muttley> it's windows release (don't hate me) 1.16.1
[13:46] <Muttley> not sure the plugin version
[13:46] <LarstiQ> Muttley: don't worry, we won't hate you fot using Windows.
[13:47] <LarstiQ> Muttley: `bzr plugins` will tell you, but bzr-svn is pretty strict in which versions of bzr it works with
[13:47] <Muttley> hehe, I'm actually a linux guy but I've been doing this dev in windows
[13:47] <LarstiQ> so that is probably 0.6.2
[13:47] <LarstiQ> Muttley: don't hate yourself then? ;)
[13:47] <Muttley> 0.6.3dev
[13:47] <Muttley> LarstiQ: hehe
[13:48] <LarstiQ> Muttley: I imagine the wp-plugins repository is huge? (Ie, where is bzr-svn's progress bar at?)
[13:48] <Muttley> just the wordpress plugin repository is quite big
[13:48] <Muttley> progress bar about 25%
[13:48] <Muttley> been going about an hour
[13:49] <Muttley> I'm out in asia at the moment so it's going between 5 and 10 K/sec
[13:49] <Muttley> up to 20meg so far
[13:50] <Muttley> is there anyway around it or am I just in for a long night? :)
[13:52] <LarstiQ> Muttley: could you paste the line it is showing? It has multiple phases and I'd like to be sure it is at the phase I think it is at
[13:53] <Muttley> [####/               ] http    20435KB    13KB/s | fetching svn revision info 3
[13:53] <Muttley> I think that 3 is actually more like 3xx or 3xxx
[13:53] <Muttley> just it cut of at the useful 80 char cmd promt limit
[13:54] <Muttley> my plugin trunk was created a few hours ago and was revision 136629
[13:54] <LarstiQ> ah
[13:54] <Muttley> so it could be 3xxxx that it's currently on
[13:55] <LarstiQ> Muttley: no way around this fetching svn revision info, but it is resumable, and will happen with any operation against that repository
[13:55] <LarstiQ> evening AfC
[13:55] <Muttley> ok, so if I kill it and start again tomorrow it'll at least continue from where it left off?
[13:55] <LarstiQ> Muttley: yes
[13:56] <Muttley> ok
[13:56] <Muttley> thanks
[13:56] <LarstiQ> Muttley: do you know if you have tdb or sqlite?
[13:56] <Muttley> umm, pass
[13:56] <LarstiQ> Muttley: bzr-svn grew a capability to use tdb for caching this info, which is way way faster
[13:56]  * LarstiQ wonders what the installer uses
[13:56] <LarstiQ> Muttley: ok :)
[13:57] <Muttley> yeah, I was tempted to go the whole route of grabbing the dependences and source but in the end it seemed easier to just get the all-in-one installer ;)
[13:57] <LarstiQ> aye
[13:57] <Muttley> thanks for the help
[13:57] <LarstiQ> np
[13:58]  * AfC waves to LarstiQ
[14:15] <LarstiQ> jelmer: do you know if python-tdb is available on windows?
[14:15] <jelmer> LarstiQ: No, tdb hasn't been ported to windows (yet)
[14:16] <LarstiQ> jelmer: ok, so Windows users are stuck with sqlite then
[14:16] <jelmer> LarstiQ: yep, at least for now
[14:16] <LarstiQ> k
[14:33] <alex-weej> can someone tell me how i enable nautilus integration of bzr? i have bzr-gtk installed but nothing fancy happens when i open a repo folder
[14:36] <jelmer> alex-weej: you need to have python-nautilus installed
[14:38] <alex-weej> jelmer: i do have it installed
[14:38] <alex-weej> on ubuntu 9.04 btw
[15:58] <Raim> how can I let bzr forget my lp-login? already deleted ~/.bazaar/authentication.conf, but it seems like it gets it again from somewhere else
[15:58] <james_w> Raim: ~/.bazaar/bazaar.conf
[15:59] <Raim> james_w: ah... thanks, too obvious ;)
[16:24] <thewrath> how do i checkout a specific revision from bzr
[16:25] <LarstiQ> thewrath: -r <revision>
[16:25] <thewrath> bzr -r <revision> <locationtoputitinto> ?
[16:26] <LarstiQ> -r to the bzr command
[16:26] <LarstiQ> thewrath: say, `bzr branch url/to/source -r <revision> destination`
[16:26] <LarstiQ> thewrath: could you elaborate on the task at hand a bit more?
[16:27] <thewrath> just trying to copy a certain revision to another location
[16:27] <LarstiQ> thewrath: for what purpose?
[16:27] <LarstiQ> thewrath: for say making a tarball, you'd want `bzr export`
[16:28] <thewrath> i am modifiying a joomla education build and i want to have two  locations to have the same stuff
[16:28] <thewrath> one like for hte live site and one for the dev site
[16:30] <LarstiQ> thewrath: if I interpet that correctly, your original question was for how to deploy to the live site, right?
[16:30] <thewrath> does that make ense
[16:31] <thewrath> i wanted to createe another directory with the information from a certain revision
[16:31] <thewrath> so i guess yes
[16:32] <LarstiQ> thewrath: that sounds like something I would do with the bzr-upload plugin
[16:32] <LarstiQ> thewrath: as I wouldn't do any development on the live site, only deploy
[16:36] <thewrath> right
[16:36] <thewrath> i had my dev site set up as i wanted to do for my live site so all i had to do was essentially move it over
[16:36] <LarstiQ> right
[16:36] <thewrath> wat does the bzr-upload-plugin do, does it come standard with bzr?
[16:37] <LarstiQ> it doesn't come standard with bazaar, but is easy to install (will go over that in a bit)
[16:38] <LarstiQ> thewrath: it creates the files in your working tree in a remote location, but doesn't store all the history
[16:38] <LarstiQ> thewrath: and it is smart enough to only update it with the changes
[16:38] <LarstiQ> thewrath: not the entire set of files again each time
[16:39] <LarstiQ> thewrath: it is designed to work well for deployment on web application development
[16:39] <thewrath> nbice
[16:40] <LarstiQ> thewrath: you can either run `bzr upload` manually when you want to deploy something (optionally with -r to select a specific revision)
[16:40] <LarstiQ> thewrath: or turn on automatic mode where it will upload on each commit
[16:40] <LarstiQ> thewrath: how did you install your copy of bzr?
[16:42] <thewrath> i am in windows so the msi beileve
[16:42] <thewrath> *msi installer
[16:42] <LarstiQ> ok
[16:42] <LarstiQ> thewrath: does `bzr plugins` list the upload plugin?
[16:43] <thewrath> no it does not when i run bzr plugins
[16:43] <LarstiQ> ok
[16:44]  * LarstiQ isn't too experienced with the windows installer, so let's see how it goes
[16:44] <thewrath> ok,
[16:45] <thewrath> worst comes to worst i can just reinstll it
[16:45] <LarstiQ> thewrath: `bzr --version` should have a 'Bazaar configuration' directory listed
[16:45] <LarstiQ> thewrath: sure
[16:45] <thewrath> ok yes it does along with others
[16:48] <LarstiQ> thewrath: right, so if you cd there
[16:49] <LarstiQ> thewrath: and then `bzr branch lp:bzr-upload upload`
[16:49] <LarstiQ> thewrath: you'll get a copy of the upload plugin from Launchpad
[16:49] <LarstiQ> thewrath: after which it should show up in `bzr plugins`
[16:52] <thewrath> yeap its there now
[16:54] <LarstiQ> thewrath: ok, so the usage is, for the first time, `bzr upload LOCATION`, and afterwards just `bzr upload`
[16:54] <LarstiQ> thewrath: see `bzr help plugins/upload` and `bzr help upload`
[16:54] <LarstiQ> thewrath: and/or the README file inside the plugin dir
[16:55] <thewrath> ok
[16:55] <thewrath> can i change that for each different bzr project?
[16:56] <LarstiQ> thewrath: ah right, sorry, it remembers it for a specific branch
[16:56] <LarstiQ> thewrath: so yeah, each different bzr project is independent in its upload location
[16:58] <thewrath> so each bzr init remembers its own?
[16:59] <LarstiQ> thewrath: `bzr init` is only used to start a new project, but if you mean each branch, yes
[17:00] <LarstiQ> though you should be able to configure it for multiple branches in one sweep with locations.conf
[17:04] <dvheumen> hi, I've written a "patch" (it's childishly simple, but at least to learn something about python and bzr), how should I proceed to upload it? Just add it in a message to the bug? (https://bugs.launchpad.net/bzr/+bug/84659)
[17:05] <thewrath> yea LarstiQ that is wat i meant
[17:08] <LarstiQ> dvheumen: do you intend for it to be merged? Then `bzr send`ing it to merge@code.launchpad.net would be the thing to do
[17:08] <LarstiQ> dvheumen: attaching it to a bug is possible but not something we do often
[17:09] <dvheumen> LarstiQ: well it's a first for me, so I'll do what's the most common practice
[17:09] <dvheumen> LarstiQ: so if you say that bzr sending is the best, i'll do that
[17:09] <LarstiQ> dvheumen: it is
[17:09] <dvheumen> LarstiQ: okay, thanks for the info
[17:10] <LarstiQ> dvheumen: if you expect a lot of discussion, you could also send it to the mailing list with a subject prefixed with [RFC]
[17:11] <LarstiQ> but if it is childishly simple, probably not :)
[17:11] <dvheumen> LarstiQ: Well, it's basically a call to 'note' with a warning message, so I doubt it actually :D
[17:11] <dvheumen> (tagged as 'easy')
[17:11] <LarstiQ> dvheumen: good :)
[17:14] <LarstiQ> dvheumen: as a result of your `bzr send`, it should show up in https://code.launchpad.net/bzr/+activereviews
[17:14] <dvheumen> LarstiQ: ah, thanks, that's a good remark, I didn't know
[17:21] <dvheumen> LarstiQ: I'm curious, how do they match my patch with the bug report?
[17:22] <dvheumen> because I made this patch based on lp:bzr
[17:23] <LarstiQ> dvheumen: ah, maybe I should have instructed you more carefully :)
[17:24] <dvheumen> If there's some FAQ to read, just point me to it ... I don't mind ... but I have no idea of how to approach submitting a patch to bazaar/launchpad
[17:24] <dvheumen> I expected to just post the patch file with a comment in the bug report
[17:24] <dvheumen> until I heard your approach :P
[17:24] <LarstiQ> dvheumen: mention the bug in the subject, say 'add a warning for foo (#84659)'
[17:26] <alex-weej> can someone tell me how i enable nautilus integration of bzr? i have bzr-gtk installed but nothing fancy happens when i open a repo folder
[17:26] <dvheumen> okay, I'll be back in about half an hour and I'll give it a try, tnx
[17:26] <LarstiQ> alex-weej: does the README of bzr-gtk mention anything?
[17:27] <LarstiQ> dvheumen: k, see you then
[17:27] <alex-weej> LarstiQ: probably?
[17:27] <LarstiQ> alex-weej: sooo?
[17:27]  * LarstiQ doesn't use a desktop environment
[17:27] <alex-weej> hardcore
[17:27] <alex-weej> it just said i need to install python-nautilus to use nautilus integration
[17:27] <alex-weej> i already have that
[17:28] <LarstiQ> not really, I just am hopelessly ineffective in them
[17:28] <alex-weej> oh wait there is more actually, i need to symlink something to enable it
[17:28] <LarstiQ> alex-weej: right
[17:28] <alex-weej> hm, nautilus needs proper plugin management :/
[17:28] <alex-weej> thanks
[17:30] <alex-weej> LarstiQ: actually, turns out the plugin is just missing from the deb :/
[17:31] <LarstiQ> alex-weej: d'oh
[17:31] <LarstiQ> alex-weej: which deb/distro is that?
[17:31] <alex-weej> ubuntu 9.04
[17:32] <LarstiQ> ho hum
[17:32] <alex-weej> no wait, i found it! it's bundled in with the rest of the bzrlib for some reason
[17:32] <alex-weej> even though it's a nautilus plugin
[17:32] <alex-weej> :F
[17:32] <LarstiQ> alex-weej: mind filing some bugs on Ubuntu? :)
[17:33] <alex-weej> packaging error, yeah will do
[17:35] <alex-weej> nah still doesn't work, ImportError: cannot import name cmd_gannotate
[17:37] <alex-weej> i guess it has bitrotten :(
[17:40] <LarstiQ> alex-weej: that is possible. Where does it try to import gannotate from? It is, or used to be, part of bzr-gtk
[17:40] <alex-weej> bzrlib.plugins.gtk
[17:41] <jelmer> alex-weej: that's fixed in bzr-gtk trunk
[17:44] <Pilky> hey all, anyone around who's pretty well versed with how bzrlib works?
[17:45] <Pilky> I'm trying to understand how authentication works when accessing servers. I've found the code to do various commands in bzr, found the code that seems to get the password or prompt the user but I can't find the code that links the two
[17:46] <Pilky> if anyone could point me in the right direction it'd be much appreciated :)
[17:49] <LarstiQ> Pilky: have you found credential stores?
[17:50] <Pilky> yeah, I've found the stuff in config.py
[17:50] <LarstiQ> good
[17:51] <Pilky> it's more a case of I can't find where commands like push and commit etc access those
[17:52] <LarstiQ> Pilky: bzrlib/transport/
[17:54] <LarstiQ> Pilky: that is, commands don't do that, they try to connect to a location, and the underlying transport takes care of authentication
[17:55] <Pilky> right
[17:56] <Pilky> what I'm wanting to do is hijack the authentication prompt really
[17:56] <LarstiQ> Pilky: for comparison, have a look at lp:hitchhiker, which builds on bzr transports
[17:57] <Pilky> so instead of prompting for a password on the command line, I can pass in a password given to me by the user in a GUI
[17:57] <LarstiQ> Pilky: in what way? Is it just because you want to prevent a UI.. right
[17:57] <Pilky> yeah
[17:57] <LarstiQ> Pilky: look at bzrlib/ui
[17:58] <LarstiQ> Pilky: you want a UIFactory implementing get_password
[17:58] <LarstiQ> Pilky: for a comparison of _that_ you could look at qbzr for a Qt UIFactory
[17:58] <Pilky> ok cool
[17:59] <Pilky> so that would allow me to stop it from prompting the user in the UI and I can just return my own password
[17:59] <LarstiQ> Pilky: how you phrased your question at first I didn't know if I knew enough bzrlib, but I'm glad you just asked your question :)
[17:59] <Pilky> heh
[18:00] <LarstiQ> Pilky: if you so wish, though that might not be the right approach if I understand you correctly
[18:00] <LarstiQ> Pilky: it is the way to not get prompting on the cli
[18:00] <Pilky> well basically I'm building an Objective-C API
[18:00] <LarstiQ> Pilky: but if you have something more of a CredentialStore, that api would be better
[18:00] <LarstiQ> Pilky: I know :)
[18:01] <Pilky> I want to be able to get the password from the Mac's keychain
[18:01] <Pilky> authentication is the one thing that kills any project trying to tie into bzr using the CLI interface
[18:01] <LarstiQ> Pilky: bzr-svn might already do something like that
[18:01] <Pilky> well I'll have a look into bzr-svn and qbzr
[18:03] <LarstiQ> Pilky: iirc jfroy added support for keychain authentication
[18:04] <jfroy> Indeed
[18:05] <jfroy> onnnne second
[18:05] <Pilky> ah that would be useful
[18:06] <jfroy> it is :)
[18:06] <Pilky> if I can just write to keychain to set up authentication and get bzr to read from there it'd make things a LOT easier
[18:06] <jfroy> at least for bzr-svn
[18:09] <Pilky> jfroy: is it in your branch of bzr-svn or in the trunk?
[18:10] <jfroy> neither
[18:10] <Pilky> where is it then?
[18:15] <Pilky> jfroy: ?
[18:15] <jfroy> working on it :p
[18:17] <jfroy> Cleaned it up a bit, pushing to LP
[18:20] <Pilky> ah cool
[18:22] <dvheumen> hey, how can I "update" (in svn terms) to a previous revision? I've found 'revert -r #' but it leaves modifications (of newer revisions) behind.
[18:23] <jfroy> dvheumen: you can't
[18:23] <jfroy> bzr doesn't support doing that
[18:23] <jfroy> your only option is to lightweight checkout to the revision you want
[18:23] <dvheumen> hmmmm...
[18:23] <jfroy> e.g. bzr co --lightweight -r FOO some_directory
[18:23] <Pilky> dvheumen: you can try clean-tree
[18:23] <dvheumen> but I probably could do: bzr remove-tree; bzr co -r #
[18:23] <jfroy> And yes it's silly, and the bzr developers don't seem to think so
[18:23] <jfroy> dvheumen: yes, that should also work
[18:23] <dvheumen> Pilky: nothing to delete
[18:23] <Pilky> that should remove unknown files
[18:24] <Pilky> dvheumen: try bzr clean-tree --detritus
[18:25] <jfroy> Huh, hitting a ERROR: bzrlib.errors.IllegalUseOfScopeReplacer exception
[18:25] <jfroy> Pilky: hold on :p
[18:25] <Pilky> lol
[18:25] <Pilky> I swear I'm going to regret taking this project on :p
[18:25] <Pilky> at least I'm only committing a day a week to it at the moment
[18:26] <jfroy> apparently, this is bad: from bzrlib.plugins.keychain import _keychain
[18:26] <jfroy> (_keychain is an extension module in the plug-in, the plug-in itself is bzr-keychain (and the package name is keychain))
[18:26] <dvheumen> Pilky: thanks, but it's too late :P
[18:27] <Pilky> wasn't giving plugin names a bzr- prefix deprecated?
[18:29] <abeaumont> is it possible to tell bzr svn to do a branch from a certain revision (like git svn does?), without importing whole history
[18:30] <garyvdm> jfroy: if you have a project named bzr-xxx, it's directory in ~/.bazaar/plugins should just be xxx
[18:30] <jfroy> garyvdm: that's what I have
[18:30] <jfroy> I think the lazy imporer is using _foo for import foo
[18:30] <jfroy> and so dies if trying to import a module actually named _foo
[18:31] <garyvdm> jfroy: Ok - sorry - I miss understood you
[18:32] <Pilky> jfroy: you know if this works then it could simplify my code a huge amount
[18:32] <Pilky> I could do it all using NSTask and NSXML*
[18:32] <jfroy> oh it does work
[18:32] <Pilky> which also simplifies the licencing
[18:33] <jfroy> I use it all the time at work to interface with svn repositories
[18:33] <jfroy> I licensed it under BSD
[18:33] <Pilky> cool
[18:33] <jfroy> garyvdm: urg no that's not it
[18:33] <jfroy> what the heck is going on :|
[18:34] <Pilky> my issue before was I'd have to hook into bzrlib directly so I'd need to make part of my code GPL licensed, but then the developer facing API would be MIT licensed and talk to the backend via distributed objects
[18:34] <Pilky> basically, not very pretty :P
[18:34] <jfroy> Is this valid inside lazy_import.lazy_import?
[18:34] <jfroy> from bzrlib.plugins.keychain import cKeychain
[18:35] <jfroy> where the plug-in package is indeed keychain, and is named as such in the plugins directory
[18:35] <jfroy> Pilky: I don't think that's a good idea...
[18:35] <jfroy> bzr is GPL, so you should make your tool GPL as well.
[18:35] <jfroy> DOs will make things way, way more complicated
[18:35] <LarstiQ> jfroy: what is cKeychain, a class?
[18:36] <jfroy> If you use the bzr CLI, I guess it would be fine
[18:36] <jfroy> LarstiQ: an extension module in the package
[18:36] <LarstiQ> jfroy: ah
[18:36] <Pilky> jfroy: I don't want to make it GPL as I want the GUI to be MIT licenced
[18:36] <jfroy> zohar:keychain bahamut$ pwd
[18:36] <jfroy> zohar:keychain bahamut$ ls
[18:36] <jfroy> LICENSE      README       __init__.py  __init__.pyc build        cKeychain.c  cKeychain.so setup.py
[18:36] <jfroy> thanks IRC...
[18:36] <jfroy>  /Users/bahamut/.bazaar/plugins/keychain
[18:36] <Pilky> plus then my lib could be used by closed source projects
[18:36] <LarstiQ> jfroy: could you try importing bzrlib.plugins.keychain (maybe as mod_keychain or such) and working off of that?
[18:37] <jfroy> LarstiQ: sure
[18:37] <jfroy> Is there an issue with lazy import that I should be aware of (for future reference and edification)
[18:37] <LarstiQ> jfroy: a couple, they really should be written down somewhere.
[18:38]  * LarstiQ looks for it
[18:39] <LarstiQ> jfroy: from HACKING: While it is possible for ``lazy_import()`` to import members of a module when using the ``from module import member`` syntax, it is recommended to
[18:40] <LarstiQ> only use that syntax to load sub modules ``from module import submodule``.
[18:40] <LarstiQ> This is because variables and classes can frequently be used without needing a sub-member
[18:40] <jfroy> well the issue is just that importing that sub-module outright dies
[18:40] <LarstiQ> jfroy: right, which isn't mentioned
[18:41] <LarstiQ> jfroy: so I'm not aware of that being a limitation
[18:41] <LarstiQ> jfroy: can I use the keychain plugin on non-OSX?
[18:41] <jfroy> No :p
[18:42] <jfroy> I think it's a case of the stupids
[18:42] <jfroy> one moment...
[18:42] <jfroy> yup
[18:42] <jfroy> didn't refactor the module name in the C extension file >.<
[18:46] <jfroy> OK no it still dies
[18:46] <jfroy> IllegalUseOfScopeReplacer: ScopeReplacer object 'cKeychain' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory
[18:47] <jfroy> (for from bzrlib.plugins.keychain import cKeychain)
[18:47] <LarstiQ> jfroy: that is a lazy import error
[18:48] <jfroy> doing the import in the module itself (the plug-in's __init__ module) works fine
[18:48] <jfroy> that's OK
[18:49] <jfroy> worked around ot
[18:49] <jfroy> *it
[18:49] <jfroy> def lazy_import_cKeychain():
[18:49] <jfroy>     global cKeychain
[18:49] <jfroy>     cKeychain = __import__('bzrlib.plugins.keychain.cKeychain', globals(), locals(), [], 0)
[18:49] <jfroy> :P
[18:49] <jfroy> innteresting, that seems broken too
[18:54] <LarstiQ> ahem :P
[18:54] <jfroy> did I do something stupid?
[18:54] <jfroy> :/
[18:55]  * LarstiQ has a look at the code
[18:58] <jfroy> cKeychain = __import__('cKeychain', globals(), locals(), [], 1) did the trick
[19:00] <jfroy> uh-ho
[19:00] <jfroy> converted the branch to 2a
[19:00] <jfroy> And now bzr pack is giving me bzr: ERROR: Pack '3dcf256d8340362428db62217ca32a0d' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x1018d9490>
[19:00] <LarstiQ> doesn't that mean you don't need to pack?
[19:00] <LarstiQ> scarily worded
[19:01] <Pilky> jfroy: that's your own fault for using a crappy VCS, use subversion! ;)
[19:01] <jelmer> jfroy: which version of bzr are you using?
[19:01] <jfroy> LarstiQ: does it?
[19:01] <jfroy> 1.17rc1
[19:02] <jfroy> Pilky: apologies for the delay
[19:02] <jfroy> https://launchpad.net/bzr-keychain
[19:02] <Pilky> jfroy: a short delay for the amount of time you could save me is a small price to pay ;)
[19:03] <Pilky> still trying to push?
[19:03] <jfroy> I did
[19:03] <jfroy> should be on LP
[19:03] <Pilky> ah
[19:03] <Pilky> it must not have registered it in the UI yet
[19:03] <jfroy> ah huh hold on
[19:03] <jfroy> haven't set a development focus yet
[19:04] <jfroy> there, done
[19:04] <jfroy> bzr branch lp:bzr-keychain keychain
[19:04] <jfroy> jelmer:  LarstiQ  you can grab the branch to check that pack issue if you want
[19:05] <jelmer> jfroy: this is a known bug, but I thought it had already been fixed
[19:05] <jfroy> I see
[19:05] <jelmer> jfroy: if a 2a repository is already packed then "bzr pack" will generate the exact same file
[19:05] <jelmer> jfroy: and thus you get this error
[19:05] <jfroy> gotcha
[19:06] <jelmer> jfroy: this situation should probably be special cased or something
[19:07] <jfroy> Pilky: that being said, maybe the DO approach is not so bad
[19:07] <jfroy> As bad as it is, using NSTask is even worse
[19:07] <Pilky> jfroy: your setup script doesn't seem to work
[19:08] <jfroy> the cost is launching the Python interpreter is non-trivial
[19:08] <jfroy> Pilky: oh?
[19:08] <Pilky> from: can't read /var/mail/distutils.core
[19:08] <Pilky> ./setup.py: line 27: import: command not found
[19:08] <Pilky> ./setup.py: line 29: syntax error near unexpected token `name='bzr-keychain','
[19:08] <Pilky> ./setup.py: line 29: `setup(name='bzr-keychain','
[19:08] <LarstiQ> Pilky: run it with python
[19:08] <LarstiQ> jfroy: add a hashbang ;)
[19:08] <Pilky> bah *headdesk*
[19:08]  * jfroy follows Pilky 
[19:10] <jfroy> pushed >.>
[19:10] <jfroy> *ahem*
[19:11] <jfroy> Pilky: DO guidelines: 1) ONLY use async messages 2) ALWAYS wrap ANY DO message with try {} catch {}
[19:11] <jfroy> Should be fine beyond that.
[19:11] <Pilky> hmm
[19:12] <jfroy> sync messages WILL lead to deadlocks
[19:12] <jfroy> it's almost inevitable
[19:12] <jfroy> from experience
[19:12] <Pilky> yeah I was going to do everything asynchronously
[19:12] <jfroy> try {} catch {} because any DO message can throw an exception if the other end is gone for some reason (crash, etc.)
[19:13] <Pilky> I'm assuming that your plugin doesn't save to the keychain, only reads?
[19:13] <jfroy> We had amusing bugs much earlier on in [REDACTED] Leopard where mach ports would die for no reason. Caused havoc in DO apps that didn't guard properly :p
[19:13] <jfroy> it only reads, correct
[19:14] <jfroy> the credential store API in bzr doesn't have write AFAIK
[19:14] <jfroy> or does it....
[19:14] <LarstiQ> jfroy: when were you gettting cKeychain errors?
[19:14] <jfroy> LarstiQ: when lazily importing it
[19:14] <jfroy> using a "from bzrlib.plugins.keychain import cKeychain" in the lazy import list
[19:15] <jfroy> Pilky: in practice I've found this to be fine
[19:15] <Pilky> ok, so for example if I wanted to store my ssh password for launchpad I'd create an internet keychain with the url and password needed?
[19:15] <jfroy> connecting once to the svn repository using Safari or svn will add the credentials to the keychain
[19:15] <jfroy> Ah, there is *no need* for the plug-in for ssh
[19:16] <jfroy> I don't think credential stores are even queried for ssh
[19:16] <jfroy> Mac OS X since 10.5 integrates the sshkey agent with Keychain
[19:16] <jfroy> it Just Works™
[19:16] <Pilky> oh really?
[19:16] <jfroy> yup
[19:16] <jfroy> it's also lazily started by launchd
[19:16] <jfroy> (the key agent is a launchd agent, e.g. per-user session)
[19:16] <jelmer> write support to keychain/gnome keyring in bzr would be nice
[19:17] <jfroy> I don't think it's big deal, actually
[19:17] <jfroy> most people use anon http or ssh
[19:17] <jfroy> the only common case for authenticated http is bzr-svn.
[19:17] <LarstiQ> Pilky: for openssh, the thinking is that credentials are best left up to openssh not bzr
[19:18] <jfroy> IIRC ssh is special cased
[19:18] <jfroy> the credential stores are not used
[19:18]  * LarstiQ nods
[19:18] <LarstiQ> jfroy: it works when I do `bzr plugins`
[19:19] <LarstiQ> oh, but I didn't compile..
[19:19] <jfroy> it won't build on non-Mac OS X, since it uses the Keychain C API :|
[19:19] <LarstiQ> yeah
[19:21] <LarstiQ> jfroy: I would probably try 'import bzrlib.plugins.keychain.cKeychain' myself at first
[19:21] <jfroy> that probably will work, but then how do I use cKeychain
[19:22] <jfroy> If I know my Python at all, I think I'd have to use the full import name in code
[19:22] <jfroy> which is... long :|
[19:22] <LarstiQ> bzrlib.plugins.keychain.cKeychain.find_generic_password, which is indeed pretty long
[19:22] <LarstiQ> do you need to import it lazily?
[19:23] <jfroy> No, but it's always a good idea to be as lazy as possible
[19:23] <jfroy> bzr launch times are already bad as it is
[19:23] <jfroy> I worked around the issues and rolled my own lazy import with __import__
[19:23]  * LarstiQ noticed
[19:23] <jfroy> it's a small plug-in, and the C module is only used in one place, so it's acceptable
[19:23] <LarstiQ> jfroy: I'm wondering what makes it problematic though, will any C extension go wrong?
[19:26] <jfroy> dunno
[19:26] <jfroy> jelmer might have some ideas
[19:26] <jfroy> since his svn bindings used to be bundled with bzr-svn
[19:27]  * jelmer didn't really follow
[19:27] <jelmer> what's the question?
[20:11] <LarstiQ> gosh, is my upgrade of bzr.dev to 2a going slowly
[20:11] <LarstiQ> jelmer: jfroy ran into some errors with lazyimporting bzrlib.plugins.keychain.cKeychain, which is a C extension
[20:12] <LarstiQ> jelmer: so I wondered what made it problematic, did lazy importing subvertpy when it was part of bzr-svn give any trouble?
[20:14] <jelmer> LarstiQ: I don't think I ever lazy imported it
[20:15] <LarstiQ> jelmer: that calls for experimentation I guess! :)