/srv/irclogs.ubuntu.com/2011/11/17/#bzr.txt

mwhudsonroot@shard:~# bzr branch lp:lava-deployment-script01:07
mwhudsonYou have not informed bzr of your Launchpad ID, and you must do this to01:07
mwhudsonwrite to Launchpad or access private data.  See "bzr help launchpad-login".01:07
mwhudsonbzr: ERROR: Invalid url supplied to transport: "bzr+ssh://bazaar.launchpad.net/+branch/lava-deployment-script": no supported schemes01:07
mwhudsonis this just me being stupid?01:07
mwhudsonit seems a little strange01:07
pooliethat looks odd01:16
pooliei guess that means 'there is no trunk registered'01:16
pooliethere is no project of that name at all01:17
poolieobviously it's a crappy error message01:17
zyga-afkmwhudson, you are silly01:20
zyga-afkmwhudson, s/script/tool/01:20
mwhudsonzyga-afk: ah ofc01:21
mwhudsonpoolie: oh right, because lp lookup is unauthenticated, i _might_ be referring to a private project, not one that does not exist01:22
mwhudsonhnnngh01:22
mwhudsonmaybe i'll do some launchpad hacking tonight...01:23
wgzback home01:29
lifelessmwhudson: :)01:31
=== lifeless is now known as subunit
=== subunit is now known as lifeless
pooliemwhudson, if you use a sufficiently new bzr it will not be doing a separate lookup01:45
pooliethe fact that it got the +branch url seems to indicate01:45
pooliethat the problem was later on01:45
mwhudsonpoolie: even if there is no username set?01:46
mwhudsoni thought in that case it did01:46
mwhudson(coz +branch urls don't work over http)01:46
poolieah you're correct01:46
poolie:/01:46
mwhudsoni have this branch that does anonymous ssh though...........01:47
mwhudson(if i do do some hacking tonight, it will be to make that branch check a ff)01:47
=== zyga-afk is now known as zyga-really-afk
wgzis staging.launchpad.net no longer updated? what's the current site for breaking stuff without bothering real people?02:22
lifelessstaging and or qastaging02:22
wgz(staging says r11151 and main is r1429)02:22
lifelessthey are different branches02:22
wgz* r1429102:23
lifelessdifferent mainlines even - they don't get pulled between02:23
wgzah, and qastaging is even newer, cool.02:23
wgzokay, time to test idea quickly02:23
pooliehi wgz02:51
poolielunch time02:51
GungaDinHow do I do bzr patch on Windows?05:31
jo-erlendGungaDin :)05:36
jo-erlendI was wondering if there is a way to see when a certain line in a source file was last changed somehow?05:37
spivbzr annotate05:37
jo-erlendspiv?05:37
spivjo-erlend: http://doc.bazaar.canonical.com/bzr.2.4/en/user-reference/annotate-help.html05:39
spivAnd the GUI versions in bzr-gtk/qbzr (bzr gannotate/bzr qannotate) are quite nice.05:40
jo-erlendspiv, nice! Thank you :)06:34
jo-erlendI do my main development on my desktop. I push to launchpad. But I also have a laptop where I often do offline work. What's the best way to keep the laptop and desktop in sync?08:31
vilajelmer: rough analysis posted for the 'bzr config' proposal: tl;dr: the old code wasn't checking the lock which was a bug09:09
vilawgz: tell mgz: \o/ windows slave down to 11 failures !09:40
vilawgz: I'm sure you will love to fix the 3 TestTreeTransform ones :-D09:42
mgzmorning all09:48
Sindikathi all! i and my co-worker want to work on our code using bzr. we don't want to have parent repos, but instead pull commits from each other. what's the best way to do that?09:50
vilamgz: \o/ windows slave down to 11 failures !09:51
vilamgz: I'm sure you will love to fix the 3 TestTreeTransform ones :-D09:51
vilaSindikat: you will both need to read from each other with whatever protocol you want (ssh is preferred as it also allows writes)09:52
Sindikatusing 'bzr pull' or 'bzr push'?09:53
mgzSindikat: even with only two people, having one 'main' branch then both of you doing changes in feature branches is a reasonable way of working09:53
jelmervila: cool, I'll have another look09:53
vilaSindikat: from there, it's easier if you use a specific branch as the one that is shared between both of you so all your merges will happen there09:53
mgzvila: yup, getting there09:53
Sindikatvila: it's not that distributed then09:54
vilaSindikat: it's as distributed as any other workflow ;) It will allow a clearer sharing, but feel free to mirror each other branch if you're more comfortable with that09:56
Sindikati'm just not experienced with VCS :)09:56
vilaSindikat: distributed imho mainly matters when it comes to being able to work offline, how source is shared (and how the shared history is handled) is more relevant09:57
vilaSindikat: have a look at http://doc.bazaar.canonical.com/bzr.dev/en/tutorials/index.html09:58
=== zyga is now known as zyga-afk
mgzhey, launchpad now has a cute(ish) down page10:33
Sindikati went thru tutorials, but smth isn't clear. i've did 'bzr init-repo project', in which i did 'bzr init trunk' on some server. now i want to download this trunk branch from server to my local computer. what should i do?10:39
mgzSindikat: once you've committed something to trunk, you just do `bzr branch .../server/path .../local/path`10:47
Sindikatmgz: thanks! i'm currently going thru the guide, so i think i'll find out how to use bzr ;)10:47
mgzhow are you accessing the server currently?10:49
mgzyou want ssh set up for both of you for write access ideally.10:50
Sindikatssh10:50
mgzcool.10:50
Sindikatmgz: currently i already have a branch on server, but don't know how to get pushing to server working10:50
vilamgz: hehe, yeah seen it, liked it :)10:57
mgzSindikat: once you have a repo like you can access via bzr+ssh://host/path/to/branch you pass that to any commands10:57
mgzand bzr will remember the push and pull locations, so you can easily have a local mirror10:58
wgzwhy is there a module-locale dict of handles in bzrlib.transport...11:32
wgzvila: so, the bad news is all but the two already reported windows failures are basically random (but likely) races involving sftp11:33
wgzthe good news is I can actually repo them here from time to time11:33
wgzoh, and the bt.test_transform ones are just exception stringifying11:34
wgzbut eg. bb.test_branch.TestRemoteBranch.test_branch_remote_remote was failing from time to time even before the big location handling regression11:35
wgz<http://babune.ladeuil.net:24842/view/Windows/job/selftest-windows/503/> <- moment of boom11:35
* vila nods11:36
vilamodule-locale dict of what ?11:36
wgzvila: see <http://babune.ladeuil.net:24842/view/Windows/job/selftest-windows/593/testReport/bzrlib.tests.per_branch.test_stacking/TestStackingConnections/test_open_stacked_RemoteBranchFormat_default_/>11:36
wgzI've caught that in pdb, and there's no .pack file, and the dict of streams is empty11:37
vilayeah, this permissiondenied on .pack files never made sense to me11:37
vilaoh, you mean the _file_streams dict ?11:38
wgzit's a race, I'm pretty sure, PermissionDenied is "other worker hasn't closed file yet", and this KeyError looks like "other worker didn't create/already deleted file"11:38
vilasomeone loved globals...11:38
vilahmm, so the cure may just be to catch/ignore that error ?11:40
wgzI don't seem to have an open bug for this though11:40
wgz<http://babune.ladeuil.net:24842/view/Windows/job/selftest-windows/593/testReport/junit/bzrlib.tests.blackbox.test_branch/TestRemoteBranch/test_branch_remote_remote/history/?start=100>11:40
wgzor ?start=80 is better11:41
wgzshows it went from randomly failing to always.11:41
wgzvila: the races certainly seem to be hit much more often now, which isn't the location handling change11:42
wgzand the path is certainly wrong in these cases11:47
wgzbut I think that's just cosmetic11:48
wgzman, r6124 is a mess.12:06
vilawgz: pqm switch :-/12:08
wgzwhat tag did we say we'd use for test failures?12:17
wgz'test-falure' seems to be what you used last vila :)12:19
* wgz corrects the spelling12:19
vilayup test-failure, keeping selftest for bugs related to the command itself12:20
vilaI don't tyops when typing tags, lp procides completion, yet another fullermd hoax12:21
vila*provides12:21
vila:)12:21
fullermdI would never dream of trying to pin such a falure on you...12:36
jelmervila: so, I don't really want to block ~vila/bzr/config-command13:42
jelmervila: but I do think that the increased number of roundtrips is an issue we should fix13:42
jelmerand the fact that this introduces VFS calls where previously they weren't necessary13:43
vilawell, it is probably more correct to say that these calls were not done at all and that was a bug13:44
vila`bzr config` wasn't intended to work for remote branches in its first incarnation, the fact that it worked was lucky at best, buggy at worst13:47
jelmerhmm13:48
vilaI think the *result* is now correct, don't let the better be the enemy of the good...13:48
jelmerso I guess this is a fundamental issue with branch stacks/stores at the moment13:48
jelmernot specific to this branch13:48
* jelmer ponders13:48
jelmervila: r=me, I'll work on a branch that fixes the VFS use for branch stacks13:49
vilajelmer: thanks !13:50
vilajelmer: hold on, on a second look, there is no lock involved there 8-/14:16
vilajelmer: what triggers the additional calls is 'self.transport = branch.control_transport' which is a property for remote branches and accessing it triggers an ensure_real call ...14:17
vilajelmer: talk about black magic...14:22
wgzjelmer may be just the person to resolve that :)14:23
jelmervila: accessing any transport triggers _ensure_real I think14:31
vilayeah, it seems :-/14:32
vilajelmer: I'm looking at it, I'll let you know how it goes14:33
wgzgood job GRiD.14:33
vilajelmer: but by the look of it, all remote branch usages seem to be impacted (I thought only `bzr config` was)14:34
vilathe cat being already out, better fix it asap14:35
wgzGRiD: will try and suggest a less hairy bug next time14:35
wgz:)14:35
vilajelmer: crap, I remember now, RemoteConfig implements get_config_file but neither remove_option nor set_config_file,14:40
vilajelmer: I'll file bugs for the missing ones and still look at plugging get_config_file14:40
jelmervila: I'm working on RemoteBranchStore at the moment14:41
vilajelmer: ghaaa, there are Branch.get_config_file *and* BzrDir.get_config_file 8-( More code duplication ahead :-/14:41
vilajelmer: you'll need a RemoteControlDirStore too...14:42
vilajelmer: only load and save should need to be smartified, the IniFileStore.__init__ may need some massaging... It's a shame there is no easier way14:46
vilabah, and external_url14:46
jelmervila: yeah, the fact that it takes a transport is an issue14:49
jelmervila: I'm wondering whether to add another subclass14:49
vilaThe issue14:49
vila_load_content and _save_content may be extracted from load/save, that's the part that needs a transport14:50
vilaI'd rather not duplicate nor change the logic around that14:51
jelmerok14:51
jelmerclass IniTransportStore(IniFileStore) ?14:51
vilathat leaves external_url but it should be trivial to re-implement so duplicating it is good enough14:51
vilaand then IniSmartStore ?14:52
jelmeryeah, which also derives from IniFileStore14:53
GRiDwgz :) no worries, i learned some internals which was the goal. admittedly at the expensive of my hacking time for my main os project14:53
vilajelmer: sounds good14:53
vilajelmer: it doesn't make a lot of sense that a *single* get_bytes() requires >10 hpss pre-requisite calls...14:56
vilajelmer: there may be a simpler approach,14:58
vilahmm, almost, nm14:59
nmbI'm trying to work with the new colocated branches support, but I'm running into lots of UI bugs.15:34
nmbShould I keep filing different bugs for everything I find?  Or is that just wasting Jelmer's time?15:35
wgzif you're now on the latest bzr.dev rev, keep filing bugs.15:35
jelmernmb: you might want to wait until my current set of colocated branch MPs lands15:35
wgzah, there are a few more to go through, that's right15:36
* wgz needs to look at one of the reviews again15:36
nmbI'm on the latest bzr.dev now, but I can certainly wait for MPs to land.15:36
wgznmb: if you could think/document the user side as you go, that would also be really helpful15:36
nmbPerhaps I should be reviewing colocated proposals15:36
wgzand any other thoughts about interface and so on.15:36
nmbI would love to look into the documentation stuff15:37
nmbswitch is an interface I'm wondering about now15:37
wgznmb: <https://code.launchpad.net/~jelmer/bzr/switch-colocated/+merge/82340> :)15:37
nmbDo we need "bzr switch file:,branch=other" or can we DWIM it to mean "bzr switch other"15:37
jelmernmb: see the link wgz just posted15:38
wgzusing -b will do the right thing when that change lands.15:38
nmbGot it.  Very nice.15:39
nmbIf I were reviewing that MP, I'd like to see an updated docstring for "bzr switch" in the same revision15:39
wgzhm, I'm torn on that.15:41
wgzCurrently `bzr help switch` does cover various subcases, but I think we tend to put too much of that in the main command help currently.15:41
wgz...and I once again spend too long typing my sentence15:42
wgzand thus start and and with the same word...15:42
wgz*and end15:42
nmbI think that's going to be a generic issue with the overall program of integrating colocated branches...15:42
jelmernmb: just reported bug 891671 which you seem to be hitting as well15:42
ubot5Launchpad bug 891671 in Bazaar "active colocated branch when it is being created in empty bzrdir" [High,Triaged] https://launchpad.net/bugs/89167115:42
nmbDo we mention them in every docstring?15:43
wgzyeah.15:43
nmbYep, your 891671 is something I was about to file on.  See also 891667 for a separate UI bug.15:44
nmbI've got to run, but let me say that the reason I'm running into these bugs now is because I'm trying to make bzr-colo work in native colocated workspaces...15:47
jelmernmb: cool!15:47
nmbI'll be working more on that later today, but if I should wait for some more particular branches to land, then I can wait.15:48
jelmerwith a bit of luck those branches will have landed by then15:49
jelmerwgz: did you see my reply on https://code.launchpad.net/~jelmer/bzr/branch-url-identifies-branch/+merge/82341 ?16:02
wgzjelmer: yes, that's what was refering to earlier16:04
wgzthe main remaining confusion, if you're saying segement parameters are (percent escaped) url path sections16:05
wgzis that bzrdir is still dealing in utf-8 'branch names'16:06
wgzit's unclear where the lines are drawn in the code between:16:06
wgz* unicode branch name from user input16:06
wgz* ???16:06
wgz* url encoded segment parameter value16:06
jelmerwgz: bzrdir deals with unicode branch names in its public API16:07
wgzthe colo switch mp is nice because it's clear where transition happens, and it's all in one place16:07
jelmerwgz: only its helper for reading the branch-list file uses utf816:08
wgzbut really utf-8 and not %-encoding?16:08
jelmeryes16:08
jelmerwgz: I can change that to be unicode too, but that would mean needlessly decoding/encoding the branch names there16:08
wgzwe do a lot of that currently. :)16:09
jelmerwgz: not a good reason to add more..16:11
jelmerespecially as this is all implementation-specific, it's not exposed in the API16:11
wgzso, ideally when reading code anywhere in bzrlib it should be clear what type of the variable is16:14
wgzhaving names of things sometimes unicode, sometimes utf-8 bytes, sometimes url sections, is bad16:15
wgzwhich is an existing problem. _read_branch_list/_write_branch_list is pretty localised at least, it's just a pain for callers to have to worry about encoding16:16
jelmerwgz: I can at least at comments about it in the docstring I guess..16:17
wgzI think all your bits are now correctly documented at least.16:18
wgzokay, you now have like, five things to land. go nuts (in the correct order :)16:22
jelmer\o/16:22
* jelmer goes wild16:23
jelmerwgz: thanks again for the reviews16:23
wgz...and five new hpss branches needing review... >_<16:23
jelmerwgz: btw, are you still in a weekend mood or something?16:24
nmbwgz: and you're not even the PP ;)16:24
vilanmb: he;s warming up for next week ;)16:25
wgzhave been trying to resolve babune issues today, and 'w' doubles up as 'windows'16:25
nmbI'll stick to filing mountains of bugs16:25
jelmerwgz: ah :-)16:31
nmbjelmer: what is the way to find out the current checked out branch?  My abstraction in bzr-colo needs access to that.16:32
jelmernmb: BzrDir.get_branch_reference()16:33
jelmernmb: BzrDir.get_branch_reference(name=None)16:34
nmbjelmer: Is that a URL or a branch object?16:35
jelmernmb: it returns a URL16:36
wgzdammit, we *did* have one already, bug 788130, how did I miss that vila...16:36
ubot5Launchpad bug 788130 in Bazaar "Intermittent test_branch_local_remote failure on windows: permission denied on .pack file" [High,Confirmed] https://launchpad.net/bugs/78813016:36
vilawgz: you even commented on it ;)16:37
vilathis rules out any path mangling right ?16:38
wgzand referenced it from my mp...16:38
vilawell, at least related to the big boom you referred to earlier16:38
wgzyeah, this is a pre-existing issue, but something have made it much more prevelent16:38
wgzlike not the path changes, but the other server stuff that landed subsequently (while the path changes were masking everything)16:39
wgz*likely16:39
vila:-/16:41
wgzjelmer: in the tests for splitting segments, can you explain these assertions to me?17:48
wgz<http://paste.ubuntu.com/741413/>17:48
wgzI've got a fix for bug 842233 that I think preserves your intentions, but doesn't pass those checks17:50
ubot5Launchpad bug 842233 in Bazaar "InvalidURL from tests for local_path_from_url on windows" [Medium,Confirmed] https://launchpad.net/bugs/84223317:50
* jelmer looks17:51
jelmerwgz: it looks like an artefact of the way split/join are used in split_segment_parameters17:55
jelmerwgz: and I can't think of a reason why that slash would be necessary17:56
wgzcool.17:56
=== deryck is now known as deryck[lunch]
wgzdon't think we didn't see you sneaking up the HPSS calls count there jelmer :P19:04
=== deryck[lunch] is now known as deryck
jelmerwgz: (-:19:16
jelmerwgz: fortunately rmbranch-colo failed in pqm19:23
wgzyeah, I saw it was going to and put some more comments in the mp19:25
wgzsame basic confusion19:25
wgzstrip_trailing_slash operates on urls, local_path_from_url returns a path, therefore:19:26
wgzstrip_trailing_slash(local_path_from_url(path))19:26
wgzis invalid.19:26
wgzthe tests also break on windows, file:///a isn't valid.19:27
wgzbut something like this is needed, otherwise I get failing tests due to urls like:19:29
wgzchroot-13432:///,key=val/19:30
wgzbecause some other parts of url handling are *adding* a trailing slash, which then changes the meaning of urls with segments smuggled on the end19:31
wgzit's messy.19:31
wgzthe boundaries between local paths, urls, and urls-plus-segments just aren't clear enough19:32
jelmerwgz: my changing of strip_trailing_slash was just moving it up the call stack one level IIRC19:34
jelmerand just used for the file part of urls IIRC19:35
wgzit moved it from inside to outside19:35
wgzwas file_relpath(strip_trailing_slash(url_base), strip_trailing_slash(url))19:36
wgzbecame strip_trailing_slash(local_path_from_url(url_base)) ...etc19:37
wgzjust switching that back means your test_remove_colo fails again though.19:37
wgzstrip_trailing_slash needs to be read as 'strip_trailing_slash_FROM_URL'19:38
jelmerwgz: I'm not sure I follow - aren't the bits we're looking at only used for the file path of URLs?20:01
bignosein Debian's ‘bzr-gtk’ source package version 0.100.0+bzr737-2.1 the ‘nautilus-bzr’ package has been dropped20:06
bignosebecause Debian's Nautilus is now GNOME 320:07
bignosedoes that mean the Nautilus integration is now gone? can we expect it to return soon?20:07
bignose<URL:http://bugs.debian.org/644689>20:07
ubot5Debian bug 644689 in nautilus-bzr "nautilus-bzr: Please transition to nautilus 3 and GObject introspection" [Serious,Fixed]20:08
jelmerbignose: hi20:23
jelmerbignose: somebody needs to update it; it's on my list of things to do, but not very high20:23
bignosejelmer: howdy20:23
bignosean earlier changelog entry explicitly logs the change “Support nautilus 3.0.”, so why did the NMU remove the package for not supporting Nautilus 3?20:24
jelmerbignose: it's not just nautilus 3, it's also moving to pygi instead of pygtk20:28
jelmerhmm, though it looks like that porting work has in theory also been done20:29
jelmereither way, somebody needs to test nautilus-bzr with nautilus 3, fix where necessary and reupload20:30
jelmerthe removal of nautilus-bzr was done by the GNOME team, not by the bzr maintainers20:30
bignosejelmer: but they were correct to do so, yes?20:31
jelmerbignose: yes, that was before we had switch bzr-gtk in unstable to the gtk3 version20:32
MrSmileHi people! I am facing a small problem in python with bzr.21:03
MrSmilewhich class and method I have to call to create a workingTree is not avaiolable through python?21:04
MrSmileany ideas?!21:05
wgzMrSmile: see doc/developers/overview.txt then the relevent docstrings, and referring to bzrlib/builtins.py for what the bzr script commands do can also be useful21:15
wgzotherwise, you'll need to ask a more specific question, ideally saying what you're actually trying to do and what code you've got currently21:16
MrSmileyes, if I use the bzr script commands, I will have to change the working directory of python, which I really don't want.21:16
MrSmileSo far I get everything handled.21:16
MrSmileI wrote a try, catch routine that if I receive the exception "errors.NotBranchError", that I create there the workingDirectory throuh python with the bzrlibs.21:17
MrSmilethis is all about.21:17
wgzjelmer: I'm not completely clear what you mean, but we're not just dealing with urls here, file_relpath converts the url to a filesystem path21:18
MrSmilei mean, path21:18
MrSmilefilesystem path, sorry.21:18
wgzMrSmile: post your code? I don't understand what you're actually trying to do :)21:19
MrSmileokay, I do it now.21:19
wgz(reading the docs for the basics is a good start regardless though)21:19
MrSmilehttp://pastebin.com/raw.php?i=sYSxUqtC21:22
MrSmileI want in the Exception Block, to create the branch branch in the desired directory in the filesystem.21:23
MrSmilethis is my main problem.21:23
wgzokay, "open" is for existing branches.21:24
MrSmileexaclty!21:24
MrSmilethis is a routine, that if one exists, I can work further.21:24
MrSmilenow, it is like the 1st run, if there is no branch in that directoy.21:24
MrSmilei want python with the bzrlib to create one for me in this directory, in the exception block.21:25
MrSmilewhich I did manually by calling through python the console application "bzr init", which is not the clean and nice way.21:25
MrSmileany idea to make the "bzr init" command, through the bzrlib ?!21:26
wgzokay, you have two options.21:27
MrSmileyes, please21:27
wgzboth of which involve you looking at cmd_init in bzrlib/builtins.py so I suggest you do that now21:28
wgzthe first is calling using the cmd_init class21:28
MrSmilewhere is the class?!21:29
wgzthe second is going through the steps it does yourself, which basically involves getting a bzrdir then calling create_branch (and then create_tree)21:29
wgz^line 1864, use your text editor's find21:29
MrSmileokay21:30
ccxCZjelmer: ping21:31
ccxCZor jam, I have few questions about bzr-service21:32
MrSmilehttp://people.canonical.com/~mwh/bzrlibapi/bzrlib.bzrdir.html is a module21:39
MrSmileand BzrDir want's paramters, like transport...21:40
MrSmilehave a nice day.21:44
MrSmilebye21:44
wgzhm, the bzrlib api claims another victim.21:46
wgzshould have just said "pass the dir as the third param to the subprocess call"21:47
wgzusing bzrlib at all requires a level of ability in python, and there are pointless speedhumps still21:47
jelmerccxCZ: hi21:50
ccxCZhello21:51
pooliehi jelmer21:51
pooliewgz, another victim trying to write a hook?21:52
pooliewe should really do a general mapping to shell things21:52
ccxCZI'm quite interested in in bzr-service as bzr startup is insanely slow (about a second) to be used to decorate a prompt21:52
ccxCZbut I don't see the protocol documented anywhere21:53
pooliei suspect only in the code21:53
pooliefor that plugin21:53
wgzno, he just wanted something nicer than subprocess.call(["bzr", "init"]) but nothing any more complex21:53
poolieyou can talk to jam on here who wrote it21:53
jelmerccxCZ: one second is quite slow though21:53
poolieah21:53
pooliean intermediate command layer wbn21:54
ccxCZyeah, called three times to get all info I need21:54
wgzapart from several quirks using cmd instances could work.21:54
ccxCZand bzr shell insists on connecting to remote server when ran on bound branch21:54
wgzand at least is then a path to taking those abstrations out so there's less reopening and reclosing and relocking and so on21:54
jelmerccxCZ: jam is indeed the person to talk to. I've run bzr-service a couple of times in the past but am not familiar wiht its internals21:56
ccxCZhow do you use it then? it needs some other endpoint to talk to21:58
pooliewgz, i think perhaps something a bit separate than command instances21:58
pooliesince they have a fair bit of commandline stuff21:58
pooliepossibly a good way to tackle it is to start writing tests at this level21:59
jelmerccxCZ: "bzr start-service"21:59
ccxCZhmm, I see the C client, but since my shell can talk to tcp & unix sockets I'd rather avoid unnecessary exec()s21:59
ccxCZno usage instructions in the client either22:00
wgzpoolie: <lp:~gz/+junk/call_bzr_init> is as simple as I can make using a cmd instance22:01
jelmerccxCZ: it's probably best to talk to jam22:04
jelmerccxCZ: it's been a long time since I touched bzr-service, and that was only briefly22:04
ccxCZokay22:04
jelmerccxCZ: there are some alternatives, if you're interested in hearing about those..22:05
ccxCZindeed22:05
ccxCZgo on22:05
jelmerccxCZ: you could write a trivial bzr plugin that does the three things you need at once, and then exits22:05
jelmerccxCZ: without loading plugins the overhead of running "bzr ls" is 0.2 seconds here22:06
jelmerccxCZ: what version of bzr are you using, and what plugins?22:06
jelmerand what exactly do you need for your prompt?22:06
ccxCZinfo, revno, stat22:08
pooliegz wow i wish it was faster to get to just seeing the code in the web ui22:08
ccxCZthe thing is the behavior is dependent on the output of info (if the branch is standalone, bound or lightweight co)22:08
ccxCZhttp://paste.pocoo.org/show/509443/22:09
jelmerccxCZ: do you have an example of what your prompt looks like?22:10
wgzpoolie: I should have just given my local sever url, lack of syntax highlighting and all :)22:10
poolieso...22:11
pooliesome of that i blame python :)22:11
poolie__main__ dance etc22:12
ccxCZit's styleable, I wrote the bzr version vcs_info that is now bundled with zsh22:12
ccxCZpoolie: I believe most of it will be python22:12
pooliebut we could move some more of that into initialize() and22:12
wgzpoolie: yes, our fault is really the with block, but that's pretty bad22:12
pooliei think probably we want bzrlib.midlevel.init(argv[1])22:12
pooliesomething like that22:12
jelmerccxCZ: ah, so I guess a plugin won't really work for you then?22:12
wgzhaving to call builtin_command_names() for the side effect of calling the (private) _register_builtin_commands() is particularly good.22:13
ccxCZit would help, but I think using resident process would be much neater22:13
ccxCZit could also speed up regular zsh work22:14
ccxCZjelmer: basically the thing is that I have home under bzr, and I want my prompt scream at me if I have uncommitted changes22:16
ccxCZbut I have to first check that I don't call stat on lw checkout that is networked22:16
ccxCZthe current vcs_info _could_ be rewritten as a bzr plugin, though I anticipate some resistance depending upon unofficial plugin in a script bundled with zsh22:18
ccxCZresistance to*22:18
poolieperhaps you can merge it to bzr22:21
ccxCZthat would be great22:21
* ccxCZ reads what the vcs_info script actually does22:23
ccxCZI think an info-like command that prints data according to supplied template would work, if one can supply conditionals so we can eliminate connecting to remote repositories22:26
ccxCZhere's the zsh script btw http://wpr.cz/ccx/paste/2011-11-17/0.html22:26
ccxCZor maybe do it the other way around, is there way to tell branch type without executing bzr?22:29
poolieyeah, you can just look in .bzr22:32
pooliefor example22:32
poolieis there a .bzr/repository?22:32
poolieis there a .bzr/branch22:33
poolieis there a .bzr/branch/location22:33
pooliethat may be faster than starting python22:33
poolieand pretty feasible to do in zsh22:33
ccxCZindeed, but I haven't seen any comprehensive documentation on the layout of .bzr, so if you point me to one I can implement that22:34
ccxCZbtw I timed python and bzr startup22:34
ccxCZtime: 0.17s user 0.03s system 98% cpu 0.208 total  python -c 'print "hello"'22:34
ccxCZtime: 0.75s user 0.15s system 98% cpu 0.909 total  bzr --version22:35
pooliesure22:35
pooliewe can cut it down more22:35
ccxCZif we implement bzr info in shell I already got 30% speedup22:36
ccxCZso that's definitely worth it22:37
poolieccxCZ, if you want just the same output probably the best thing is to look at the info code22:37
pooliebut basically22:37
poolie.bzr/checkout - there is a working tree22:37
poolie.bzr/branch - there is a branch here22:37
poolie.bzr/repository - a repository22:37
poolie.bzr/branch/location - bound to a branch stored elsewhere22:37
ccxCZso lightweight checkout <=> !.bzr/branch && .bzr/branch/location22:40
ccxCZwait22:40
ccxCZthat does not make sense22:40
poolie[-f .bzr/branch/location && ! -d .bzr/repository]22:40
ccxCZokay22:41
ccxCZthat should be all the info I need22:42
ccxCZis revno easilly reachable?22:42
ccxCZ.bzr/branch/last-revision it seems22:45
ccxCZwhich is missing in bound branches22:45
fullermdIt should be present in bound branches.  It would be missing in light checkouts.22:47
jelmerccxCZ: newer versions of bzr will be even quicker22:47
ccxCZfullermd: you are correct22:47
jelmerbzr --version  0.25s user 0.03s system 89% cpu 0.310 total22:47

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