/srv/irclogs.ubuntu.com/2009/07/19/#bzr.txt

jelmerlifeless: 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 slow00:00
lifelessjelmer: ok00:00
lifelessso the former - heres what I do00:01
lifelessbzr init-repo --no-trees proj00:01
lifelesscd proj00:01
lifelessbzr branch/init trunk00:01
lifelessbzr checkout --lightweight trunk working00:01
lifelessln -s $(pwd)/working ~/.bazaar/plugins/proj00:01
SamBhmm, isn't there a "bzr switch -b" or something lately added?00:02
lifelessSamB: yes00:02
lifelesstoday though, I use00:02
lifelessbzr push ../new-branch; bzr switch new-branch00:02
lifelessso its not ideal, but it is pretty easy00:03
SamBnot bad00:03
jelmerlifeless: ah, I hadn't considered "bzr push"00:03
lifelessjelmer: well, can also spell 'bzr branch . ../new-branch'00:03
lifelessor bzr branch ../trunk ../new-branch, if I want to be absolutely sure about provenance00:03
jelmerlifeless: but (now that we're talking about UI) I still consider this a big hassle compared to colocated branches00:04
lifelessjelmer: switch _should_ be very fast. please file bugs if its slow00:04
lifelessjelmer: typing .bzr/branches/new-branch would be equally awkward, I should think.00:05
lifelessjelmer: I think the big UI win of colocated branches isn't the colocation, its the search-path and location glue00:05
lifelessthis isn't to say I don't like colocated branches/git style branches; just that I'm trying to really understand what makes things good00:05
jelmerlifeless: yeah, perhaps git style branches is a better description than colocated branches.00:06
jelmerlifeless: the setup you did is nontrivial (more than one command)00:07
jelmerlifeless: and the combined action of creating and switching to a new branch is more than one command00:07
lifelessso, we're trying to plan a better UI before making many random changes00:07
lifelessjelmer: but have you seen jam's switch -b feature?00:08
jelmerlifeless: it breaks looms :-/00:09
SamBlifeless: please contribute any tips to GitStyleBranches ;-)00:10
jelmerlifeless: but no, I hadn't. That does indeed make the second bit easier00:10
lifelessjelmer: I'll fix looms up monday00:11
lifelessI wonder if perhaps it should be in switch --new or something00:11
jelmerlifeless: Yeah, --new would probably be more intuitive to new users00:12
lifelessdid it get into 1.17?00:12
jelmerlifeless: -b does remind me of the git argument, but other than that it doesn't make much sense00:12
jelmerlifeless: as far as I can tell it's only in  bzr.dev00:12
jelmerlifeless: it's not in rc1 at least00:13
SamBjelmer: well, the long name can be meaningful00:15
SamBshort names are often pretty crazy, so probably won't bother people00:16
lifelessI don't think thats a good reason to use a crazy short option00:19
SamBwell, it's not quite crazy either ...00:20
SamBit actually *does* do a "bzr branch" under the covers, doesn't it?00:20
lifelessbzr branch?00:20
lifelessyes00:20
SamBso how is -b a crazy short name for the flag?00:21
lifeless     branch --branch00:21
lifelesswould be the long version, if -b stands for branch00:21
SamBeh?00:21
SamBI thought it was "switch" we were talking about, sorry00:22
lifelessfor switch I proposed --new00:22
lifelessin a loom you probably want a new thread00:22
lifelessin a pipeline a new pipe at the current place {like looms}00:22
SamBwho should I talk to about bzr-fastimport?01:11
jelmerSamB: ianc01:17
SamBhmm, is there some command-line equivalent of BZR_PDB=1 ?01:23
bob2jelmer: yes, branching into a dir inside a git repo01:29
jelmerSamB: not that I'm aware of01:33
SamB'twould be useful for running bzr under gud, I think01:34
jelmerbob2: that's the equivalent of trying to push from bzr into git, which doesn't work yet01:34
jelmerSamB: gud?01:34
SamBjelmer: basically, s/gud/emacs/01:34
SamBgud is the bit that integrates debuggers into the UI01:35
SamBso, like, you'd see stuff in the left margin01:35
bob2jelmer: cd gitmanageddir/something/somethingelse ; bzr co /brbranch ?01:47
lifelessSamB: what do you mean command-line equivalent?02:08
SamBlifeless: I mean, an argument02:15
SamBthat is, a flag02:15
lifelessno02:15
SamBfor some reason M-x pdb doesn't like it if I enter an environment-variable setting before the command to run :-(02:16
mtaylorlifeless: question on MOTU process...03:04
mtaylorlifeless: 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:04
=== vxnick is now known as vxnick-AFK
lifelessuhm03:17
lifelessthere aren't really two processes03:18
lifelessor I don't know what you mean03:18
lifelessare you talking about new packages, or changes to an existing package03:18
mtaylorlifeless: 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
lifelessits a change to an existing package03:32
mtaylorok03:33
lifelessbut the process is the same03:33
lifelesswhich is why I don't really know what you mean03:33
mtaylorso - there was this place that said changes to existing packages shouldn't use revu, but instead should attach debdiffs to bug reports against the package03:33
mtaylorlifeless: https://wiki.ubuntu.com/SponsorshipProcess ... linked to from https://wiki.ubuntu.com/MOTU/Packages/REVU03:35
lifelessok03:36
lifelessso uhm, I guess thts a different process03:37
lifelessbut the basics: review the delta, universe-sponsors-queue, upload, are the same03:37
lifelessregardless of new package or change to existing03:37
mtaylorsure...03:37
mtaylorbut my process to request review as an external-n00b-luser is quite different03:38
lifelessand in fact, REVU is meant to be replaced by lp code reviews eventually ;)03:38
mtaylork03:38
SamBjelmer: nice, that subunit you uploaded actually works ;-)05:39
SamBI 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:39
SamB(oddly enough, I could actually use it even before that :-)05:40
jmljelmer, http://code.mumak.net/2009/07/unittest-it-aint-broke-lets-fix-it.html06:05
mrooneyAnyone know how to use the bzr pager plugin?08:10
mrooneyI 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 output08:10
mrooneyBut apparently that isn't right.08:10
Jesse1hi10:22
jelmerhi jml10:22
jelmerhi Jesse1 I mean :-)10:22
jmljelmer, hello :)10:22
jmlI'll take your greeting as it stands.10:22
Jesse1i'm new to irc10:22
Jesse1and bzr10:22
Jesse1i'm thinking of using bzr to track wikipedia entries10:23
Jesse1so as to reduce the load on wikipedia servers10:23
Jesse1but i don't know how i can manipulate the revision ids a la bzr-svn10:23
Jesse1i'm not a registered freenode user, so i'm not sure if what i said was heard at all...10:25
ndurnerWe hear you :-)10:25
Jesse1sweet10:26
Jesse1as i understand, bzr-svn does the rev-id manipulation at SvnBranch level, so branching from a svn repo already gets the cooked rev-id's10:27
Jesse1but what i want to do doesn't sound as complicated as that10:28
Jesse1s/what/what if/10:29
Jesse1ouch that was wrong10:29
Jesse1so i'm thinking if i can generate revision ids for wikipedia entries e.w.o/w/foo&oldid=123410:30
Jesse1as en.wikipedia.org-foo:123410:30
Jesse1and stuff such a revision in the repo?10:30
jelmerJesse1: yes, but you'll probably have to do the same sort of thing as bzr-svn to do so10:31
Jesse1they subclassed bzrlib.branch.Branch10:31
Jesse1wait, "they" is actually you10:31
jelmerJesse1: alternatively, you could create a Python script that just does an import from wikipedia into a bzr branch10:32
Jesse1a silly etiquette question: shall i prefix my messages with the intended recipient?10:32
Jesse1and how do i massage the revision ids?10:32
jelmerJesse1: 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 id10:33
spivJesse1: perhap you can generate a fast-import file of your data and import that?10:33
* spiv isn't really here...10:33
Jesse1i recalled parent revisions can be changed?10:34
Jesse1jelmer: so i can specify the new revision id when creating new revision?10:36
jelmerJesse1: parent revision ids can't be changed either10:36
jelmerJesse1: 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
Jesse1suer i understand10:36
Jesse1WorkingTree.commit() doesn't seem to have a place for revision id?10:37
jelmerJesse1: it does, IIRC it's called "rev_id"10:39
Jesse1since bzrlib.workingtree.WorkingTree doesn't have docstring on commit()10:39
Jesse1i can only guess from the argument names10:39
Jesse1and i guess rev_id is parceled in *args?10:39
* jelmer nods10:40
Jesse1what's the triple star in front of your name? (sorry i'm such a newbie)10:40
jelmeroh, it indicates an action10:41
Jesse1oic10:41
Jesse1thx10:41
Jesse1undocumented *args is eveil...10:42
ronnymoin10:43
Jesse1thanks jelmer jml & spiv10:43
jelmermoin ronny10:43
Jesse1i'll look more into the docs and try10:43
jmlJesse1, I didn't do anything :)10:44
Jesse1oh really10:44
Jesse1there's never too much gracias10:44
Jesse1bye10:45
=== vxnick-AFK is now known as vxnick
Muttleyhi, 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 repository13:43
Muttleydid i screw up somewhere or is that just how it works13:44
LarstiQfsvo download, that is how it works13:44
Muttleybasically I had my bzr branch that I work in and just did: bzr push http://svn.wp-plugins.org/myplugin/trunk/13:45
LarstiQbut the revision info getting of the entire repository bzr-svn needs to do, it caches, and is pretty fast13:45
LarstiQMuttley: which version of bzr and bzr-svn?13:45
Muttleyit's windows release (don't hate me) 1.16.113:46
Muttleynot sure the plugin version13:46
LarstiQMuttley: don't worry, we won't hate you fot using Windows.13:46
LarstiQMuttley: `bzr plugins` will tell you, but bzr-svn is pretty strict in which versions of bzr it works with13:47
Muttleyhehe, I'm actually a linux guy but I've been doing this dev in windows13:47
LarstiQso that is probably 0.6.213:47
LarstiQMuttley: don't hate yourself then? ;)13:47
Muttley0.6.3dev13:47
MuttleyLarstiQ: hehe13:47
LarstiQMuttley: I imagine the wp-plugins repository is huge? (Ie, where is bzr-svn's progress bar at?)13:48
Muttleyjust the wordpress plugin repository is quite big13:48
Muttleyprogress bar about 25%13:48
Muttleybeen going about an hour13:48
MuttleyI'm out in asia at the moment so it's going between 5 and 10 K/sec13:49
Muttleyup to 20meg so far13:49
Muttleyis there anyway around it or am I just in for a long night? :)13:50
LarstiQMuttley: 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 at13:52
Muttley[####/               ] http    20435KB    13KB/s | fetching svn revision info 313:53
MuttleyI think that 3 is actually more like 3xx or 3xxx13:53
Muttleyjust it cut of at the useful 80 char cmd promt limit13:53
Muttleymy plugin trunk was created a few hours ago and was revision 13662913:54
LarstiQah13:54
Muttleyso it could be 3xxxx that it's currently on13:54
LarstiQMuttley: no way around this fetching svn revision info, but it is resumable, and will happen with any operation against that repository13:55
LarstiQevening AfC13:55
Muttleyok, so if I kill it and start again tomorrow it'll at least continue from where it left off?13:55
LarstiQMuttley: yes13:55
Muttleyok13:56
Muttleythanks13:56
LarstiQMuttley: do you know if you have tdb or sqlite?13:56
Muttleyumm, pass13:56
LarstiQMuttley: bzr-svn grew a capability to use tdb for caching this info, which is way way faster13:56
* LarstiQ wonders what the installer uses13:56
LarstiQMuttley: ok :)13:56
Muttleyyeah, 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
LarstiQaye13:57
Muttleythanks for the help13:57
LarstiQnp13:57
* AfC waves to LarstiQ13:58
LarstiQjelmer: do you know if python-tdb is available on windows?14:15
jelmerLarstiQ: No, tdb hasn't been ported to windows (yet)14:15
LarstiQjelmer: ok, so Windows users are stuck with sqlite then14:16
jelmerLarstiQ: yep, at least for now14:16
LarstiQk14:16
alex-weejcan someone tell me how i enable nautilus integration of bzr? i have bzr-gtk installed but nothing fancy happens when i open a repo folder14:33
jelmeralex-weej: you need to have python-nautilus installed14:36
alex-weejjelmer: i do have it installed14:38
alex-weejon ubuntu 9.04 btw14:38
=== asabil_ is now known as asabil
Raimhow can I let bzr forget my lp-login? already deleted ~/.bazaar/authentication.conf, but it seems like it gets it again from somewhere else15:58
james_wRaim: ~/.bazaar/bazaar.conf15:58
Raimjames_w: ah... thanks, too obvious ;)15:59
thewrathhow do i checkout a specific revision from bzr16:24
LarstiQthewrath: -r <revision>16:25
thewrathbzr -r <revision> <locationtoputitinto> ?16:25
LarstiQ-r to the bzr command16:26
LarstiQthewrath: say, `bzr branch url/to/source -r <revision> destination`16:26
LarstiQthewrath: could you elaborate on the task at hand a bit more?16:26
thewrathjust trying to copy a certain revision to another location16:27
LarstiQthewrath: for what purpose?16:27
LarstiQthewrath: for say making a tarball, you'd want `bzr export`16:27
thewrathi am modifiying a joomla education build and i want to have two  locations to have the same stuff16:28
thewrathone like for hte live site and one for the dev site16:28
LarstiQthewrath: if I interpet that correctly, your original question was for how to deploy to the live site, right?16:30
thewrathdoes that make ense16:30
thewrathi wanted to createe another directory with the information from a certain revision16:31
thewrathso i guess yes16:31
LarstiQthewrath: that sounds like something I would do with the bzr-upload plugin16:32
LarstiQthewrath: as I wouldn't do any development on the live site, only deploy16:32
thewrathright16:36
thewrathi 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 over16:36
LarstiQright16:36
thewrathwat does the bzr-upload-plugin do, does it come standard with bzr?16:36
LarstiQit doesn't come standard with bazaar, but is easy to install (will go over that in a bit)16:37
LarstiQthewrath: it creates the files in your working tree in a remote location, but doesn't store all the history16:38
LarstiQthewrath: and it is smart enough to only update it with the changes16:38
LarstiQthewrath: not the entire set of files again each time16:38
LarstiQthewrath: it is designed to work well for deployment on web application development16:39
thewrathnbice16:39
LarstiQthewrath: you can either run `bzr upload` manually when you want to deploy something (optionally with -r to select a specific revision)16:40
LarstiQthewrath: or turn on automatic mode where it will upload on each commit16:40
LarstiQthewrath: how did you install your copy of bzr?16:40
thewrathi am in windows so the msi beileve16:42
thewrath*msi installer16:42
LarstiQok16:42
LarstiQthewrath: does `bzr plugins` list the upload plugin?16:42
thewrathno it does not when i run bzr plugins16:43
LarstiQok16:43
* LarstiQ isn't too experienced with the windows installer, so let's see how it goes16:44
thewrathok,16:44
thewrathworst comes to worst i can just reinstll it16:45
LarstiQthewrath: `bzr --version` should have a 'Bazaar configuration' directory listed16:45
LarstiQthewrath: sure16:45
thewrathok yes it does along with others16:45
LarstiQthewrath: right, so if you cd there16:48
LarstiQthewrath: and then `bzr branch lp:bzr-upload upload`16:49
LarstiQthewrath: you'll get a copy of the upload plugin from Launchpad16:49
LarstiQthewrath: after which it should show up in `bzr plugins`16:49
thewrathyeap its there now16:52
LarstiQthewrath: ok, so the usage is, for the first time, `bzr upload LOCATION`, and afterwards just `bzr upload`16:54
LarstiQthewrath: see `bzr help plugins/upload` and `bzr help upload`16:54
LarstiQthewrath: and/or the README file inside the plugin dir16:54
thewrathok16:55
thewrathcan i change that for each different bzr project?16:55
LarstiQthewrath: ah right, sorry, it remembers it for a specific branch16:56
LarstiQthewrath: so yeah, each different bzr project is independent in its upload location16:56
thewrathso each bzr init remembers its own?16:58
LarstiQthewrath: `bzr init` is only used to start a new project, but if you mean each branch, yes16:59
LarstiQthough you should be able to configure it for multiple branches in one sweep with locations.conf17:00
dvheumenhi, 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:04
ubottuUbuntu bug 84659 in bzr ""serve --allow-writes" allows more than you might think" [Medium,Triaged]17:04
thewrathyea LarstiQ that is wat i meant17:05
LarstiQdvheumen: do you intend for it to be merged? Then `bzr send`ing it to merge@code.launchpad.net would be the thing to do17:08
LarstiQdvheumen: attaching it to a bug is possible but not something we do often17:08
dvheumenLarstiQ: well it's a first for me, so I'll do what's the most common practice17:09
dvheumenLarstiQ: so if you say that bzr sending is the best, i'll do that17:09
LarstiQdvheumen: it is17:09
dvheumenLarstiQ: okay, thanks for the info17:09
LarstiQdvheumen: if you expect a lot of discussion, you could also send it to the mailing list with a subject prefixed with [RFC]17:10
LarstiQbut if it is childishly simple, probably not :)17:11
dvheumenLarstiQ: Well, it's basically a call to 'note' with a warning message, so I doubt it actually :D17:11
dvheumen(tagged as 'easy')17:11
LarstiQdvheumen: good :)17:11
LarstiQdvheumen: as a result of your `bzr send`, it should show up in https://code.launchpad.net/bzr/+activereviews17:14
dvheumenLarstiQ: ah, thanks, that's a good remark, I didn't know17:14
dvheumenLarstiQ: I'm curious, how do they match my patch with the bug report?17:21
dvheumenbecause I made this patch based on lp:bzr17:22
LarstiQdvheumen: ah, maybe I should have instructed you more carefully :)17:23
dvheumenIf 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/launchpad17:24
dvheumenI expected to just post the patch file with a comment in the bug report17:24
dvheumenuntil I heard your approach :P17:24
LarstiQdvheumen: mention the bug in the subject, say 'add a warning for foo (#84659)'17:24
alex-weejcan someone tell me how i enable nautilus integration of bzr? i have bzr-gtk installed but nothing fancy happens when i open a repo folder17:26
dvheumenokay, I'll be back in about half an hour and I'll give it a try, tnx17:26
LarstiQalex-weej: does the README of bzr-gtk mention anything?17:26
LarstiQdvheumen: k, see you then17:27
alex-weejLarstiQ: probably?17:27
LarstiQalex-weej: sooo?17:27
* LarstiQ doesn't use a desktop environment17:27
alex-weejhardcore17:27
alex-weejit just said i need to install python-nautilus to use nautilus integration17:27
alex-weeji already have that17:27
LarstiQnot really, I just am hopelessly ineffective in them17:28
alex-weejoh wait there is more actually, i need to symlink something to enable it17:28
LarstiQalex-weej: right17:28
alex-weejhm, nautilus needs proper plugin management :/17:28
alex-weejthanks17:28
alex-weejLarstiQ: actually, turns out the plugin is just missing from the deb :/17:30
LarstiQalex-weej: d'oh17:31
LarstiQalex-weej: which deb/distro is that?17:31
alex-weejubuntu 9.0417:31
LarstiQho hum17:32
alex-weejno wait, i found it! it's bundled in with the rest of the bzrlib for some reason17:32
alex-weejeven though it's a nautilus plugin17:32
alex-weej:F17:32
LarstiQalex-weej: mind filing some bugs on Ubuntu? :)17:32
alex-weejpackaging error, yeah will do17:33
alex-weejnah still doesn't work, ImportError: cannot import name cmd_gannotate17:35
alex-weeji guess it has bitrotten :(17:37
LarstiQalex-weej: that is possible. Where does it try to import gannotate from? It is, or used to be, part of bzr-gtk17:40
alex-weejbzrlib.plugins.gtk17:40
jelmeralex-weej: that's fixed in bzr-gtk trunk17:41
Pilkyhey all, anyone around who's pretty well versed with how bzrlib works?17:44
PilkyI'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 two17:45
Pilkyif anyone could point me in the right direction it'd be much appreciated :)17:46
LarstiQPilky: have you found credential stores?17:49
Pilkyyeah, I've found the stuff in config.py17:50
LarstiQgood17:50
Pilkyit's more a case of I can't find where commands like push and commit etc access those17:51
LarstiQPilky: bzrlib/transport/17:52
LarstiQPilky: that is, commands don't do that, they try to connect to a location, and the underlying transport takes care of authentication17:54
Pilkyright17:55
Pilkywhat I'm wanting to do is hijack the authentication prompt really17:56
LarstiQPilky: for comparison, have a look at lp:hitchhiker, which builds on bzr transports17:56
Pilkyso instead of prompting for a password on the command line, I can pass in a password given to me by the user in a GUI17:57
LarstiQPilky: in what way? Is it just because you want to prevent a UI.. right17:57
Pilkyyeah17:57
LarstiQPilky: look at bzrlib/ui17:57
LarstiQPilky: you want a UIFactory implementing get_password17:58
LarstiQPilky: for a comparison of _that_ you could look at qbzr for a Qt UIFactory17:58
Pilkyok cool17:58
Pilkyso that would allow me to stop it from prompting the user in the UI and I can just return my own password17:59
LarstiQPilky: 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
Pilkyheh17:59
LarstiQPilky: if you so wish, though that might not be the right approach if I understand you correctly18:00
LarstiQPilky: it is the way to not get prompting on the cli18:00
Pilkywell basically I'm building an Objective-C API18:00
LarstiQPilky: but if you have something more of a CredentialStore, that api would be better18:00
LarstiQPilky: I know :)18:00
PilkyI want to be able to get the password from the Mac's keychain18:01
Pilkyauthentication is the one thing that kills any project trying to tie into bzr using the CLI interface18:01
LarstiQPilky: bzr-svn might already do something like that18:01
Pilkywell I'll have a look into bzr-svn and qbzr18:01
LarstiQPilky: iirc jfroy added support for keychain authentication18:03
jfroyIndeed18:04
jfroyonnnne second18:05
Pilkyah that would be useful18:05
jfroyit is :)18:06
Pilkyif I can just write to keychain to set up authentication and get bzr to read from there it'd make things a LOT easier18:06
jfroyat least for bzr-svn18:06
Pilkyjfroy: is it in your branch of bzr-svn or in the trunk?18:09
jfroyneither18:10
Pilkywhere is it then?18:10
Pilkyjfroy: ?18:15
jfroyworking on it :p18:15
jfroyCleaned it up a bit, pushing to LP18:17
Pilkyah cool18:20
dvheumenhey, 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:22
jfroydvheumen: you can't18:23
jfroybzr doesn't support doing that18:23
jfroyyour only option is to lightweight checkout to the revision you want18:23
dvheumenhmmmm...18:23
jfroye.g. bzr co --lightweight -r FOO some_directory18:23
Pilkydvheumen: you can try clean-tree18:23
dvheumenbut I probably could do: bzr remove-tree; bzr co -r #18:23
jfroyAnd yes it's silly, and the bzr developers don't seem to think so18:23
jfroydvheumen: yes, that should also work18:23
dvheumenPilky: nothing to delete18:23
Pilkythat should remove unknown files18:23
Pilkydvheumen: try bzr clean-tree --detritus18:24
jfroyHuh, hitting a ERROR: bzrlib.errors.IllegalUseOfScopeReplacer exception18:25
jfroyPilky: hold on :p18:25
Pilkylol18:25
PilkyI swear I'm going to regret taking this project on :p18:25
Pilkyat least I'm only committing a day a week to it at the moment18:25
jfroyapparently, this is bad: from bzrlib.plugins.keychain import _keychain18: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
dvheumenPilky: thanks, but it's too late :P18:26
Pilkywasn't giving plugin names a bzr- prefix deprecated?18:27
abeaumontis it possible to tell bzr svn to do a branch from a certain revision (like git svn does?), without importing whole history18:29
garyvdmjfroy: if you have a project named bzr-xxx, it's directory in ~/.bazaar/plugins should just be xxx18:30
jfroygaryvdm: that's what I have18:30
jfroyI think the lazy imporer is using _foo for import foo18:30
jfroyand so dies if trying to import a module actually named _foo18:30
garyvdmjfroy: Ok - sorry - I miss understood you18:31
Pilkyjfroy: you know if this works then it could simplify my code a huge amount18:32
PilkyI could do it all using NSTask and NSXML*18:32
jfroyoh it does work18:32
Pilkywhich also simplifies the licencing18:32
jfroyI use it all the time at work to interface with svn repositories18:33
jfroyI licensed it under BSD18:33
Pilkycool18:33
jfroygaryvdm: urg no that's not it18:33
jfroywhat the heck is going on :|18:33
Pilkymy 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 objects18:34
Pilkybasically, not very pretty :P18:34
jfroyIs this valid inside lazy_import.lazy_import?18:34
jfroyfrom bzrlib.plugins.keychain import cKeychain18:34
jfroywhere the plug-in package is indeed keychain, and is named as such in the plugins directory18:35
jfroyPilky: I don't think that's a good idea...18:35
jfroybzr is GPL, so you should make your tool GPL as well.18:35
jfroyDOs will make things way, way more complicated18:35
LarstiQjfroy: what is cKeychain, a class?18:35
jfroyIf you use the bzr CLI, I guess it would be fine18:36
jfroyLarstiQ: an extension module in the package18:36
LarstiQjfroy: ah18:36
Pilkyjfroy: I don't want to make it GPL as I want the GUI to be MIT licenced18:36
jfroyzohar:keychain bahamut$ pwd18:36
jfroyzohar:keychain bahamut$ ls18:36
jfroyLICENSE      README       __init__.py  __init__.pyc build        cKeychain.c  cKeychain.so setup.py18:36
jfroythanks IRC...18:36
jfroy /Users/bahamut/.bazaar/plugins/keychain18:36
Pilkyplus then my lib could be used by closed source projects18:36
LarstiQjfroy: could you try importing bzrlib.plugins.keychain (maybe as mod_keychain or such) and working off of that?18:36
jfroyLarstiQ: sure18:37
jfroyIs there an issue with lazy import that I should be aware of (for future reference and edification)18:37
LarstiQjfroy: a couple, they really should be written down somewhere.18:37
* LarstiQ looks for it18:38
LarstiQjfroy: 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 to18:39
LarstiQonly use that syntax to load sub modules ``from module import submodule``.18:40
LarstiQThis is because variables and classes can frequently be used without needing a sub-member18:40
jfroywell the issue is just that importing that sub-module outright dies18:40
LarstiQjfroy: right, which isn't mentioned18:40
LarstiQjfroy: so I'm not aware of that being a limitation18:41
LarstiQjfroy: can I use the keychain plugin on non-OSX?18:41
jfroyNo :p18:41
jfroyI think it's a case of the stupids18:42
jfroyone moment...18:42
jfroyyup18:42
jfroydidn't refactor the module name in the C extension file >.<18:42
jfroyOK no it still dies18:46
jfroyIllegalUseOfScopeReplacer: ScopeReplacer object 'cKeychain' was used incorrectly: Object already cleaned up, did you assign it to another variable?: _factory18:46
jfroy(for from bzrlib.plugins.keychain import cKeychain)18:47
LarstiQjfroy: that is a lazy import error18:47
jfroydoing the import in the module itself (the plug-in's __init__ module) works fine18:48
jfroythat's OK18:48
jfroyworked around ot18:49
jfroy*it18:49
jfroydef lazy_import_cKeychain():18:49
jfroy    global cKeychain18:49
jfroy    cKeychain = __import__('bzrlib.plugins.keychain.cKeychain', globals(), locals(), [], 0)18:49
jfroy:P18:49
jfroyinnteresting, that seems broken too18:49
LarstiQahem :P18:54
jfroydid I do something stupid?18:54
jfroy:/18:54
* LarstiQ has a look at the code18:55
jfroycKeychain = __import__('cKeychain', globals(), locals(), [], 1) did the trick18:58
jfroyuh-ho19:00
jfroyconverted the branch to 2a19:00
jfroyAnd now bzr pack is giving me bzr: ERROR: Pack '3dcf256d8340362428db62217ca32a0d' already exists in <bzrlib.repofmt.groupcompress_repo.GCRepositoryPackCollection object at 0x1018d9490>19:00
LarstiQdoesn't that mean you don't need to pack?19:00
LarstiQscarily worded19:00
Pilkyjfroy: that's your own fault for using a crappy VCS, use subversion! ;)19:01
jelmerjfroy: which version of bzr are you using?19:01
jfroyLarstiQ: does it?19:01
jfroy1.17rc119:01
jfroyPilky: apologies for the delay19:02
jfroyhttps://launchpad.net/bzr-keychain19:02
Pilkyjfroy: a short delay for the amount of time you could save me is a small price to pay ;)19:02
Pilkystill trying to push?19:03
jfroyI did19:03
jfroyshould be on LP19:03
Pilkyah19:03
Pilkyit must not have registered it in the UI yet19:03
jfroyah huh hold on19:03
jfroyhaven't set a development focus yet19:03
jfroythere, done19:04
jfroybzr branch lp:bzr-keychain keychain19:04
jfroyjelmer:  LarstiQ  you can grab the branch to check that pack issue if you want19:04
jelmerjfroy: this is a known bug, but I thought it had already been fixed19:05
jfroyI see19:05
jelmerjfroy: if a 2a repository is already packed then "bzr pack" will generate the exact same file19:05
jelmerjfroy: and thus you get this error19:05
jfroygotcha19:05
jelmerjfroy: this situation should probably be special cased or something19:06
jfroyPilky: that being said, maybe the DO approach is not so bad19:07
jfroyAs bad as it is, using NSTask is even worse19:07
Pilkyjfroy: your setup script doesn't seem to work19:07
jfroythe cost is launching the Python interpreter is non-trivial19:08
jfroyPilky: oh?19:08
Pilkyfrom: can't read /var/mail/distutils.core19:08
Pilky./setup.py: line 27: import: command not found19: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
LarstiQPilky: run it with python19:08
LarstiQjfroy: add a hashbang ;)19:08
Pilkybah *headdesk*19:08
* jfroy follows Pilky 19:08
jfroypushed >.>19:10
jfroy*ahem*19:10
jfroyPilky: DO guidelines: 1) ONLY use async messages 2) ALWAYS wrap ANY DO message with try {} catch {}19:11
jfroyShould be fine beyond that.19:11
Pilkyhmm19:11
jfroysync messages WILL lead to deadlocks19:12
jfroyit's almost inevitable19:12
jfroyfrom experience19:12
Pilkyyeah I was going to do everything asynchronously19:12
jfroytry {} catch {} because any DO message can throw an exception if the other end is gone for some reason (crash, etc.)19:12
PilkyI'm assuming that your plugin doesn't save to the keychain, only reads?19:13
jfroyWe 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 :p19:13
jfroyit only reads, correct19:13
jfroythe credential store API in bzr doesn't have write AFAIK19:14
jfroyor does it....19:14
LarstiQjfroy: when were you gettting cKeychain errors?19:14
jfroyLarstiQ: when lazily importing it19:14
jfroyusing a "from bzrlib.plugins.keychain import cKeychain" in the lazy import list19:14
jfroyPilky: in practice I've found this to be fine19:15
Pilkyok, 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
jfroyconnecting once to the svn repository using Safari or svn will add the credentials to the keychain19:15
jfroyAh, there is *no need* for the plug-in for ssh19:15
jfroyI don't think credential stores are even queried for ssh19:16
jfroyMac OS X since 10.5 integrates the sshkey agent with Keychain19:16
jfroyit Just Works™19:16
Pilkyoh really?19:16
jfroyyup19:16
jfroyit's also lazily started by launchd19:16
jfroy(the key agent is a launchd agent, e.g. per-user session)19:16
jelmerwrite support to keychain/gnome keyring in bzr would be nice19:16
jfroyI don't think it's big deal, actually19:17
jfroymost people use anon http or ssh19:17
jfroythe only common case for authenticated http is bzr-svn.19:17
LarstiQPilky: for openssh, the thinking is that credentials are best left up to openssh not bzr19:17
jfroyIIRC ssh is special cased19:18
jfroythe credential stores are not used19:18
* LarstiQ nods19:18
LarstiQjfroy: it works when I do `bzr plugins`19:18
LarstiQoh, but I didn't compile..19:19
jfroyit won't build on non-Mac OS X, since it uses the Keychain C API :|19:19
LarstiQyeah19:19
LarstiQjfroy: I would probably try 'import bzrlib.plugins.keychain.cKeychain' myself at first19:21
jfroythat probably will work, but then how do I use cKeychain19:21
jfroyIf I know my Python at all, I think I'd have to use the full import name in code19:22
jfroywhich is... long :|19:22
LarstiQbzrlib.plugins.keychain.cKeychain.find_generic_password, which is indeed pretty long19:22
LarstiQdo you need to import it lazily?19:22
jfroyNo, but it's always a good idea to be as lazy as possible19:23
jfroybzr launch times are already bad as it is19:23
jfroyI worked around the issues and rolled my own lazy import with __import__19:23
* LarstiQ noticed19:23
jfroyit's a small plug-in, and the C module is only used in one place, so it's acceptable19:23
LarstiQjfroy: I'm wondering what makes it problematic though, will any C extension go wrong?19:23
jfroydunno19:26
jfroyjelmer might have some ideas19:26
jfroysince his svn bindings used to be bundled with bzr-svn19:26
* jelmer didn't really follow19:27
jelmerwhat's the question?19:27
LarstiQgosh, is my upgrade of bzr.dev to 2a going slowly20:11
LarstiQjelmer: jfroy ran into some errors with lazyimporting bzrlib.plugins.keychain.cKeychain, which is a C extension20:11
LarstiQjelmer: so I wondered what made it problematic, did lazy importing subvertpy when it was part of bzr-svn give any trouble?20:12
jelmerLarstiQ: I don't think I ever lazy imported it20:14
LarstiQjelmer: that calls for experimentation I guess! :)20:15
=== SamB is now known as SamBSamBSamBSamB
=== SamBSamBSamBSamB is now known as SamB
=== sdboyer_ is now known as sdboyer

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