/srv/irclogs.ubuntu.com/2010/12/13/#bzr.txt

pooliespiv, go ahead and land to 2.200:03
pooliei might add something to the coding guide about making exceptions error objects?00:03
pooliei wonder if we should just have call a '.hint' method if it exists?00:04
poolieactually maybe we do have a rule about repr methods being passive?00:05
spivHmm, a .hint method might work well.00:06
spivI'm not sure a written rule about repr methods being passive would have caught this problem much sooner.00:07
poolieit would have to either trip something in the brain of the person writing it or a person doing a review00:08
pooliei don't know if writing it in a doc really makes that more likely00:08
poolie_saying it_ now might00:08
spivI'm not sure I realised that repr(BzrError) would invoke that code path when I wrote it.  If someone had specifically asked about it I probably would have guessed correctly, but it's thinking about it in the first place that's the tricky bit...00:08
poolieputting it in a doc gives people something to point to as "we agreed we wouldn't do this"00:09
spivActually, that reminds me of something I was wondering: perhaps BzrError.__repr__ shouldn't invoke str(self)00:10
spivPrecisely because people writing subclasses might not realise that __str__ and thus _format need to be as careful as a __repr__ should be.00:11
spivI guess in practice it would have only prevented this one problem in however many years BzrError.__repr__ has had that implemenation.00:12
poolieah, i didn't realize that calling str was something we added, rather than the default00:15
pooliei have seen several other bugs to do with complex repr methods00:15
spivYeah, the default repr doesn't call str.00:17
spivI wonder if the use cases for repr-of-BzrError are better served by showing repr(self.__dict__) rather than str(self) there?00:18
pooliecould very well be00:19
pooliei wonder what an uncaught exception does?00:19
spivShows the traceback and str(e)00:22
spivhttp://paste.ubuntu.com/542865/00:22
pooliei'm just trying to work out why we called repr here00:23
spivIt's a mystery to me :)00:23
spivI guess because it looked nice?00:23
poolieit's not obviously called by anything on the stack00:24
poolieperhaps twisted was trying to warn about a (what would you call it) leaked exception?00:24
pooliehow about00:25
pooliehttp://pastebin.ubuntu.com/542866/00:25
spivPossibly.  But also Twisted turns raised exceptions during callbacks/errbacks into "Failure" objects, as a sort of async error+traceback00:25
spivBut Failure has a fairly obnoxious behaviour of eagerly taking the traceback and turning it into a string (so it can discard the original traceback and all the probably circular references)00:26
spivAnd that stringification reprs lots of stuff.00:26
spivpoolie: I'm ok with that.  It's a shame we don't have a good answer for "what about when we want to show hints for that error that may require IO to generate".  But that's just a wishlist thing rather than something important.00:29
pooliei'd be ok with having .get_suggestions() optionally present00:30
pooliethen the ui code can call it, and perhaps suppress knock on errors while calling it00:30
poolieok, i'll put that patch up00:30
=== BasicPRO is now known as BasicOSX
vilahi all !07:26
pooliehi there vila07:31
vilapoolie: hey !07:32
vilahmm, where are core dumps dumped ? In the process working dir ? In the user home ? In some fixed place ?07:33
spmbonjour vila!07:34
vila:)07:34
* spm exhausts his high school french in one word.07:34
vilaspm: ...on the other hand, I'm sure you can teach me a lot about core dumps :D07:39
spmapple cores are nicest07:39
poolievila, normally they go into the process cwd07:44
pooliebut on ubuntu they're configured into /var/crash by default i believe07:44
pooliethere is a /proc file that controls it07:45
vilawell, in this case it's a karmic VM that says: 'invalid environment block' and the Virtual Box is supposed to have crashed, but I can't find any core...07:45
vilapoolie: ha, one more place to rey07:45
vilano luck, no /var/crash dir on the host either... puzzling07:45
pooliethey may just be off by default07:45
poolie 'invalid environment block' is an interesting error07:46
vilaI turned them on in /etc/limits.conf07:46
vilaI turned them on in /etc/security/limits.conf or something07:46
pooliethat probably only takes effect on new logins or something07:46
poolietry 'ulimit -c'07:46
gorakhargoshCan bzr determine when a file is renamed/moved to a different directory on Windows?07:46
gorakhargoshs/determine when/determine whether/07:47
pooliei think 'bzr mv --auto' will automatically detect it07:47
pooliebut you need to run that command07:47
gorakhargoshah, so if i did a mv foobar blah/foobar it wouldn't?07:47
vilapoolie: checked, I did that last Friday, I'm lazily hunting them, but that's the third time the VM can't boot at all anymore which make the problem more... interesting07:47
vilaouchy, > 100 errors fixed by fsck...07:49
vilamake that >1000.... sounds like I may restore from a backup instead...07:51
pooliegorakhargosh: if you do that it will also work07:51
pooliethere's a lot of it around :)07:52
gorakhargoshpoolie: so my next question would be: how does it detect that? windows has no concept of inodes. how does it know it's the same file that is moved?07:52
poolievila, i was going to ask what you were going today but i think now i know :)07:52
vilahehe, no, it's only a VM07:52
vilawt.... stupid hudson ! Don't even try to start this VM, I just told you it was offline !07:55
gorakhargoshpoolie: I'm asking this because I'm writing a directory monitoring library which needs to do this on Windows (detect file movement, that is) and there is no reliable way of determining movement to my knowledge.07:59
gorakhargoshWithout this bit of info, I would think the 'bzr mv' command is not irrelevant. It is very relevant on filesystems like NTFS. It's hard (or I don't know yet how) to detect file movement on Windows.08:06
vilagorakhargosh: mv --auto looks at the content of the files to guess renames, it didn't track it at the file system level08:08
gorakhargoshvila: What do you mean by "guess renames"?08:08
gorakhargosh<— currently downloading the source for bzr08:09
vilagorakhargosh: we know the last versioned content of a file and we look at the actual content of files for close enough content08:09
gorakhargoshvila: bzr mv should need to guess renames. it's a command known to bzr that renames. how would bzr determine movement if i used plain old "mv" instead?08:10
gorakhargoshs/should need/shouldn't need/08:10
vilamv doesn't guess, mv --auto does08:10
gorakhargoshvila: ah08:10
gorakhargoshah08:11
gorakhargoshalso, by the latter "mv" i don't mean the bzr subcommand. i mean the UNIX mv tool.08:11
vilagorakhargosh: I meant 'bzr mv'08:13
gorakhargoshvila: yep08:13
=== idnaria is now known as idnar
DonDiegohi everybody12:12
DonDiegoi patched the bzr text_checker plugin12:12
DonDiegowhat is the preferred method for submitting a patch?12:12
beunoDonDiego, merge proposals on launchpad12:14
DonDiegoso i push my local branch to my private space on lp and then connect it to the text_checker lp home with a merge proposal?12:17
jelmerDonDiego: yep12:19
DonDiegook, thx, will do12:20
=== Meths_ is now known as Meths
=== Ursinha is now known as Ursinha-lunch
=== Ursinha-lunch is now known as Ursinha
=== beuno is now known as beuno-lunch
=== beuno-lunch is now known as beuno
=== zyga is now known as zyga-gone
=== zyga is now known as zyga-vaio
dev001hi.  i've added to my .bzrignore, "./sites/mysite/files/".  but when i 'bzr add', that subdir & contents is still added.  wrong sytax on my part?18:11
sorenCan someone smarter than me take a peek at http://hudson.openstack.org/job/nova-tarmac/43312/console ?19:23
sorenSearch on that page for "Lockable".19:23
sorenWhat is that?19:23
lifelesssoren: oh19:27
lifelesseither a bug, or a bad bzrlib script that isn't calling 'thing.unlock()'19:28
lifelessmake sure you have the latest release, then file a bug19:28
* soren glances at tarmac19:29
soren...and by extension rockstar`.19:29
sorenmtaylor: btw ^19:34
* mtaylor pokes rockstar19:36
lifelessmgz: can you join #subunit ?19:53
=== rockstar` is now known as rockstar
=== Meths_ is now known as Meths
lifelessjam: hey, around?20:31
jamhi lifeless, yep20:31
lifelesswondering if you could do a small favour20:31
lifelesswe had a test failing on windows20:31
lifelessin lp:testtools20:31
lifelessrev 158 was broken, 159 should be fixed20:32
lifelesswondering if you could run the tests on native windows python20:32
lifelessfor those two revs20:32
jamlifeless: certainly20:32
lifelessthanks!20:32
jamlifeless: how does one run the tests20:33
jamI think I found it20:34
lifelessmake check20:34
lifelessor look at the makefile20:34
jamlifeless: "make check PYTHON=.../python26" has 2 failures at r158, but 1 failure at r15920:36
lifelessinteresting!20:36
lifelesswhat are the test ids20:36
jamFailure for 159: http://paste.ubuntu.com/543271/20:37
lifelessahha20:39
lifelessok we didn't know about that one20:39
lifelessjam: what was the additional failure in 158 ?20:39
jamlifeless: testtools.tests.test_testresult.TestNonAsciiResults.test_unprintable_exception20:42
jamand testtools.tests.test_testresult.TestNonAsciiResultsWithUnittest.test_unprintable_exception20:42
lifelessah, you didn't see a spinner test failure in either case?20:42
jamnope20:42
jamr157 has the same failures20:43
lifelessand this is with native python ?20:43
jamyep20:43
jampython 2.620:43
lifelessits bizarre that 159 would fix testtools.tests.test_testresult.TestNonAsciiResults.test_unprintable_exception20:43
jamwell, now I'm getting the failure again20:43
jammaybe there is a race?20:43
lifelessperhaps20:43
lifelessmgz: ^ wrote those tests20:44
jamis there a randomize?20:44
lifelessI was hoping to see a fix for a threaded twisted support thing.20:44
lifelessno, I don't think so20:44
jamlifeless: I might also need to have appropriate deps installed. how many tests should be running?20:44
lifelessoh, good point!20:45
lifeless585 with no skips20:45
jamlifeless: test suite at r159 runs 100% clean on python2.520:45
jamyeah, I'm getting 585 both ways20:45
jamof course, r158 also passes on py2.5 fails on py2.620:45
lifelessmgz: https://bugs.launchpad.net/testtools/+bug/68985820:45
ubot5Ubuntu bug 689858 in testtools "test failures on windows w/python 2.6" [Undecided,New]20:46
lifelessjam: can you import twisted successfully in those pythons ?20:46
jamlifeless: no twisted for py2.5, there *is* twisted for py2.620:46
jambut both claim 585 tests ran and no skipping20:46
lifelessgrr :(20:47
lifelesswe need a skip summary like bzr does20:47
jamlifeless: Ran 585 tests in 1.091s20:48
jamseems awfully fast20:48
jamand -v doesn't show any actual "running test XX"20:48
lifelessRan 585 tests in 0.950s20:49
lifelesstesttools test suite is reasonably healthy20:49
lifelesswe could bear to make it a bit faster I think20:49
jamlifeless: well, I miss stuff like "-v" printing what tests are running and individual status20:49
lifelessyeah20:49
lifelessagreed20:49
jamVerbose doesn't seem very, verbose20:49
lifelessreal    0m1.221s20:50
lifelessreal    0m1.512s20:50
lifelesstime() with parallel/serial20:50
jamlifeless: anyway, I can't confirm or deny what tests are being run, it says everything is fine20:52
jamat least for py2.5, but I don't have twisted there20:52
jamso I *know* it is lying :)20:53
jaminstalling 10.2 now20:53
lifelessthank you!20:55
lifelessif that still shows nothing unusual changing between the two revs, I think we should let mgz look at it20:56
jamlifeless: 2.5 passes cleanly on both 158 and 159. This time it prompted me that it was trying to open up a port, so installing twisted did change something.20:57
lifelessinteresting, thanks!20:57
lifelessI think mgz has something different again20:58
jamlifeless: he used to have 2.4, and then I've seen him run bzr against 2.720:58
=== yhager_ is now known as yhager
yhagerHi, we are working on a central SVN repo, and I want a subteam to work on a DVCS repo. I am seeing that git-svn has quite a bit of limitations, and would like to check bzr-svn - as it looks better. Any good references to this? I know git, but don't know bzr, so any pointers to "bzr for gitters" would be appreciated too21:25
spivGood morning folks.21:26
spivyhager: http://doc.bazaar.canonical.com/migration/en/foreign/bzr-on-svn-projects.html http://doc.bazaar.canonical.com/migration/en/survival/index.html21:27
yhagerspiv: thanks!21:28
* yhager sits back and starts reading...21:28
mgzlifeless: that's certainly odd. it's possible that the twisted somehow screws up that test, as it involves traceback formatting, but really twisted shouldn't see it.21:40
mgzjam: if you could get that rev where you were having the random failures again, and try moving twisted off your python path, might answer that question.21:40
lifelessmgz: can you check if 159 fixes the _spinner issue you reported ?21:41
mgzlifeless: on the r159 change, that doesn't fix it for my default install21:41
lifelessmgz: grah, srs?21:42
lifelessmgz: can you pastebin the code in your threadpool.py then ?21:42
mgzgra, I hate twisted, the package structure makes no sense to me and the names are all too cute to be meaningful21:46
mgz(under 'python' for future self-reference)21:46
yhagerCan anybody testify that working with bzr under an SVN repo is almost seamless, as opposed to trying to do the same with git?21:46
mgzhttp://float.endofinternet.org/temp/threadpool.py21:47
lifelessyhager: many folk have praised it21:47
mgzlifeless: if the result is "upgrade your damn twisted install", I can live with that.21:47
yhagerlifeless: You see, I usually use git, and I want to introduce DVCS to the team. git-svn has put me down in that it is fairly easy to get wrong, especially for DVCS newbies. bzr looks better in that sense..21:48
lifelesscool21:51
yhagerI am now looking for reassurance :)21:52
lifelessmgz: that source appears to have the same bug - check _worker and stop()21:52
lifelessmgz: what I don't understand is why it wouldn't be working21:52
mgzreading your notes on the bug now.21:52
lifelessmgz: care to put a print in before the self.threads.remove(ct) in _worker, before/after the threads copy21:52
lifelessmgz: also try a gc.collect :P21:52
mgzhttp://paste.ubuntu.com/543309/ <- like that?21:57
mgzor do I also need to weakref the ct itself?21:57
lifelessyeah21:58
lifelesstry that21:58
lifelessIn principle the thread exits to the Threading wrapper function21:58
lifelessyhager: Lots of folk use bzr-svn and enjoy it21:58
lifelessyhager: the mailing list has active helpful users of it21:58
lifelessyhager: and launchpad.net uses it for mirroring many many svn repositories21:59
lifelessyhager: bzr is somewhat different to git, and some folk love that, others don't :)21:59
mgzhm, I think I'd need a context switch for that to work, I'm guessing threading.currentThread will mean something in the interpreter is holding onto it.22:00
yhagerlifeless: well, I like git, but I am not religious. If bzr works better for me, I'll use it just as happily (or maybe even more..)22:00
lifelessmgz: its interesting reading in the core22:02
jammgz: I don't think it is twisted. it is python 2.522:03
jamvs 2.622:03
jampy2.6 always fails22:03
jampy2.5 never fails with or without twisted22:03
jambut *with* twisted it prompted my Firewall alert22:03
jammeaning the tests that were running did something different22:03
jam(even though the test suite always says "ran 585 tests in 1.0s"22:04
jam)22:04
mgzmphf, 2.7.latest works for me though, and that isn't really a complex test22:06
mgz(it does involve what happens when exceptions are raised from magic methods, but python doesn't change what happens there if it can help it)22:06
jammgz: Py2.7 without twisted passes cleanly22:07
jamlooks like 2.6 formats exceptions differently from the rest22:07
mgzwhat's your minor version?22:07
lifeless__repr__ and __str__ got fiddled with22:07
lifeless:P22:07
lifelessyhager: so, give it a spin ?22:08
yhagerlifeless: yes, I guess I will. I want to read a bit more first...22:08
mgzlifeless: failing to make that twisted method do anything different. what exactly is the intention of the workaround? because it seems to me as soon as the `self.threads.remove(ct)` line gets hit we're (maybe) screwed22:10
lifelessmgz: see stop()22:11
lifelessmgz: its possible that the thread isn't getting any timeslice at all though22:11
lifelessmgz: throw some more prints in, and paste the instrumented file/diff so that I can see what you've changed22:11
mgzha, joy. extra prints = delay = bug vanishes!22:13
mgzpresumably that's io sync22:14
mgzokay, os.write saves me.22:18
mgzlifeless: http://paste.ubuntu.com/543321/22:19
pooliehi mgz, jam, lifeless22:19
mgzhey poolie.22:19
mgzwhoops, c/p error, not printing the local threads variable in stop.22:21
lifelesshi poolie22:21
mgzfixing that gives me the last line instead as:22:21
mgzGZ: stop after joining [<Thread(PoolThread-twisted.internet.reactor-1, stopped)>]22:21
lifelessmgz: three tweaks22:23
mgzso, the thread does get stopped, but threading.enumerate in the test case still pulls it up.22:23
lifelessstop before and stop after joining should prit threads22:23
mgzright, did that.22:23
lifelessand can you put a print in the for thread in threads loop22:23
mgzsure.22:24
lifelessand a print of threading.enumerate() as well Iguess22:24
lifelessmmm, no that shouldn't be needed22:24
* poolie is curious about the context22:25
lifelesspoolie: https://bugs.launchpad.net/testtools/+bug/66634522:26
ubot5Ubuntu bug 666345 in testtools "test_spinner.TestRunInReactor.test_clean_running_threads fails with an extra thread" [Critical,Fix committed]22:26
mgz<lifeless> and a print of threading.enumerate() as well Iguess <- already done as well :)22:26
lifelessmgz: so, how does it look ?22:27
mgzhttp://paste.ubuntu.com/543326/22:28
mgzlooks like I need to check out what threading.enumerate does.22:28
lifelessok, so we're definitely joining22:29
lifelessphew22:29
lifelessand you can see the context switch to the thread triggered by join22:29
mgzyup.22:29
lifelesswtf is enumerate returning a stopped, joined thread22:30
lifeless'Return a list of all Thread objects currently alive. The list includes daemonic threads, dummy thread objects created by current_thread(), and the main thread. It excludes terminated threads and threads that have not yet been started.'22:31
lifelessper 2.6 docs22:31
lifeless2.4.4 claims the same22:32
lifelessmgz: try a sleep(0) after the join22:32
lifelessI think you proposed that in the test case22:32
mgzyup. that's sufficient.22:34
lifelessso22:34
lifelesstheory:22:34
lifelessjoin() isn't calling the os level pthread_join [the equivalent of, on windows]22:34
lifelessmgz: do you get this failure on 2.6/2.7?22:35
lifelessjam: how many cores does your machine have?22:35
lifelessmgz: ^22:35
jamlifeless: 222:35
mgzI don't have twisted installed for my svn python, 1.22:35
mgzbut this may be some long-fixed threading bug.22:36
spivlifeless: I've seen enumerate return stopped, joined threads.22:36
spivIt's caused me a bit of grief in the past.22:36
spivI forget if it's a bug fixed in later upstream, but the practical result is that you have to filter the result of enumerate.22:36
spiv(if you care about the threads all being alive)22:37
lifelessspiv: thanks22:38
lifelessmgz: ok, so I'm very glad we investigated this, as I do believe it would have caused memory pressure issues and potential bugs in large test suites22:39
lifelessmgz: the fix I've landed fixes that correctness issue (though twisted upstream is still borked if you downsize a threadpool)22:39
lifelessmgz: so I think:22:39
lifeless - check for a fix in upstream python22:40
lifeless - if not, file a bug22:40
lifeless - we should filter enumerate(), with a comment and a link to the python bugtrackers bug about this.22:40
mgzjust installed 10.20 on 2.7 and don't get failure, which may or may not mean it's fixed.22:41
lifelessmgz: I suspect its not fixenated22:41
lifelessotoh perhaps it is :P22:41
mgztiming stuff is sensitive.22:41
lifelesshttp://www.mail-archive.com/python-bugs-list@python.org/msg11648.html22:42
mgzhttp://bugs.python.org/issue170344822:42
mgzheh, same thing.22:43
mgzeither lifeless or me could pass for a psychic this evening22:43
spivOh look, I filed that.22:45
lifelessmgz: would love https://bugs.launchpad.net/testtools/+bug/689858 to  be figured out ;)22:47
ubot5Ubuntu bug 689858 in testtools "test failures on windows w/python 2.6" [Critical,Triaged]22:47
mgzmetoo.22:47
spivGosh, I filed that 3½ years ago, and fixed within a year.  It's such a shame we still have to cope with it :(22:47
lifelessmgz: I've pushed a fix, can has confirmation ?22:48
mgzspiv: you deserve some kind of reward22:48
mgzlifeless: passes.22:48
lifelessok great22:49
mgznit: 2.5.222:49
lifelessmgz: are you going to look into jams' test failure?22:49
spivmgz: I'm just glad I've forgotten whatever horrible thing it was that made me diagnose that.22:49
lifelessmgz: E-pic shrug :P22:49
lifelessspiv: bzr server threading tests22:49
mgzlifeless: I'll branch release26-maint and see if I get anywhere, but I have doubts.22:49
* spiv puts his fingers in his ears and sings "la la la la"22:50
lifelessgrrr22:54
lifelesspython.threading doesn't say whether one must call join() or not. Just 'can call it'22:54
lifelessspiv: http://twistedmatrix.com/trac/ticket/477022:58
mgzjam: http://paste.ubuntu.com/543343/ <- is there anything else you can suggest?23:05
mgzhm, something's up with the importing.23:12
mgzokay, twisted tests working, but I can't repo jam's failure.23:18
lifelessjam: still playing wow at all?23:23
lifelessmgz: oh23:41
lifelessmgz: i finished my parallel test stuff for testrepository23:41

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