/srv/irclogs.ubuntu.com/2010/07/04/#bzr.txt

mkanatI wish I had a meliae for Perl. :-|00:02
mgzI wish there was one and only one python memory tool instead of the five or so currently used00:06
mkanatWell, at least they are reasonable and sane.00:06
lifelessmgz: there is only one.... worth knowing00:07
lifelessmgz: I've done subunit and testtools releases.00:07
lifelessmgz: is that thread fully pulled on now ?00:07
mgzI believe so. Got some updates for bzr, but that wants to lag a bit anyway.00:08
mgzbug 582113 and some other misc testtools regressions that I've still not got round to filing, then maybe followup for Parth and Alexander who got stuck on writing unicode tests prviously00:10
ubot5Launchpad bug 582113 in Bazaar "Tests don't run under Python 2.7 (unittest._WritelnDecorator has moved) (affected: 1, heat: 6)" [High,Confirmed] https://launchpad.net/bugs/58211300:10
mgz^fix that by using testtools bits rather than unittest bits00:10
lifelesslets nuke the use of WritelnDecorator too00:11
mgzright. it's a fantasically pointless class.00:11
lifelessits surprising for new players00:11
mgzanyway, we want testtools runner and texttestresult00:11
mgzwhich avoids the issues with 2.700:11
lifelessany reviewers around ?06:25
mneptokThe plot was thin, and the actors seemed both disinterested and wooden. A script rewrite is in order.06:48
lifelesswell roughly06:48
lifelessturns out that using bzrlib.lsprof.profile in a threaded app is a little .. risky06:53
lifelesshttps://code.edge.launchpad.net/~lifeless/bzr/lsprof_lockout/+merge/29165 is the result07:38
mgzrisky as well as being pointless as per bug 579185?07:54
ubot5Launchpad bug 579185 in Bazaar "lsprof records profile from sub threads, but does not save them. (affected: 1, heat: 6)" [Low,Confirmed] https://launchpad.net/bugs/57918507:54
lifelessshrug07:56
lifelessthat is fixable - I thought GaryvdM had a fix pending in fact07:56
lifelessmgz: but since you are here, you can review my patches ;)07:56
mgzdidn't look easy to do cleanly when we looked at it, but part of that was just the display of the results07:56
mgzthe locking you've added looks sane to me, but I don't understand the actual problem07:58
lifelessminimally showing them as separate top level entry points would be better than nothing07:58
lifelesswe call threading.setprofile07:58
lifelessthats a 'change a global07:58
lifelessso when 579185 is fixed07:58
lifelesssay you have a threaded webapp - I dunno, a wsgi server, or launchpad, or whatever.07:58
lifelessif in two threads at once you do 'profile(sublayer, args)'07:59
lifelessthe second entrant to profiler.start()07:59
lifelesswill override threading.setprofile07:59
lifelessnew threads started by *either* request07:59
lifelesswill get collected to the second entrant.07:59
lifelessalso new threads started after either exit will not get collected at all because we reset the profile function for new threads to None08:00
mgzah, right, I get it, thanks.08:02
mgzseems like threading._profile_hook should really be thread-local08:05
lifelessso new threads would use a trampoline to pass it on each time as well08:05
lifelessand you'd get a graph of threads with it set appropriately? Yes.08:05
lifelessthat would be nice.08:06
mgzyup. your fix looks good, I'll just test it here.08:06
lifelessthanks08:06
lifelesshave I mentioned I hate distutils ?08:07
mgzwho doesn't?08:07
lifelesstar tzf ../testtools-0.9.4.tar.gz | grep compat08:07
lifelessI hate setuptools/distribute more08:07
mgzlikewise.08:07
lifeless|o/08:08
mgzdistutils is just messy and barely documented. setuputils is actively evil.08:08
mgz*setuptools08:08
lifelessgod, why isn't it finding it08:09
mgzhmm, interesting08:10
mgz    return _win32_fixdrive(mkdtemp(*args, **kwargs).replace('\\', '/'))08:10
mgzRuntimeError: maximum recursion depth exceeded08:10
mgzwonder what the *top* of that stack was08:10
lifeless\o/08:11
lifelessI'm fairly sure thats not my patch :>08:11
lifelessIMBW08:11
mgzI'll try dev and see if it's a recent thing there08:11
mgzyup, it's on dev... gra.08:12
lifeless><08:13
lifelesshave you perhaps looked into how distutils finds files before ?08:13
mgzooh, I just upgraded testtools yesterday08:13
lifelessmgz: teehee08:14
mgzwonder if it's related to that rather than a bzrlib change... hope not.08:14
lifelessok, MANIFEST existing messes setup.py up.08:15
lifeless><08:15
mgznope, regression from r5326 - sorry vila08:16
lifeless /o\08:16
mgzthe problem with tests... need them to be static to be reliable, but then they become full of cruft and bad examples08:17
lifelesswell08:17
lifelessI don't really care about old cruft badness; I care about performance and maintainability.08:18
lifelessFolk that use tests as examples of production code are being optimistic IME.08:18
mgzthe problem with that is expecting new contributors to write tests when bzr has changed style substantively several times across its lifetime08:18
lifelessand new tests have fluent folk reviewing, so at most a little rework happens when someone copies.08:19
lifelesswhich the reviewer can usually trivially do.08:19
mgzI'm still not sure how to write a bunch of things I'd like to be testing... and I quite like tests08:19
lifelessmgz: yeah, there is some overhead there, but new contributor % vs total-test-base-size  :>08:19
lifelessmgz: just ask !08:19
mgzokay, poping the stack, need to check your lsprof ones still08:20
mgzpasses with 5326 merged out.08:21
lifelesstoday is yak shaving day.08:25
lifeless /o\08:25
lifelessjames_w: if you're up, have you looked into bug 588060 any further? I'm hitting it now with a fairly simple rename (util.py -> compat.py in testtools)08:27
ubot5Launchpad bug 588060 in bzr-builddeb "unversioned executability issue, perhaps in builddeb (affected: 2, heat: 8)" [High,Triaged] https://launchpad.net/bugs/58806008:27
mgzokay, fixing osutils is easy, though I'm a little confused as to what vila was trying to change there08:33
mgzah, I see, ugly lazy import interaction08:35
mgzand mostly pointless, I don't think you can even do `bzr rocks` without importing tempfile08:36
lifelesslazy import is a bit overused as a tool08:36
mgzosutils should just... not shadow things in the os module, it's bad, wrong, and confusing08:36
lifelessno real opinion either way here08:37
lifelessOT1H the function names are well defined and we do supply less broken versions08:37
lifelessOTOH they are shadowing the real ones.08:37
mgzwell, it's better than monkey patching ntpath at least, but what, off the top of your head, is the difference between os.rename and osutils.rename for instance?08:40
lifelesshandles open files08:41
lifelessthat one is more questionable08:41
mgz...think I'll keep this a one-line fix, rather than trying to make the code sane08:44
lifeless:>08:44
lifelessthat reminds me08:48
lifelesshave you seen withhacks? I think you'll appreciate the evilness08:48
lifelessmgz: ^08:48
mgzah, no, but... I've seen the sort of things ruby people do08:50
lifelesshttp://pypi.python.org/pypi/withhacks08:50
mgzusing with to create tree structures like html DOMs and anything else they want an indent for08:50
mgzokay, that really is quite horrid. the javascript-style with is bad enough, but the xargs class is just... insane09:01
mgzwhy would anyone ever think doing that is a good idea...09:01
mgzone thing I would like the with statement for (and I'm not all that keen on it, it's a whoops-we-screwed-up-scoping-originally type modification like the javascript 'let')09:03
ubot5https://lp-oops.canonical.com/oops.py/?oopsid=we09:03
mgzis lazy imports.09:03
mgzcould do lazy imports with with, and then not have any of that string parsing mess09:03
lifelessmgz: there was a thread on that on python-ideas just recently09:11
mgzI stopped reading python-ideas shortly after it was created09:12
lifeless:)09:12
mgzseemed like python-shutup-and-get-off-dev, has it improved?09:12
mgzwhat was the thread subject?09:13
lifelesslooking09:14
lifelessexplicitation lines09:16
mgzreading.09:19
mgzseems very alien for python (and not just because of the french word)...09:25
mgzusing to just being able to read forwards, rather than in every direction at once as per functional languages09:26
mgz*used09:26
fax8hi guys, I've checked out from a .htaccess password protected directory repository. Now each time I bzr up it asks me the username/password twice.. is this a bug?09:27
mgzyes.09:27
fax8ok, I'm on bzr 2.1.2.. new versions fixes that?09:29
lifelessI've not heard of the bug before09:31
mgztrying to find bug, but I might have hallucinated it.09:31
lifelessI'd check you have your authentication.conf setup correctly.09:32
lifelessmgz: set a message on your installer merge... and land it:)09:33
lifelessmgz: you can use lp-propose -m to set the message when you create it09:33
mgzfax8: other thing you can try is -Dhttp and look at the log09:34
mgzhave I got perms to land on the installer project lifeless?09:34
lifelessmgz: you put a merge up for bzr09:35
lifelessmgz: you would for the installers if you joined ~bzr no ~bzr-core, I think.09:35
mgzoh, that bit, doh.09:35
mgz...maybe I should join ~bzr, given yesterday09:36
mgzpoking bzr lead to changes across three different projects09:37
fax8here is the log http://pastebin.com/wfPS3VmQ09:40
fax8I'm still not too bzr savy to understand what's happening there09:41
vilamgz: Was your fix a one-line change to use tempfile.mkdtemp instead of mkdtemp ?09:41
* vila passing around *very* briefly09:41
mgzit was: https://code.launchpad.net/~gz/bzr/win32_mkdtemp_infinite_recursion/+merge/2916609:42
mgzfax8: so, the thing that jumps out there is the 401-401-401-200 sequence09:42
mgz*401-404-401-20009:43
fax8ok, what should I do?09:43
vilaSHUDDER, introduced after a review tweak :-( And as such not tested on babune :-( :-(09:43
lifelessvila: regressions hide around every change09:43
vilawhich is daunting as this was part of an effort to make the test suite *pass* on windows :-(09:44
vilalifeless: yeah, I don't run enough tests...09:44
mgzto avoid it for the moment you can probably put the password in authentication.conf as lifeless suggested earlier09:45
mgzI'll have a go at repoing here later.09:45
* vila goes back tightening his hanging rope09:45
mgzfax8: `bzr help authentication`09:45
mgzwhat was I doing... oh yeah, commit message09:47
vilamgz: was it at least caught by a fialing test ?09:47
mgzit made the whole test suite blow up.09:47
* vila put the rope aside09:47
vilamgz: sorry for that and thanks for the fish^H^Hx09:48
mgz...launchpad doesn't seem to have a way of unproposing yourself of a team09:55
mneptokmgz: did you mistakenly try to join worldcup-fr?10:04
* mneptok woggles an eyebrow at all the French present10:04
mgzheh10:04
GaryvdMHi all10:06
mgzmorning gary.10:07
GaryvdMmgz: Any luck with removing the win32 installer stuff out of setup.py?10:09
mgzha, I'm too smart to launch on that one ;)10:10
GaryvdMmgz: I think I'm going to have to add to if for launchpadlib, and it feels wrong putting it in to bzr.dev/setup.py....10:11
GaryvdMs/if/it10:11
lifelessGaryvdM: to shave the yak, or yak the shave?10:12
mgzyeah, half the file is qbzr/tbzr/py2exe already... needs doing, just a little painful10:13
lifelessthe question to ask is10:13
lifeless'if someone is installing directly from source, do they need this'10:13
lifelessif the answer is yes, do it in setup.py (or something imported into setup.py)10:14
GaryvdMI feel the answer is no.10:15
lifelessthen do it outside of setup.py10:15
lifelesswhatever is in setup.py is irrelevant at this point :)10:16
mgzon the fax8 http auth problem from earlier, does this (typing guest/password as prompted):10:31
mgzbzr branch http://float.endofinternet.org/bazaar/testauth10:31
mgzalso prompt twice for everyone else?10:31
mgzthere are a lot variables with bzr and http10:32
lifelesstwice10:37
lifelesslove the domain10:37
mgzthanks, I'll poke around later and see if I can find the problem.10:38
lifelessmtaylor: https://code.edge.launchpad.net/~lifeless/bzr-builddeb/trunk/+merge/2916711:45
lifelesswe'll want to port the basic support for this to bzrtools too11:45
lifeless_20:44 < lifeless> mtaylor: https://code.edge.launchpad.net/~lifeless/bzr-builddeb/trunk/+merge/2916711:50
lifeless_20:44 < lifeless> we'll want to port the basic support for this to bzrtools too11:50
=== lifeless_ is now known as lifeless
lifelessnow where was I12:00
lifelessthats right, merge-upstreaming12:00
iocoris it possible to get the changes to file contents from a TransformPreview object?12:06
lifelessshould be possible12:08
lifelessI think it offers the tree interface12:08
lifelessand thus tree.get_file(file_id) -> file contents12:08
iocor.get_preview_tree.get_file(file_id).read()?12:10
lifelessyea12:10
iocorthanks12:11
iocorlifeless: how would I do the same thing post-commit? (I'm using a builder to do the commit)12:32
lifelessI need a little more context to help12:32
iocorlifeless: so I'm looking to get all the file contents of all the files in my branch after a commit12:34
lifelessare you using the API ?12:36
lifelessor command line12:37
lifeless....and packages for testtools and subunit uploaded to debian.12:40
iocorbzrlib12:40
lifelessso, you have two options12:40
lifelessa post comit hook12:40
lifelessor after calling commit, you can obtain the revision tree from the repository for the committed revision12:40
lifelessrevid = tree.commit(..)12:41
lifelessrevtree = tree.branch.repository.revision_tree(revid)12:41
lifelessrevtree.lock_read()12:41
lifelessrevtree.get_file(fileid)12:41
lifelessetc12:41
GaryvdMmgz: I've managed to move the py2exe code to it's own file in bzr-windows-installers. It feels a bit hackey. Maybe you could take a look, tell me what you think. http://bazaar.launchpad.net/~garyvdm/bzr-windows-installers/maybe/annotate/head:/build_bzr_py2exe.py12:42
GaryvdMLet me see if I can build an installer with it...12:44
iocorok, I have the following code: http://dpaste.com/214454/ and the following trace: http://dpaste.com/214456/. For some reason post-commit the file hasn't changed even though the TransformPreview contains a change to the repo. Why is this?13:11
fbondnit14:06
fbond(Sorry, empathy window stole my keyboard focus.)14:07
=== khmarbaise_ is now known as khmarbaise
PrinceAMDhi guys, does bzr make 2 copies of images when a client do a fetch/checkout, i'm using svn right now, and if my image folder has 100 images inside .svn it has the same so it uses 2x the space18:34
jamPrinceAMD: no18:58
jamit will have a compressed copy in the local repository, but it doesn't need the pristine copy that svn uses18:58
PrinceAMDok jam , also image does not compress that well, so i might end up with same result19:01
jamPrinceAMD: there will be a fair amount of 'it depends' involved.19:05
jamsuch as, you could do a lightweight checkout19:05
jamor if you have a shared repo, there is only 1 copy across all your branches, etc.19:05
PrinceAMDhm.. lightweight checkout looks nice, i'll test it19:09
GaryvdMHi jam.19:19
lifelessmgz: small meta: when commenting on bugs, be lovely if you can triage at the same time.23:10
lifelessyou don't have too, and perhaps you usually do - if either apply just ignore me :)23:10
mgzGaryvdM: the py2exe move looks pretty good to me, surely it's not that easy though :)23:20
mgzlifeless: I don't have perms. well, I can confirm, and assign to myself, but I can't set prio or any of the rest23:21
lifelessgarh23:21
lifelessok23:21
lifelessso I can add you to bzr; want to be in there ? cost: lots of mail. pros: no more process friction.23:21
mgzI was looking at that this morning23:21
mgzthe main is gmail won't let you filter on X-Launchpad-Message-Rationale23:22
mgz+pain23:22
lifelessoh23:22
mgzso, it'd probably nuke my nice orderly mailinglist account23:22
lifelessI filter on the rationale paragraph at the bottom of the mail23:22
lifeless'because you are a member of' :P23:23
mgzah, the "You received this bug notification because..."23:23
lifelessyou can also do a direct subscription in LP23:23
mgzthat sounds like it'd work23:23
lifelessand then turn off things23:23
lifelesse.g. don't care about mac installers? subscribe to that with a no-mail subscription23:23
lifelessmgz: your mkdtemp patch needs landing :)23:25
mgzhm, this might be a bug, it seems "because you are a member of..." overrides "because you are a direct subscriber..."23:26
mgzdon't want to archive bugs I actually filed23:26
lifelessso this is something deryck is very interested in23:27
lifelessthey are overhauling the bugs subscription stuff at the moment.23:27
lifelessI can has review? https://code.edge.launchpad.net/~lifeless/bzr/loomsupport/+merge/2913923:32
mgzme no know looms 'm 'fraid23:33
mgzah, you're just deleting something. and... is adding the matchers there serving any purpose?23:33
lifelessoh! oversight23:38
lifelessI was going to make the same change I made a few revisions earlier to per_interbranch23:38
lifelesswhere the test is duplicated23:38
lifelessI changed my mind.23:38
mgz...either I'm going mad, or there's no way to add the "inbox" label back to a thread with the basic gmail web interface23:42
lifeless_o/~ I hate huawei E160's o/~23:43
lifeless_08:38 < lifeless> oh! oversight23:43
lifeless_08:38 < lifeless> I was going to make the same change I made a few revisions earlier to per_interbranch23:43
lifeless_08:38 < lifeless> where the test is duplicated23:43
lifeless_08:38 < lifeless> I changed my mind.23:43
mgzIsee.23:44
lifeless_(changed and deleted instead)23:45
=== lifeless_ is now known as lifeless
mgzdoes per_interbranch cover what per_branch is testing anyway?23:58

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