/srv/irclogs.ubuntu.com/2012/07/27/#bzr.txt

mnnhi... has anyone thought of a bit better support of autorenaming in either bzr or bazaar explorer?00:21
mnnI mean bzr move --auto is great, but when files are moved into new folders, I have to add those new folders by hand (bzr add --norecurse)00:22
mnnand that's the most annoying thing about renaming files00:22
spivmnn: that seems like something that could be fixed.  Want to try writing the patch to do it? :)00:23
mnnwell, I could... but I would like to do it a "proper" way... because I hack my own code pretty bad :)00:24
mnnfirst - at what level should this be implemented? bzr or explorer? I'm thinking of bzr... but then it would have to scan new folders if files in them were moved00:25
spivYes, in bzr.00:26
mgrandibzr explorer is a plugin for bzr so do it there00:34
mnnso what's it gonna be then?00:34
mgrandihmm?00:35
mnnfor me, I could just use adding folders without recurse... just add folders (if necessary) and then auto rename00:35
mnnmgrandi: spiv suggested that this should be done in bzr itself00:35
mgrandiyeah00:36
mgrandibzr explorer uses bzr00:36
mnnI know :)00:36
mgrandiso doing it in bzr means that bzr explorer can also use it00:36
mgrandi=P00:36
mnnyeah, but I'm not very familiar with internal structure of bzr or explorer.. that's why I had to ask :)00:37
mnnalso explorer could get an UI for move --auto00:41
mgrandiim not familiar with it either >.>00:43
cody-somervilleI'm curious. with bzr, you can basically just cp the directory to create another branch yet actually running bzr branch on the same local branch takes significantly longer. Why is that?02:05
lifelesscody-somerville: if its inside a repo, it shoudn't.02:11
lifelesscody-somerville: if its cross-repos, its cloning the repo, which validates all the internal data.02:11
cody-somervilleOk, good to know.02:12
cody-somervilleI was playing around with git and bzr the other to see how they compare performance wise these days. I found that it took 10 minutes to do a local bzr branch of launchpad but only 30 seconds to git clone local copy of linux. I am using version of bzr from beta PPA though. Does that sound right or is it possible there could be a performance regression in the version I'm using?02:16
lifelessits possibly git clone locally just hardlinks or something02:18
lifelessits valid to do that for bzr too.02:18
lifelessbet you that doing an actual validating clone would be more than 30 seconds for linux :)02:18
cody-somervillelifeless, I bet it did do something clever because just cping the git repo took 1m55s02:21
cody-somerville(whereas cping the launchpad bzr branch only took 30 seconds since it's only 312M vs. linux's 1.1G)02:21
mgzmorning all!08:01
mgzvila: how is `bzr resolve --all` different from `bzr resolve --done`?09:54
=== yofel_ is now known as yofel
vilamgz: looking at the code is the fastest way to get it, but roughly, --all == rm .bzr/checkout/conflicts09:55
vilaprobably there to cover early bugs and get out of them09:56
mgzthe code paths look equivalent, apart from using a different working tree function to gather the files09:56
mgzwhich is why I'm asking if there's an intended difference :)09:56
vilaha right, looking at the code again it's not obvious from the command itself, so, from memory, 'done' means 'I did what was needed, forget about the conflict'09:58
vilawith no check09:59
mgzvila: okay, seems you've done all the hard bits, just needs some refactoring and deprecation of cruft10:02
mgzbug 383396 is not what this comment intended...10:04
ubot5Launchpad bug 383129 in xserver-xorg-video-intel (Ubuntu) "duplicate for #383396 x server dies with a SIGSEGV when gnome screen saver blanks the display" [Undecided,Fix released] https://launchpad.net/bugs/38312910:04
mgzI'm guessing bug 38939610:05
ubot5Launchpad bug 389396 in Bazaar "bzr resolved does not resolve shape conflicts" [High,Confirmed] https://launchpad.net/bugs/38939610:05
vilamgz: you're right10:30
vila3 6 9, too many multiple of 3 for my brain ;)10:31
jelmerhehe10:32
mgzokay, I've bascially got this fixed.10:36
mgzmain fun bit is keeping compat with old oddness for now10:36
jelmermgz: what do you have fixed, the resolve stuff?10:37
mgzhave we got a bug for making 'auto' an allowable resolve action, or for making bzr resolve FILE not default to --done?10:37
mgzyeah, I was ignoring the thread, but read it this morning and had the "this can't be that hard to just fix" feeling10:38
mgzand how to we deprecate params to commands normally?10:38
jelmermgz: I think we add a bit of code that spews to standard error inside of the command if the option ws specified10:38
mgzokay, 10 failures from change to semantics10:39
mgzvila: TestResolveUnversionedParent methods test_take_this and test_take_other... don't actually use those args10:54
mgzthat's just a mistake, or am I missing something?10:54
mgzhm, I understand it now, it's test_take_this is not like test_resolve_take_this, it'd doing the same actions manually11:19
vilamgz: just back from launch, question still pending or ok now ?11:41
mgzokay, I'll put up some mps shortly which should cover the remaining queries11:50
mgz...think I might just fix some of these old conflict bugs while I'm in the area13:57
mnnI'm having trouble with making a test - assertRaises doesn't "catch" the exception thus making the test fail14:02
mgzmnn: pastebin me some stuff?14:05
mnnok14:05
mgzgenerally the form is: self.assertRaises(UnicodeError, str.decode, "\xff", "ascii")14:05
mnnyeah, I already found that out by searching already written tests14:06
mgzif the error raised is not a subtype of the first arg, it propogates14:07
mnnhttp://pastebin.com/w4fjEm2p14:11
mnnhttp://pastebin.com/TBAS98PX14:11
mnnhttp://pastebin.com/xhCFU6b314:11
mnnand simple patch, if you wanted to try it out:14:11
mnnhttp://pastebin.com/eija9Y1d14:11
mgzyou're giving assertRaises an instance not a class14:13
mnnyeah... I found it out just now :)14:13
mnnthanks anyway14:13
mgzchecking e is the right thing to validate the details14:14
mgzI'd assert on the attributes of the exception rather than its stringification in those kinds of tests14:14
mnnyeah, I noticed that other tests do this when they test if right exception is raised14:14
mgzand add a test in bt.test_errors that the stringification is sane14:14
mgzmnn: some suggestions <http://pastebin.com/dPHqEyzZ>14:19
mgzI'd look at avoiding the need for an actual sftp transport for the test too14:20
mgzis/can _translate_io_exception be made a classmethod or staticmethod14:20
mgzmnn: you need to name the extra string param somthing other than 'msg' which is used by the base error class14:24
mnnah... I wasn't aware of that14:25
mnnthanks14:25
mgz....well, you probably don't, some of the other subclasses use that, but it would be less confusing14:25
mnnyeah I noticed that too14:25
mgzlooks like you're making good progress14:27
mnnwell thanks... I wasn't sure if I should dive into all this, because of my lack of knowledge/experience with Python (the only dynamic language I have experience is Lua)... and lack of Bazaar exprience :) but it seems it works so far14:31
mnnmgz: well I'm not sure about making _translate_io_exception static/classmethod... it calls _translate_error from its super/base class14:35
mnnhowever that doesn't use anything from the instance14:35
mgzright, just checking that14:35
mgzTransport._translate_error also does not use self14:35
mgzI'd decorate both with @staticmethod14:36
mnnok, thanks for advice14:36
mnnbut self has got to go away, right?14:36
mgzthey have the leading underscore as a private hint, so fiddling is fine14:36
mgzright, you remove it from the arg list14:36
mgzdef method(self, arg): ...14:37
mgz->14:37
mgz@staticmethod14:37
mgzdef method(arg): ...14:37
mnn^^ and that's what I didn't like about python, when I stumbled upon it a few years back... something as "private" doesn't really exist there14:37
mgzthen you can just use the base TestCase from bzrlib.tests and skip lots of transport setup14:38
mgzmnn, it's amazing how much time it saves, not being strict about stuff14:38
mgzmakes it really hard to write robust libraries, but such are the tradeoffs14:38
mnnyeah sometimes it really is handy to access private stuff of the class14:39
mnnmgz: so, I've finished the tests... I've read online that it is possible to rebase my branch to reorganize my commits... however the are opinions on not doing rebase at all16:00
vilamnn: IMO, *not* rebasing means the readers of your code will have a better way to understand your intent16:03
mnnwell from what I've read I think you're right16:03
mgzmnn: I wouldn't worry about it, unless you have a couple of messy commits on the end that you've not pushed up yet, then I tend to uncommit and tidy up16:03
mnnhowever as I said opinions differ16:03
mgzhm, the help for bzr st doesn't document 'missing'16:14
=== zyga is now known as zyga-afk
mnndoes anyone know, if it is somehow possible for a branch to override user ignore config?19:29
vilamnn: not sure what you mean here, 'bzr add FILE' will start versioning FILE *even* if FILE is ignored (i.e. 'bzr add' won't add FILE automatically)20:14
mnnoh, thanks, you're right... I'm still new to all this stuff, so I occasionally miss simple things like this20:28

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