mnn | while looking into RenameMap, I've found a bug - bzr move --auto tries to move parent directory, even though that wasn't actually moved | 13:58 |
---|---|---|
mnn | pastebin of commands should explain better: | 13:59 |
mnn | http://pastebin.com/5aL3Qrnn | 13:59 |
mnn | this is present both in trunk and also in 2.5.1 | 14:01 |
mnn | no idea if this is intended or not, but I'd like to post a bug on launchpad, if there are no objections | 14:05 |
wgz | mnn: I tend to go with a file-first policy, marking a bug as a dupe or invalid later if I learn something else works fine | 15:03 |
wgz | I think we may have a bug for this though, search for "inconsistent delta" | 15:04 |
wgz | maybe bug 373319? | 15:05 |
ubot5 | Launchpad bug 373319 in Bazaar "mv --auto does not handle directory adds mixed with the contents of a directory splitting in two: InconsistentDelta error" [High,Confirmed] https://launchpad.net/bugs/373319 | 15:05 |
wgz | the dirstate code is frustratingly hard to hack on, but people have managed to dive in and fix problems with it in the past | 15:10 |
mnn | wgz: well I actually wanted to adjust move --auto to handle moving into new directory, while stumbled upon this | 16:12 |
mnn | wgz: I think I have identified the problem | 18:29 |
mnn | I need to try the fix and run the tests, if I haven't broken anything in the process | 18:29 |
mnn | ok, it seems we have a winner: | 18:56 |
mnn | http://pastebin.com/QRfpeZjx | 18:56 |
mnn | here's test with reproduction script from 373319 | 19:21 |
mnn | http://pastebin.com/tZKzTjrF | 19:21 |
mnn | ok, the code doesn't choke on complicated cases... so I guess it's ready: | 19:31 |
mnn | http://pastebin.com/0GaUf7UJ | 19:31 |
mnn | what is this??? | 22:11 |
mnn | 'bzr: ERROR: unknown command ""status""\n' | 22:11 |
=== r0bby is now known as robbyoconnor | ||
mnn | first I did simple self.run_bzr('status') but got exception about result code mismatch - so I tried self.run_bzr('status', 3) and got this nonsense | 22:12 |
wgz | mnn: using bzr from outside its normal initialisation, you need a bunch of extra silly steps | 22:18 |
wgz | see lp:~gz/+junk/call_bzr_init for an example | 22:20 |
mnn | my working directory is actually a branch ... I'm aware that bzr's working directory needs to be in such directory | 22:21 |
mnn | I'm writing a test | 22:21 |
wgz | okay, then you just want to look at the tests under blackbox for actually running commands | 22:21 |
wgz | the base test class doesn't support doing things with bzr commands or things on disk | 22:22 |
mnn | I'm modifying TestRenameMap which is a TestCaseWithTransport | 22:23 |
mnn | TestAdd is TestCaseWithTransport too | 22:23 |
mnn | and it uses self.run_bzr(), obviously | 22:23 |
wgz | okay, I need to stop answering your questions before thinking properly :) | 22:24 |
mnn | yeah :) because unfortunately they haven't been helpful | 22:25 |
mnn | and btw could you take another look at this? | 22:27 |
mnn | https://code.launchpad.net/~mnn282/bzr/sftp-unsupported-operation-more-info/+merge/116849 | 22:27 |
wgz | yup, I shall, stop being slack and respond to that | 22:28 |
wgz | some of my advice from the other day wasn't completely ideal either :) | 22:28 |
mnn | yeah... but I was able to work around them :) | 22:29 |
wgz | so, for instance, @classmethod would probably be better than staticmethod for the _translate_io_error function, which then takes cls as the first argument and saves importing and upcalling to Transport | 22:30 |
wgz | and a few other little niggles, otherwise it's great | 22:30 |
mnn | well write all those niggles there, I will take a look at them later... now I want bzr status! :) | 22:30 |
wgz | ...not having any ideas on your self.run_bzr("status") problem, looking at bzrlib/tests/blackbox/test_status.py (especially the simpler tests at the bottom)... it should just work | 22:31 |
wgz | pastebin me the smallest test you get weirdness with? | 22:31 |
mnn | well even such small test gives me save result: | 22:36 |
mnn | http://pastebin.com/wddFKXNj | 22:36 |
mnn | I definitely must be doing something wrong | 22:36 |
wgz | give me a whole test class and method | 22:43 |
mnn | wow, this is just weird... suddenly it works :) I've tackled issues with locks and inequality issues | 22:43 |
mnn | will push the branch and make merge proposal | 22:44 |
wgz | right, that looked like it should be fine given the right test class | 22:44 |
wgz | have you discovered the neat way of running just a subset of tests yet? | 22:50 |
wgz | do `python bzr selftest -s bt.test_source` for instance | 22:51 |
mnn | I use bzr selftest -v source_name (i.e. bzr selftest -v test_rename_map) | 22:52 |
mnn | btw. https://bugs.launchpad.net/bzr/+bug/373319 | 22:54 |
mnn | wow, it took 3 years to fix a bug from its original discovery... and such high priority bug | 22:54 |
ubot5 | Ubuntu bug 373319 in Bazaar "mv --auto does not handle directory adds mixed with the contents of a directory splitting in two: InconsistentDelta error" [High,Confirmed] | 22:54 |
wgz | using -s and the path (bt. short for bzrlib.tests. and bb. being short for bzrlib.tests.blackbox) avoids loading all the other modules so is nice and quick | 22:54 |
mnn | yeah.. it is much faster... however it seems to print less information than -v | 23:01 |
mnn | wgz: btw. more reviewing :) | 23:02 |
mnn | https://code.launchpad.net/~mnn282/bzr/auto-rename-fix/+merge/117203 | 23:02 |
wgz | mnn: looks like you could simplify that test a little but doing: | 23:02 |
wgz | tree = self.make_branch_and_tree('.') | 23:03 |
wgz | rather than 'tree' | 23:03 |
mnn | yeah, right | 23:03 |
mnn | I'm still new to all this | 23:03 |
wgz | the rest is going over my head right now | 23:03 |
mnn | no problem... just don't forget about me :) | 23:04 |
wgz | and you do want to run `bzr selftest -s bt.test_source` on your branches | 23:05 |
wgz | because we have a test that fails if there's not a unix-style newline terminator at the end | 23:05 |
wgz | and I think both branches have a file that like that | 23:06 |
wgz | shows up in the diff on the mp as: | 23:06 |
wgz | \ No newline at end of file | 23:06 |
wgz | (picky I know... but it's there) | 23:06 |
wgz | good work on both though, even if I nitpick things a fair bit, it's only because the fundamentals are good and you're just not familiar with a few style things | 23:08 |
mnn | no problem... that's why I always ask about stuff | 23:08 |
mnn | ... and sometimes hitting a wall here :) | 23:08 |
wgz | mnn: can you do <http://www.canonical.com/contributors>? | 23:13 |
wgz | there's an online form and the terms a less silly than they used to be | 23:13 |
wgz | john.meinel@canonical.com is who you want to cc at the end. | 23:14 |
mnn | yeah, I see him on the page: John Arbash Meinel (john.meinel {at} canonical {dot} com) | 23:15 |
mnn | it's actually the first license agreement that I'm reading fully... since it's so short :) | 23:20 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!