/srv/irclogs.ubuntu.com/2010/05/26/#bzr.txt

jbowtieSo I have to assume that I'm not leaving the branch in a consistent state in my plugin, trying to understand what's resumable.00:00
beunoah, with bzrlib you surely can resume properly00:00
pooliehi beuno, all00:00
beunoif that's what your previous question was about00:00
beunoI was referring to jsut using the cli00:00
beunohey hey poolie!00:01
jbowtieWell, I need to understand what the cli is supposed to do so I can use that in my scenario and see what gets called.00:02
beunojbowtie, I'd suggest emailing the list about this00:03
beunoor getting poolie's attention  ;)00:03
pooliejbowtie, that'that sounds great00:03
pooliejbowtie, so just at a guess you need to make sure the fetch finishes before updating the branch pointer00:04
poolieah, and perhaps check that you've released the write lock on the repository too00:04
pooliewhich should serve to flush out pending state00:04
pooliehth00:04
pooliespiv, are you here?00:04
spivGood morning!00:05
pooliehey there, isn't it impressively damp in sydney today00:05
jbowtiepoolie: Well, if an exception gets thrown that's what should be happening.00:07
jbowtiepoolie: I call target.unlock in the exception handler; I also wrap the creation of inventory and revision in a write_group and call abort_write_group if something goes wrong.00:08
jbowtiepoolie: So when I lose the connection in the middle of building a revision, I expect the repository is in a consistent state.00:09
jbowtiepoolie: But no branch is created since the repository hasn't finished populating yet.00:10
jbowtiepoolie: So I'm sitting there with a partially populated repository, no branch, no working copy.00:10
jbowtiepoolie: I'm just not sure how I'm supposed to resume from the command line, or if that's even possible.00:11
poolieyou should be able to just branch again into the same repository?00:12
beunopoolie, but only if he has a shared repo00:12
jbowtiepoolie: I get an error about the directory already existing.00:13
beunonot sure if --use-existing helps there or not00:13
poolieah ok, so the half-created branch is getting in the way?00:13
pooliethere's a bug open for this00:13
pooliefor now unfortunately you have to just delete it00:13
jbowtiepoolie: I expect so, yes.00:14
jbowtiepoolie: That's what I've been doing.00:14
jbowtiepoolie: I was just hoping there was a better way, TFS is so slooooooow.00:14
jbowtiepoolie: Branching 1000 revisions is an overnight job.00:15
jbowtieIs there a way via bzrlib to get rid of the half-created branch and resume fetching the revisions into the repository?00:16
jbowtiepoolie: Do you know the bug number?00:16
beunojbowtie, from bzrlib, resuming should be easy-ish00:18
beunothat said, I'm going afk to walk the dog and dinner with the inlaws  :)00:19
jbowtiebeuno: It's morning for me, so I'll still be here if you want to illuminate me later.00:20
LorWill anything break if I have a bzrdir that has neither repository, branch nor checkout?00:20
Lorah, bzr-colo does it already00:23
pooliejbowtie, it's something like https://bugs.edge.launchpad.net/bzr/+bug/125067 or bug 11614800:34
ubot5Launchpad bug 116148 in Bazaar "bzr branch should be resumable if interrupted (affected: 4, heat: 13)" [Wishlist,Confirmed] https://launchpad.net/bugs/11614800:34
ubot5Launchpad bug 125067 in Bazaar "allow 'bzr checkout' to resume (affected: 1, heat: 14)" [Wishlist,Confirmed]00:34
lifelessjam: had fun ?01:21
zerdHow do I enable colors in bzr diff's output?01:50
nDuffzerd, consider bzr cdiff; you may need bzrtools installed01:51
zerdah. nice.01:57
zerdIs it any way to automatically use a pager (less) to paginate long output?01:58
* nDuff doesn't know.01:59
spivThere's a bzr-pager plugin, not sure how up to date it is.02:00
zerdhmm.. cdiff didn't act nice with less02:04
nDuffzerd, less -r02:07
lifelesspoolie: I propose we give mgz landing rights02:32
poolie+102:40
* igc lunch03:29
=== retupmoca` is now known as retupmoca
parthmmgz: ping ... gz .. is that you. the irc denizen formerly known as a[0-9]+ :)04:35
jbowtieArgh!  TFS says a label can't be more than 64 characters!04:41
jbowtieThat means I have no way to store a bzr-revid for roundtripping of commits.04:41
pooliemaybe you can stash it in a hidden file in the branch04:46
=== jamesh_ is now known as jamesh
jbowtiepoolie: Sorry, I'm being dense, how would that work?04:54
pooliejbowtie, is this pullying from tfs into bzr, or vice versa, or both?04:58
jbowtiepoolie: This was pushing a commit from bzr into tfs, then pulling back to bzr.05:01
jbowtiepoolie: TFS requires the admin to create metadata fields on a per-project basis, so there's no reliable place to store the revid.05:02
jbowtieHowever, I have just worked out a clever solution - hide the revid at the bottom of the comment when I push to TFS, strip it off when I pull.05:03
jbowtieA little uglier than I would like but it's pretty foolproof as far as round-tripping goes.05:05
jbowtieI'll just need to create an actual foreign VCS mapping class (which I'd managed to avoid to date).05:05
vilaspiv: Don't land lp:~spiv/bzr/no-sigwinch-583941 into lp:bzr/2.1 yet, I'd like to discuss it first which requires a bit of investigation07:14
vilahi all, oops, first things first07:15
spivvila: Sure07:15
spivvila: I imagine if it works in emacs then it's probably close enough ;)07:16
vilaspiv: that's the point, look at 4747.4.307:17
spivvila: ah, and I see there's a test in test_osutils that that patch will trip up on.07:18
vilaspiv: haaaaa, I'm so glad about this :)07:19
vilaspiv: comment sent, basically COLUMNS *can* differ from _terminal_size and be right07:19
spivI was wondering where relevant tests were; I did run some blackbox tests as a smoke test.07:20
spivBut running the full suite just takes too long for me now :(07:20
vilaapart from the emacs case, I think resizing a window so that a scrollbar appears may be another one07:20
vilaand then there is.... let me find that bash setting07:20
vilacheckwinsize07:21
vilaspiv: try to play a bit with 'checkwinsize' ... you'll live interesting times07:21
spivI'll do that.07:22
lifelessspiv: I'd like to fix the test suite07:22
lifelessbut thats another story07:22
spivThere is definitely something screwy about the code as it is in 2.1 today, though.07:22
spivlifeless: me too!07:22
vilaspiv: apart from the EINTR fallouts you mean ?07:23
spivBecause the SIGWINCH handler will happily reset os.environ['COLUMNS']07:23
spivUsing the value from _terminal_size07:23
vilaspiv: see comment, that's a shortcut07:23
vilaspiv: once you respect COLUMNS, you should continue :)07:24
vilaspiv: even by tricking yourself :)07:24
lifelessholy cow07:24
lifelesstripit is good07:24
lifelessit combined two separate bookings into one trip07:24
lifelesspoolie: ^ :)07:24
spivvila: which comment?07:25
spivvila: the code + comments as they are at the moment don't make sense to me07:25
vilaspiv: I think I didn't realize that when I wrote the code but that desserve a comment in the code about it07:25
vilaspiv: I was referring to the mp comment07:25
vilaspiv: don't make sense doesn't mean incorrect :)07:26
vilathe root is that COLUMNS and _terminal_size can disagree, the rest follows from that07:26
spivvila: well, I changed the comment to match the change to the code, not because I disagreed :)07:27
vilaspiv: but you didn't change the docstring ! :-p07:27
spivYes, but what precisely should happen when they disagree?07:27
spivvila: well, I'm not perfect :)07:27
vilano worries, just kidding07:27
vilaspiv: good question, the actual answer was giving me a correct behavior in all configs I tried07:28
lifelessso07:28
spivAt the moment the policy *seems* to be "trust $COLUMNS until SIGWINCH happens (then trust _terminal_size)"07:29
lifelesswhat happens if we just revert everything07:29
lifelesswhat would break07:29
vilaspiv: yup07:29
spivWhich doesn't seem to make much sense to me, because if we can trust _terminal_size after SIGWINCH, why not before?07:29
vilaspiv: because there are known cases where it's wrong, try 'checkwinsize'07:29
vilaspiv: that's what I try to explain in the mp comment07:30
spiv(My sigwinch-without-signalmodule-583941 can preserve that behaviour without causing EINTR)07:30
* spiv looks at checkwinsize07:31
vilaspiv: ECONTEXT, why the new proposal then ?07:31
spivBecause that proposal added a new C module07:31
vilalifeless: I'm pretty sure we will end up with terminal_width defaulting to None instead of 80 before the patchES07:31
vilai.e. blowing up buildbot with flog files full of spaces or something07:32
vilahehe, yeah flog07:32
spivcheckwinsize means bash promises that COLUMNS will be up-to-date when it invokes bzr, AIUI?07:32
vilaspiv: yes07:32
spivSo _terminal_size would == $COLUMNS, then?07:32
vilaspiv: no07:33
vilathat's the point07:33
vilaCOLUMNS can be set by the application controlling the terminal07:33
vilathink scrollbars, split (sp?) screens, etc07:34
spivWhich is bash, if we're talking about checkwinsize07:34
vilaAt the time I researched, COLUMN and _terminal_size could differ, bash's chekwinsize was just the easiest way I found to demonstrate it07:35
spivSo here's what I don't understand.07:35
spivI think perhaps you are talking about emacs-running-bash-running-bzr?07:36
spivOr, actually, that doesn't matter.07:36
vilano, doesn't matter, yes that's my *daily* env07:37
=== nlisgo_ is now known as nlisgo
vilaspiv: http://www.ohse.de/uwe/software/resize.c.html for some background (but note that he doesn't respect COLUMNS knowingly)07:38
spivYou're saying somehow there's a situation in which a) $COLUMNS is different to and more correct than _terminal_size, but also b) that after a SIGWINCH _terminal_size is better than COLUMNS07:38
vilaspiv: roughly yes,07:38
vilaafter SIGWINCH, it's not "better" but... the best we have IMHO07:39
pooliehi vila07:40
spivBecause we know that the size must have changed, and _terminal_size is the only thing that indicates how?07:40
vilapoolie: hey !07:40
pooliespiv i can't remember if i voted but i like the approach much better07:40
spivSo, if that's the case:07:40
vilaspiv: ... did I make a such poor job to explain myself in that mp's comment or what ? :)07:40
spiva) we can do that without SIGWINCH; just ask for _terminal_size every time but prefer $COLUMNS until we observe a change in _terminal_size07:41
vilaspiv: sure07:41
vilaspiv: my point was to respect COLUMNS at the first try07:41
spivb) I'm skeptical that this tradeoff is working well in practice, because if _terminal_size is initially wrong due to the issues you mention then it will always be wrong.07:42
vilaspiv: on the performance front, remember that before handling SIGWINCH some parts of the code were caching a value, now we'll call ioctl() for *each* output line produced07:42
spivvila: _terminal_size takes 11 microseconds on my slowish laptop.07:43
vilacool07:43
spivCan you give me a precise recipe to observe COLUMNS being more accurate than _terminal_size?07:44
vilaHa, the tricky one :-/07:45
vilanot from memory but I can try to find it back07:45
=== nlisgo_ is now known as nlisgo
vilaspiv: http://www.zsh.org/mla/workers/1999/msg01597.html seem to contain an analysis of various softwares behaviors07:55
vilaspiv: while not giving a recipe to reproduce, it demonstrate that in many cases people chose to respect COLUMNS first, then TIOCGWINSZ when the terminal is resized07:57
vilaspiv: hehe, see http://old.nabble.com/Unable-to-see-os.environ-%27COLUMNS%27--td19487200.html for additional fun :)08:00
vilaspiv: perl does it too: http://cpansearch.perl.org/src/AMBS/Lingua-Jspell-1.63/src/term.c (not sure if you will buy that though :)08:02
spivThe only example situation that I see in those links so far is using a terminal over a crummy protocol that can't report window size changes (except by moving the cursor via ANSI sequences and then asking via another ANSI sequence where the terminal thinks it is).08:03
spivBut you've had trouble yourself?08:03
vilayes, emacs + bash + bzr08:04
vilabut the discussion about zsh is very close to the one we're having here08:05
spivThe python-list link didn't tell me anything new, just that shells may or may not export $COLUMNS, and of course the shell can't reach into a subprocess to update its $COLUMNS after it starts.08:06
vilaspiv: forget that one, was just for fun about a non-exported variable, but yes once python is started there is no way to get back at the env variable, even if it's updated which is not always the case08:07
spivThe zsh discussion was mainly about when to update and when to export the shell-internal COLUMNS/LINES values.08:08
vilaspiv: but mentions that COLUMNS should be respected at start08:09
vilaspiv: the fact that I can't find a recipe shouldn't invalidate the fact that many people refer implicitly to such recipes :)08:09
spivvila: the perl link has comment that doesn't match the code!08:10
vilaspiv: really ? It calls TICOCGWINSZ and *then* overrides with COLUMNS is set, what doesn't match ?08:11
vilas/is set/if set/08:12
spivvila: the comment says the env variables override the *termcap* info, but the code actually overrides the termios (TIOCGWINSZ) values with env variables as well.08:12
spivSo it's very unclear to me whether it does that by accident or on purpose.08:12
spivvila: so my concern at this point is that "use COLUMNS until WINCH happens" is sounding more and more like a superstition without solid evidence the more links I read!08:13
spivIt's entirely possible there's a solid justification for it, but no-one seems to know what it is :)08:14
vilaspiv: and based on that you're going to consider that it's false ?08:14
spivWell, "lots of other people do it" is an argument for us doing it too.08:14
spivBut it feel pretty nervous and unconvinced, which is why I'd like to be able to reproduce a scenario where I can see the difference.08:15
vilaapart from the emacs one I'm sure I encountered another one but I can't remember what was involved08:15
* StevenK grumbles. bzr add-pipe died with a NoneType has no attribute get_config08:16
spivStevenK: upgrade your bzr08:16
vilasome terminal emulator or even vim or less or...08:16
spivvila: tell me more about the emacs case.  This is emacs running in a terminal, not in its own GUI window?08:16
vilaown GUI window, shell as a subprocess08:17
spivHuh, so why isn't the TIOCGWINSZ going to be correct in a tty emacs created?  emacs bug?08:18
StevenKspiv: But 2.1.2 isn't out yet? :-)08:20
vilaspiv: TIOCGWINSZ when WINCH is more correct because emacs can't change the bash env variable when the window is resized08:20
igchi vila08:22
spivvila: right, but TIOCGWINSZ should also be totally correct before WINCH too08:22
spivvila: i.e. in that situation it seems to me the best thing to do would be to ignore COLUMNS entirely08:23
vilaspiv: In fact, I can even find cases where both COLUMNS and TIOCGWINSZ are wrong (for the user: me) when python starts and changing the window size *after* that can only be accessed via TIOCGWINSZ08:23
spivvila: ooh, tell me more!08:23
vilaspiv: ok, I resign, I tried to explain that there are cases where COLUMNS *must* be respected, if you want to ignore that, just fo it08:23
vilaspiv: start emacs, start a shell, resize windows, echo $COLUMNS, python -c 'from bzrlib import osutils; print "COL: [%r]" % (osutils.terminal_width(),)' will both disaply the *old* value08:24
lifelessStevenK: you're on the lp team now, add the bzr ppa :)08:24
vilaspiv: start bzr log, resize window, osutils.terminal_width() got the good value08:25
lifelessStevenK: and no, not the releases one. The *other* one :P08:25
spivvila: ah, a recipe, thanks!  Time to dust of my memory of emacs...08:25
StevenKlifeless: There's another one? :-)08:26
lifelessnightlies08:26
spivvila: while I'm waiting for apt, what does python -c 'from bzrlib import osutils; print osutils._terminal_size(None, None)' report in that case?08:27
* vila use history since the command is already there :)08:27
StevenKlifeless: Which team does that one hide under, since it isn't ~bzr?08:27
lifelessstatik, I think08:28
lifelesshey, use the vaunted ppa search08:28
lifelessor look on our downloads page ;)08:28
vilaspiv: the value set when the bash subprocess was started, and my recipe is wrong because SIGWINCH is not propagated anyway :(08:28
lifelesswiki page I mean08:28
lifelessvila: so perhaps its 'emacs is broken, gnar gnar gnar ?08:28
vilaspiv: no wait08:29
vilalifeless: :)08:29
vilagrr, what was the application that was able to split the screen damnit, I didn't mention it out of thin air....08:30
spivscreen?08:30
lifelessterminator?08:30
vilamaybe, I used neither of them :(08:30
lifelessor its new version, hate08:30
lifelessNg: ^ :P08:30
StevenKlifeless: I find it odd that the nightly-ppa hasn't been updated in two months08:32
lifelesshaha08:32
lifelessstatik: ^08:32
lifelessok, I give, run trunk.08:32
lifelessigc: would love it if you could start setting commit messages in your merge proposals08:34
igclifeless: ah - ok. Will do08:34
lifelessalso08:35
spivvila: so for me, in M-x shell, COLUMNS is 80 regardless of window size, and _terminal_size is 0,0 regardless of window size08:36
lifelesswhen you send something to pqm please say so on the mp08:36
lifelessso that I don't double submit :)08:36
lifelesshydrazine will do this for you08:36
igcok08:37
spivvila: so it seems to me that an equally good policy for you would be "try BZR_COLUMNS, then TIOCGWINSZ then COLUMNS, until you find one that is not missing and not zero.  If all else fails, guess 80."08:38
lifelessigc: the result of automation: - http://pqm.bazaar-vcs.org/08:38
igclifeless: nice08:39
vilaspiv: this is equally superstitious about TIOCGWINSZ returning wrong values and COLUMNS being right in that case08:40
spivvila: (to be more precise, COLUMNS is accurate when emacs starts the M-x shell, and the termios size is never set)08:40
vilaspiv: and where is the recipe for termios size never set ? :-P08:41
spivvila: I don't think it's particularly superstitious.08:42
vilaspiv: then go for it, both solutions need to be tested in the field, I wasn't entirely clear with my solution, I don't think yours is worse or better, just different, the interweb doesn't seem to agree on either one anyway and BZR_COLUMNS is there to address obscure cases08:44
spivThe logic is simply: BZR_COLUMNS first, because it's an explicit user-knows-best override.  Then ask the OS directly if it thinks it knows the terminal size (and if the terminal creator is good enough, it will be correct -- I don't know of any reason why emacs couldn't issue TIOCSWINSZ to set the size), because the OS ought to know best and can update it for window resizes.08:44
spivThen fallback to COLUMNS, which if set is likely to be better than nothing, then fallback to 80 as the default everyone expects.08:45
vilaspiv: yeah, I did that *first* and then I switched08:46
vilabut don't force 80 either, some callers expect None for no defined width08:46
spivAh, sure.08:47
spivWhy did you switch?08:47
vilashudder08:47
* igc dinner08:48
vilabecause I encountered a case where it was needed, found some evidence for it reading the web and...08:48
vilafail to note the recipe (I should have known better :)08:48
spiv:)08:48
spivPerhaps we should just let users with broken terminals write a plugin to override osutils.terminal_width as they need :P08:49
vilanow, did I reproduce it or was I so convinced by some explanation that I didn't reproduce it in fact ?08:49
vilaspiv: That's why I added BZR_COLUMNS: this terminal size stuff is messy, let's punt08:49
vila:)08:49
spivvila: you should have made it be a python expression, for maximum flexibility ;)08:50
vilaspiv: see, you use emacs for a minute and already you're starting to put hooks everywhere :-)08:51
spivvila: don't worry, my evil overload laugh was well-honed already ;)08:52
vilaspiv: bzr selftest -v | less :-(08:53
vilaspiv: whatever, the lesson for me is once again: 'untested code is broken code', change that failing test to match your implementation, unless bugs are filed for specific cases I don't see how to address all possible cases without recipes :)09:02
bialix~~~~09:04
johHi, I get two strange messages when comitting to my branch: Unrecognized interpretation: SOURCE_CODE, Unrecognized manifestation: FILE_DATA_OBJECT09:13
johWhat do they mean?09:13
lifelesscould use a second reviewer on https://code.launchpad.net/~parthm/bzr/584650-incorrect-alias-info-in-help/+merge/2601809:16
lifelesspoolie: ^ if you're around, its trivial09:16
poolieok maybe very quickly09:16
pooliethen i need to go09:16
pooliebzrlib.help.help the comedian's a bear!09:16
pooliedone09:17
pooliethanks lotzman09:17
poolieand good night09:17
=== radoe_ is now known as radoe
=== nlisgo_ is now known as nlisgo
=== nlisgo_ is now known as nlisgo
speakmangmorning!10:25
speakmanIs there any way to "rewrite" some old commit messages (due to character encoding change)?10:26
bialixonly if you're ok to the fact all your history after that commit will be rewritten too.10:33
bialixGaryvdM: ping10:33
speakmanhow come I can't modify the author name and/or message of a single commit?10:37
mgzoh man, lots of exciting log to read this morning10:37
mgzthere appears to be a good hour's worth just on signals and terminal size detection, now that is my idea of a good time.10:38
mgzthe sad thing is... I should be being sarcastic, but am not.10:38
spivvila: yeah, "bzr ... | less" or even just "| cat" is basically doomed as far as I can tell10:38
spivvila: at least in my environment, in that situation COLUMNS is not set and _ioctl_terminal_size returns None,None10:39
bialixspeakman: because DVCS insist on the immutability of the history10:40
vilaCOLUMNS is specific to some setups, that was my big problem with it, so no need to  mention it if it's not set :) The problematic cases are when it *is* set :)10:40
speakmanbialix: Yes I know, but in this case it doesn't matter.10:40
spiv(At least if the other end of the pipe is less then arbitrarily long lines don't matter much, unless we want to right-justify text at some point.)10:40
bialixspeakman: if you change past commit, all commits after it should be changed too (at least their revids)10:41
spivvila: right.  So I'm thinking I'll make two patches:10:41
speakmanbialix: is the revid connected to the author/commit message?10:41
vilaspiv: I think the consensus for that was that bzr use None when the output is not a terminal, BZR_COLUMNS can rescue specific cases here10:41
bialixspeakman: then I'd say you can branch that commit, uncommit, commit again with correct data. then replay all other commits on top of it10:42
mgzack! if y'all keep talking, I'll never catch up10:42
bialixrevid is revision id. it's unique10:42
spiv1) for 2.1, a minimal patch that removes SIGWINCH by tries to preserve the existing behaviour (initially use COLUMNS then use termios width once we observe a change), including the rather odd part where os.environ['COLUMNS'] is mutated10:42
bialixyes, revid based on the author, commit message and all previous history10:42
speakmanbialix: I can't possibly retain revid when changing message/committer?10:43
vila1) adding the comment I forgot about why COLUMNS is mutated this way, yes, sounds good, minimal risk for 2.110:44
spiv2) for trunk, a patch to use the implementation I outlined earlier, and see how that works out for people.  I'll try to include an explicit list of relevant cases, e.g. M-x shell, and "bzr | less".10:44
bialixspeakman: you should not10:44
spivvila: Well, I can't add that comment, because I still don't know why it is mutated10:44
vilaspiv: yup, behavior change for 2.2 , sounds good too10:44
vilaspiv: because it masks the ioctl call()10:45
spivvila: I mean, I know it is one way to get the "initially COLUMNS until WINCH" behaviour, but at the cost of mutating global state as a side-effect, state that subprocesses inherit!10:45
vilaspiv: good, we want subprocesses to inherit the most current value :-)10:46
spivOh, so that part was intentional?  Ok, that was totally unclear to me :)10:46
spivI'm... unsure that it's a good idea, especially how we set it even if it wasn't set, but ok.  I'm not too worried about subprocesses :)10:47
vilasince it10:47
vilameh10:47
spivAfter all, if this discussion has taught me anything, it's that random programs might do all sorts of things to determine the terminal size! :)10:47
vilasince it's taken into account once set, WINCH blindly set it with the up-to-date value so that all subsequent callers get it, but the WINCH handler doesn't *respect* it of course10:48
spiv(To be clear, I'm not sure that it is a bad idea to set either)10:48
spivNothing in bzrlib/ looks at COLUMNS other than osutils10:49
vilaspiv: good, that was my experience too when I worked on it (and boy did I not anticipate the can of worms it will open with other signals... I had enough with the term size...)10:49
vilaspiv: well, at least we got that right: a single place where term size is determined :)10:50
spivYeah, that was a great relief to see :)10:50
vilabut as the discussion with bialix at UDS revealed, the definition of what we do with that is still a bit unclear10:50
vilaI don't remember if there are still places where we subtract one from that value for terms that include '\n' in that count10:51
vilaspiv: but you're free to ignore this bit for your current submission :-O10:51
vilaspiv: bzrlib.status.show_pending_merge() for one  :-/10:52
bialixvila: what?10:52
vilabialix: is terminal_width() the number of characters that could be displayed or should we subtract 1 because some terminals (including... the one you use on windows) requires it10:53
bialixyep10:54
vilabah, looking at the code it seems we *always* subtract 1, the progress bar stuff is a bit less clear about that so I'm only 50% sure there, but in all other cases it seems to be done unconditionally10:55
bialixvila: you broke this in selftest :-P10:56
spivvila: ugh, yes, I fully intend to ignore that :P10:56
spivvila: thanks for your patience10:57
* spiv -> dinner10:57
* bialix -> lunch10:57
spiv(Someone should have breakfast to complete the set... any takers?)10:57
jelmerI've just had breakfast10:58
vilahere we are...10:58
jelmerwell, s/just/one-and-a-half-hours ago10:58
vilatoo late, now we know10:58
jelmer:-)10:59
vilaspiv: you're welcome, I should have discussed this when I was working on it...10:59
mgzokay, caught up. think I understand all of that.11:00
vilabut, well, it sounds so inocuous :)11:00
lifelessmgz: not sure we do :P11:00
vilamgz: Do you have recipes ? :-P11:00
mgzhow about this as a simple way for handling the case where the terminal size the kernel returns is not what the terminal emulator actually uses in the window:11:04
mgzif COLUMNS is valid, and kernel width is valid, but they differ, use COLUMNS11:05
mgz(keeping BZR_COLUMNS overriding both of those, of course)11:06
mgzgiven the huge number of different setup possibilities, never going to get this right for everything11:07
thumperbzr backed wiki: 0.1 now out the door: http://how-bazaar.blogspot.com/2010/05/wikkid-wiki.html11:10
vilamgz: So, the problem is two-fold (at least): 1) COLUMNS being an env variable it doesn't play well with subprocesses, 2) Whether COLUMNS is more or less right than the kernel is unclear (and when)11:10
mgzwell, it clearly depends on the application, of which there are many :)11:10
bialixthumper: \o/11:12
vilathumper: nice !11:12
* thumper puts down laptop for the night11:13
vilamgz: the case at point is to find a recipe where COLUMNS and ioctl(1, termios.TIOCGWINSZ...) disagree and see which is right11:14
lifelessgnight11:14
mgznight!11:14
vilamgz: I swear I encountered one in the past but couldn't find it back, so the bets are open :)11:15
vilalifeless: gnight11:15
bialixwhy switch between qbzr trunk and qbzr 0.18 produce conflicts??? there is no uncommitted changes11:15
bialixthis operation should not merge11:15
bialixwhy??? grrr11:15
mgzwell, you and spiv covered pretty much all the possible options in that discussion11:15
bialixis it worth a bug report?11:15
lifelessbialix: dir with unversioned contents?11:16
lifelessI think there is a bug already11:16
lifelessand a workaround11:16
lifelessbzr resolve --take-other or something11:16
bialixno, conflict in the versioned file11:16
lifelessah, please file a bug for that then11:16
* lifeless really goes11:16
mgz(re)finding real world cases seems reasonable11:16
mgzall this makes the windows terminal start to look sane, you know.11:17
vilabialix: ^ :-P11:17
bialix:-P11:18
mgzyou know what I haven't made you worry about yet: knowing how wide what you're actually printing is11:19
mgzbecause an 80 codepoint string sure isn't always 80 spaces wide :D11:20
=== nlisgo_ is now known as nlisgo
vilamgz: :)11:20
vilamgz: let's get the signal mess out of the way first :)11:21
mgz:D11:22
mgzI think bzr largely avoids the issue, no critical word wrapping code11:23
mwhudsonah, terminal hacking11:26
* mwhudson remembers that11:27
vilamgz: we thought about reusing the nice TeX implementation but the dependency was considered too much :)11:28
mgzhey parth, thanks for looking over my filelifetimes branch11:39
mgz(and yes, to your query from earlier)11:40
vilamgz: I read the mail so I didn't have the context, what is this ',,bogus-inv' thing ?11:40
mgzwill you be sad if I say "notaclue"?11:41
vilayeah, terribly :-(11:41
vila;)11:41
vilaI suspect we never realize the consequences since it has never conflicted in real like...11:42
mgzI just use a file tracking script to detect file objects that didn't get closed, and then added a bunch of close calls :)11:42
mgzin a couple of places I actually considered the surrounding context, but not many11:42
mgz(you may well be right that just using a tempfile there would make more sense... but it'd still need closing!11:43
mgz)11:43
vilacertainly11:43
mgzparthm: that also answers your query about why I added comments saying "should use try/finally" rather than just doing it11:45
mgzreindenting a twenty lines of code I didn't really understand seemed a bad idea to address a problem no one using cpython encounters11:46
parthmmgz: makes sense :)11:48
siliis it possible to show the logs of a branch since it was branched?11:51
vilasili: 'bzr missing --mine-only ' ?11:53
siliaha. I think that will work. Thanks vila11:57
Leonidasis there any roadmap on when 2.1.2 will be released?12:20
=== mrevell is now known as mrevell-lunch
=== mrevell-lunch is now known as mrevell
=== nlisgo_ is now known as nlisgo
=== nlisgo_ is now known as nlisgo
=== nlisgo_ is now known as nlisgo
=== nlisgo_ is now known as nlisgo
=== IslandUsurper is now known as IslandUsurperAFK
=== nlisgo_ is now known as nlisgo
=== beuno is now known as beuno-lunch
=== nlisgo_ is now known as nlisgo
awilkinsIs there a loggerhead of the bzr trunk?17:45
jelmerawilkins: yeah, lp:~bzr-pqm/bzr/bzr.dev17:48
awilkinsjelmer, Thanks17:53
=== IslandUsurperAFK is now known as IslandUsurper
PhoenixzI have two projects that share a large part (some 90%) of the same code base.. When adding functions / fixes to project 1 I want to share those with project two, but there are various directories from which I do not want to share changes.. How do I do this?18:17
Phoenixzshare changes as in, when I merge / push to other repos, I want those directories filtered..18:17
rsvpfor some reason ".bzrignore" does not seem be excluding intended files -- where does it have to be placed? -- what are some gotchas???18:28
jelmerrsvp: it has to be in the root of the tree18:30
jelmerrsvp: what sort of files is it not ignoring and when?18:30
rsvpI think I found the gotcha: "The ignore pattern only applies to non-added (ie unknown) files.  Once a file is added, it remains versioned regardless of whether it matches an ignore pattern or not." -- can we can confirmation of this, please? -- it's not mentioned in the manual by the way.18:33
rsvpif so, how does one remove versioning but NOT the file itself ???18:34
jelmerrsvp: yes, that's correct18:35
jelmerrsvp: iirc "bzr remove --keep NAME"18:35
rsvpwhat's iirc18:35
rsvp?18:35
jelmerif I remember correctly18:37
rsvpah, OK... thanks very much, jelmer18:38
=== beuno-lunch is now known as beuno
rsvpit appears that the correct syntax is "bzr rm --keep NAME" -- per https://answers.launchpad.net/bzr/+question/28805 which uncovers our mystery.18:42
jelmerrsvp: that's what I said :-)18:42
rsvpjelmer, is rm bzr's shorthand for remove?18:43
jelmerrsvp: yep18:43
rsvpok, superb, thanks again.18:43
rsvpusing "bzr ignored" to verify which files will be ignored -- this has indeed confirmed our discussion.18:52
C-SI have the following error with 'bzr qlog': bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'style'19:19
C-Sany ideas?19:19
C-Straceback is: Traceback (most recent call last):19:21
C-S  File "/usr/local/lib/python2.6/site-packages/bzrlib/plugins/qbzr/lib/revtreeview.py", line 193, in paint19:21
C-S    style = widget.style()19:21
C-SAttributeError: 'NoneType' object has no attribute 'style'19:21
luksI think that was fixed in new version sof qbzr19:24
C-Swhich version do you mean?19:28
C-SI use the newest published version of qbzr19:29
luksmaybe I was wrong19:29
C-Smaybe it is not published yet.19:29
lukswhich version do you have?19:30
luksaccording to the changelog, it was fixed in 0.18.519:31
lukshttps://bugs.launchpad.net/qbzr/+bug/54492819:31
ubot5Launchpad bug 544928 in QBzr 0.18 "qlog fails with a special combination of PyQt4 and Qt (affected: 19, heat: 0)" [Critical,Fix released]19:31
C-Sbzr version 2.1.1 and I am working on 0.19 qbzr19:31
C-Sthat is weird indeed19:31
C-Sactually I have 019~b119:32
C-Sand still get this error?19:32
luksseems 0.18.5 was released after 0.19beta19:32
luksso the fix is probably not there19:32
C-Sah. maybe19:33
C-Slet me check19:33
C-Syou seem to be right.19:33
C-Sluks: thank you very very much. it works now :-)19:38
luksno problem :)19:40
=== nlisgo_ is now known as nlisgo
=== nlisgo_ is now known as nlisgo
rsvpthe command "bzr remove --keep" at first sight is ambiguous, and users may hestitate for the fear of losing their files; would recommend creating "bzr unversion" instead.  Your thoughts ??20:21
pooliersvp, that would be a reasonable name for it20:21
pooliehowever remember that when this change is merged somewhere else, it actually will cause deletions20:22
rsvppoolie, deletion of the versions, or the actual files themselves?20:23
pooliethe files themselves20:24
pooliewe don't record "was unversioned" vs "was deleted"20:25
rsvpthat might be a problem then...20:26
rsvpbut then why the distinction from this another option: "bzr remove --force" ; so once again the means and the end results are not crystal clear to the user.20:31
maxbWhat is unclear?20:31
maxbI think "bzr unversion" would be unwise, because it implies there is more difference in the operation that there actually is20:32
itistodayhow do I byte-compile the files in a plugin folder?20:36
rsvpI think what the typical user will want is to stop versions of a certain file, yet to have it remain on disk, without manually editing .bzrignore20:36
rsvpso "bzr unversion" will do just that, including adding an entry to .bzrignore automatically -- just a suggestion.20:38
itistodayi.e., I've done this: bzr get http://people.samba.org/bzr/jelmer/bzr-rewrite/trunk ~/.bazaar/plugins/rewrite20:38
itistodaynormally when you run setup.py install it byte-compiles the stuff in there20:38
itistodaybut it installs it into the system location20:38
itistodayi'd like to leave it there in my user folder, but byte-compile the files20:39
poolieitistoday, if you can write to the directory it will be automatically bytecompiled when you first use it20:45
itistodaypoolie: ah neat, didn't know that20:45
itistodaythanks!20:45
rsvpso I just created two aliases in my bazaar.conf : "unversion = remove --keep" and "destroy = remove --force"20:50
poolieok20:52
rsvpfunctionally more clear, no?20:52
bamarobGreetings...  is this the place for a newbie to get some help?20:52
pooliesure20:54
bamarobActually, as I posted that, I continued to read through https://answers.launchpad.net/bzr and *may* have found some answers...  If not, I'll be back... :)  Thanks.20:57
=== tchan1 is now known as tchan
awmcclainHi friendly bzr'ers. I've been updating bzr via easy_install for years and I just downloaded the DMG to get explorer... and now I'm getting a bzrlib version doesn't match error -- even though the bzrlib.__version__ matches the bzr version (2.1.0)21:39
poolieawmcclain, i'd guess you have an old bzr or bzrlib hanging around somewhere21:40
lifelessmkanat: hi21:52
mkanatHey lifeless.21:52
mkanatlifeless: Did you find out if the pygments fix and the latest hang fix had actually been deployed?21:55
lifelessI found out how to find out21:55
lifelessand found out21:55
lifelessthe way to find out is to look at lp:~launchpad-pqm/loggerhead/devel21:55
mkanatlifeless: Ahh, okay. :-)21:55
lifelessthat branch is rolled out in cron21:55
lifelessat a 24 hour frequency21:56
lifelessit contains the pygments size cap21:56
lifelessso 'yes' to the pygments thing being rolled out21:56
lifelessdid we file a bug on pygments about its 'most excellent scaling characteristics' ?  :)21:57
mkanatlifeless: Hahaha. No, I don't think I did.21:57
lifelessI think we should21:57
mkanatlifeless: Yeah, agreed.21:57
mkanatOkay, and the rolled-out branch also contains the lru fix.21:57
lifelessfor two reasons - the open source quid pro quo of feedback, and also so that when its fixed we can remove the size limit21:58
mkanatlifeless: BTW, I can't access that pastebin that's linked in the bug description.21:58
lifelessI can, let me grab it21:58
mkanatlifeless: I don't know that it will be resolved--the problem is that pygments is slow. "Make pygments fast" would be the solution. Perhaps via pyrex or something.21:58
lifelessright21:58
lifelessI understood it to be nonlinear though21:58
mkanatlifeless: I'll go find their bug tracker.21:58
mkanatlifeless: No, it's linear. It's just really bad.21:58
lifelessok21:58
mkanatOh lovely, they use Trac.21:59
lifelessno wonder they are patient on performance21:59
mkanatHahaha.21:59
=== khmarbaise_ is now known as khmarbaise
lifelesspasted to you22:03
lifelessit wasn't very large22:03
mkanatlifeless: Cool, thanks.22:04
lifelessso we have an internal process gap22:04
mkanatlifeless: Okay, so that looks like a similar problem to the pygments problem. I'm guessing Locations.xml.in is a large file.22:04
lifelesspull the branch, should be easy to check :)22:05
mkanatlifeless: Yeah, I will.22:05
mkanatlifeless: I'll do some testing, see what takes so long.22:05
PhoenixzHow can I merge 2 branches but filter certain directories?  I have two projects that share a large part (some 90%) of the same code base.. When adding functions / fixes to project 1 I want to share those with project two, but there are various directories from which I do not want to share changes.. How do I do this?22:05
lifelessPhoenixz: sounds like you have three project22:06
lifelessmkanat: anyhow22:06
Phoenixzlifeless: three projects?22:07
lifelessmkanat: all the hangs we're seeing - peaking at 1/hour - were getting internally logged on the pygments bug, in may22:07
lifelessPhoenixz: common code, proj 1, proj 222:07
Phoenixzwell, I have multiple projects, yes, but for the ease of it, I limited it to two..22:07
Phoenixzlifeless: pretty much that yeah, common, prj 1, prj2, prjn...22:07
lifelessmkanat: I'm learning about how they get assigned and so on now, so that we can try to get better communication to you22:07
Phoenixzlifeless: so how could I merge in between these projects but filtering out a few directories so that I will not have those changes intermix?22:08
lifelessPhoenixz: the easiest way is not to filter stuff out22:08
lifelessbut to have the common code as a source project22:08
lifelessthat you merge - completely - into both proj1 and proj222:08
mkanatlifeless: Okay, awesome.22:10
mkanatlifeless: Only hangs after May 10 are significant, though, because that's when the system was updated.22:10
lifelessyou're sure ? Looked like the merge was 24th april to me22:11
lifelesshttp://bazaar.launchpad.net/~launchpad-pqm/loggerhead/devel/revision/17522:11
mkanatlifeless: https://bazaar.launchpad.net/~launchpad-pqm/loggerhead/devel/changes22:11
mkanatlifeless: It's revision 177 that matters.22:11
lifelessah, for both the pygments fix and the hang bug22:12
mkanatYeah.22:12
Phoenixzlifeless: meaning, I should make framework edits ONLY in the codebase, not in prj1, prj2, etc so that I never have to merge back, right?22:12
lifelessPhoenixz: yes22:12
lifelessmkanat: right, I see22:13
Phoenixzlifeless: problem is.. on various occasions its much easier to make those changes directly in the projects.. Like, I find a bug in the codebase while working on prj1, I fix it there, test it, its okay, etc.. then merge back to codebase...22:13
lifelessPhoenixz: so, make it where you want to; shelve the other changes, bzr switch to the framework, commit, bzr switch back, merge from the framework and you have your fix ready22:14
PhoenixzHaving to make changes only in codebase... would make it hard to test.. find bug in codebase while working on prj1, fix in codebase, commit, push, merge, pull into prj1, test, shit, forgot detail X, do it all again..22:14
lifelesswell you're going to need tests for the framework anyway22:14
mkanatlifeless: You actually have stats that say that the machine starts to swap during that hang and other similar hangs?22:15
lifelessspm: are you perhaps up, in ye place of monsoon ?22:16
Phoenixzlifeless: shelve.. seen that option, haven't used it yet.. Gotta do some reading on it first then..22:16
Phoenixzshelve is like.. temporarily storing the changes you currently have so that you can work on somehting else, commit that, and return to the changes you had before?22:16
lifelessyes22:17
Phoenixzsweet22:17
PhoenixzBZR rocks.. :P22:17
jpdsIt sure does!22:17
Phoenixzlifeless: anyway.. still there are some problems.. So I find a bug, I shelve, switch, fix... But there are functions that only really show when used in projects..22:18
Phoenixzlifeless: I don't suppose its possible to filter directories on merges?22:18
lifelessit is, but with various sideeffects you may not like22:19
Phoenixzlifeless: like?22:19
lifelessdepending on how you do it - including only some, or excluding ones you don't like after the merge.22:19
PhoenixzNobody likes sideeffects, but sometimes it may be worth it..22:19
lifelessIf you include only some, there's no record of whats merged, and you'll have unneeded conflicts.22:19
lifelessif you exclude ones you didn't want after the merge, you'll have both proj1 and proj2 in your history.22:20
lifelessbzr, just like git and hg, is a *full tree* vcs, so it records things in terms of trees, not individual files.22:20
Phoenixzlifeless: basically, I have separated directories for programs, libraries, configuration, etc.. all I want is to merge the library directories..22:20
lifelesssure22:20
Phoenixzlifeless: so what would options be?22:21
lifelessI've outlined them all now22:21
lifelessmy recommended one is to have a dedicated libraries project.22:21
Phoenixzah, sorry, thought there was another one22:21
gdoubleuI've got a branch of a svn repo (let's call it trunk), and then a feature branch from that.  Now, I want to get my changes from the feature branch into the svn repo, while preserving the individual commits.22:22
gdoubleuAs I understand things, a push to trunk is needed (instead of merge) so that the individual changes are reflected instead of one large merge commit22:23
gdoubleuProblem is, what if my feature branch has been long-running and I've already done a few merges from trunk along the way?22:23
lifelessgdoubleu: dpush is what you want, AIUI22:23
gdoubleudpush directly from the feature branch?22:24
Phoenixzlifeless: shelve does not store changes in between a switch, I suppose?22:25
lifelessPhoenixz: the changes are stored in the tree, so yes it does store them22:25
gdoubleuI've normally merged completed features back to trunk and then dpush from there.  In that case only one commit gets pushed to the svn repo, the merge commit.22:25
gdoubleuIn this case I would like to push all of the individual commits and not just the merge commit.22:26
lifelesssure22:26
lifelessmy understanding is that dpush is the tool for that22:26
Phoenixzlifeless: because then I could make the changes in project1, test them, if all is ok, shelve, switch, unshelve, commit.. no?22:26
gdoubleulifeless, trying to dpush from the feature branch straight to the svn repo complains that it would change mainline history22:28
gdoubleuI'm assuming this is because along the way in my feature branch, I've merged in updates from trunk22:29
gdoubleuAny ideas as to how I could clean those merge commits out of the feature branch so it's clean and doesn't change mainline history when trying to push back to the svn repo?22:31
lifelessmkanat: so on the 20th it was using too much swap and the losas restarted it22:54
mkanatlifeless: Okay. And it was also using a lot of threads at that time?22:54
mkanatlifeless: I want to make sure that there's not just one runaway thread using a ton of memory.22:55
lifelesscan't tell22:56
lifelessthere isn't a dump attached, its just a simple text log file22:56
lifelesssaying date, fault description, qa info22:56
mkanatlifeless: Okay. Are there still logs around from that time?22:57
mkanatlifeless: mwhudson or spm should be able to get them.22:57
lifelessmwhudson: ^22:57
lifeless2010-05-20 12:10 UTC22:57
mkanatlifeless: I have a crazy codebrowse log analyzer that I can use to see what was going on.22:57
mwhudsonmkanat: could that be adapted to something that could grab logs for a particular time range?22:59
mwhudsonit's a horribly manual process for me at the moment22:59
mkanatmwhudson: I don't know--I don't know how the logs are stored, or what you do to grab them.22:59
mkanatmwhudson: If you just want to send me the whole log, I can break it down.23:00
mkanatlifeless: Okay, yes, Locations.xml.in is 1.5MB.23:01
lifelessmwhudson: are there docs on getting the logs at the moment, or is it black magic?23:02
mwhudsonlifeless: it's not exactly black magic, it's just grotty23:03
mwhudsonand no docs23:03
mkanatlifeless: Okay, also, loading that file causes a TREMENDOUS MEMORY LEAK.23:03
mkanatWe leak almost 100MB every time that file is loaded.23:04
lifeless\o/23:04
lifelesspoolie: ^ see what I mean23:05
poolieyay max23:06
mkanatHahaha, thanks poolie. :-)23:06
mkanatMaybe it's time to learn how to use meliae. :-)23:09
lifelessits pretty nice23:09
pooliejam, hi?23:09
pooliemkanat, i filed a bug asking that we should dump memory usage when we get eg SIGUSR123:10
poolieyou might like to implement that ;-)23:10
poolieoh and there's another asking for a memory dump when we run out of memory23:10
mkanatpoolie: :-D23:10
poolieif we had the latter and we put a ulimit on loggerhead, we'd potentially get useful data semi automaticalyl23:10
lifelesspoolie: that latter one wouldn't help loggerhead so much ... machine has lots of swap configured23:10
mwhudsonmkanat: http://people.canonical.com/~mwh/debug.log.2-sub.gz <- logs from around 2010-05-20 12:10 UTC23:10
lifelessah yes23:10
lifelessulimit ftw23:10
mkanatmwhudson: Thank you! :-)23:10
mkanatpoolie: Well, lemme figure out meliae, first. :-)23:11
poolielifeless, in other words "a credit card limit is not a challenge"23:11
pooliewe can spend less :)23:11
lifelesswhat, sensible home accounts? nooo23:15
mkanatIs there any actual documentation on how to use meliae?23:18
lifelessyes23:19
lifelesshttp://jam-bazaar.blogspot.com/2009/11/memory-debugging-with-meliae.html23:20
mkanatlifeless: Thanks.23:20
lifelessjam: ow, zing23:30
mkanatjam: python: Objects/typeobject.c:2672: type_traverse: Assertion `type->tp_flags & (1L<<9)' failed.23:40
mkanatAborted (core dumped)23:40
lifelessrotfl23:40
lifelessits never easy23:40
mkanatjam: I got that using meliae on loggerhead.23:40
mkanatI'll try meliae trunk.23:41
mkanatYeah, same assertion and core dump.23:42
mkanatI'll file a bug with the core attached, if it's not too huge.23:43
lifelessdoes loggerhead have custom types in use23:50
lifelessspecial ones I mean, not the bzr stock ones23:50
mkanatlifeless: Not sure.23:57
mwhudsonno c ones23:57
mwhudsoni guess maybe it's something from sqlite?23:58
lifelessit has the ctype stuff for killing threads23:58
mkanatI'm still trying to get enough debuginfo packages installed to get a reasonable backtrace from the core.23:58
mwhudsonmkanat: use this: https://code.edge.launchpad.net/~pygdb-hackers/pygdb/trunk23:59
lifelessif you're on ubuntu, apport-retrace can grab them for you, I think.23:59
mkanatlifeless: I'm on Fedora.23:59
lifelessoh, sorry :)23:59
mkanatlifeless: Hahaha. :-)23:59
mkanatmwhudson: Awesome, thank you.23:59
mwhudsonmkanat: are you on 64 bit?23:59

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