/srv/irclogs.ubuntu.com/2012/09/19/#bzr.txt

bob2why did you version things you don't want to keep00:08
=== lifeless_ is now known as lifeless
mgzmorning08:09
jamhi mgz08:25
jelmerjam, mgz: hi08:57
mgzmorning jelmer, feeling any better this morning?09:01
jelmermgz: Somewhat, fever seems to be gone  but still having an aching head.09:02
mgzcut it off!09:02
fullermdCut off his head, or cut off his body?09:03
mgzjust the achy bit09:04
viladoh, sorry about that jelmer, I didn't know that kind of virus can propagate via IRC...09:12
jelmer:P09:12
mgzvila: on bug 99640109:16
ubot5Launchpad bug 996401 in Bazaar "'bzr config' fails to display config templates referring to "unknown" options" [High,Fix released] https://launchpad.net/bugs/99640109:16
vilayes ?09:16
mgzas far as I can see, there's still no way for gordon to store the line needed for the merge tool without config trying to expand things that don't exist when just using `bzr config OPTION`?09:16
vilalet's split your remark into 1) no way to store 2) just using bzr config OPTION09:17
vila1) is not true, there is no expansion when storing a value09:17
mgzthere's no way of quoting the { to say "this is a { in the option, not an config template"?09:17
vila2) is not applicable for a template that will provide the missing options09:18
vilathere is no need for quoting09:18
vilathe trick is that most options are expanded by default, but *some* should not (templates for examples)09:19
mgzcurrently it seems like any config option that might have {} in it will behave oddly in some circumstances09:19
vilahehe, name one :)09:19
mgzwell, the merge tool, it's using {} for its own templating, not done by config09:20
vilabut that's a template so when dealing with config you should ask for no expansion09:20
vilathat's the point of templates...09:20
mgzbut it's not a *config* template, it's a string config stores that happens to be a template09:21
vilaconfig provide (now, not when gordon wrote his stuff) .expand_options() for exactly this purpose09:21
mgzah, so you now want the config lookup to do the resolution?09:22
viladig the review of gordon's proposal, it was a known missing feature and I didn't want to block him09:22
mgzthat's a little complicated by merge needing to know what arguments are present to know what files to create on disk09:22
mgzas different merge tools expect different inputs09:22
vilano, templates should use expand_options(string, env={the needed additional options that are not config options})09:23
vilathe additional options do not need to be registered, each template can define whatever it sees fit09:24
vilathe only drawback is that 'bzr config TEMPLATE' needs to specify --all to *avoid* expansion, small price to pay for an edge case IMHO09:25
mgzright, but merge tool needs to know what the additional options are specifically (which vary for different merge tools), before doing work09:26
vilaerr, it cannot deduce unknown options from thin air, there is only a limited supported set09:26
vilait's unrelated to config but specific to mergetool09:27
mgzright09:27
mgzso, mergetool should really have a way of just escaping the templating entirely...09:27
vilait has, config.get('template', expand=False)09:27
vilaand I'm pretty sure it already uses it09:28
mgzthis is an edge case, but having magicstring  syntax without a way to say in the string that the next bit isn't syntax is odd09:28
vilaYAGNI09:28
vilaso better keep that stuff simple09:28
mgzit'd be like having \0 mean something but \\0 meaning \ + NUL rather than \ + 009:29
vilayeah, I know the rationale and generally dislike the absence of escape notation, but there is just no need here09:29
vilaat least I've yet to see a case where it's needed09:30
mgzI find the story from the question linked to that bug a pretty persuasive one, and it's not fixable from the mergetool side09:37
jelmermgz: still there?09:37
vilamgz: url ?09:37
vilamgz: sry, missed 'from the bug'09:37
mgzhttps://answers.launchpad.net/bzr/+question/196441 <- ftr09:38
vilaright, the misunderstanding there is that template can be used with 'bzr config TEMPLATE' as said above, that's an edge case where you should indeed use 'bzr config --all TEMPLATE'09:39
vilawhy will an escape mechanism address that ?09:40
vilayou may as well say that templates should use a different reference format09:40
vilaand a different expansion framework09:40
mgzbut from the user perspective, that series of steps seems sensible, but the output makes it look like you've messed up09:41
viladoc bug then09:42
mgzit's not really, why should they read documentation for that?09:42
vilawhere did they hear about mergetool ?09:42
vilahow would they find which parameters they need to provide to their new mergetool without a description of {this} {other} {result} {tmp-whatever-I-can-never-remember-that-one}09:43
mgzwhat do we add to <http://doc.bazaar.canonical.com/bzr.2.5/en/user-reference/configuration-help.html#bzr-mergetool-name> to make it clear that using mergetool breaks config?09:44
vilaoh come on, using mergetool do not break config, mergetool *cannot* be used without config09:45
vilaand you just found where the fix should go :)09:45
vilaalso note that this piece of doc mentions that some arguments need to be quoted (yeah, a different issue than the config escape mechanism)09:46
vilaI mean, I'd rather add an escape mechanism to config than deal with users confusion when they need to use it :)09:47
vilabah, bzr.mergetool.kdiff3 is not even registered :-/09:50
vilamgz: https://pastebin.canonical.com/74784/09:54
mgzvila: in unrelatedness, the progress bar config option is nice09:56
vilain itself you mean ? Or how the proposal fixes the bug so trivially ?09:57
mgzboth!09:57
=== mmrazik is now known as mmrazik|lunch
vilaright, you know, my new config proposal started with: "Not all needs can be addressed by the default values used inside bzr and09:58
vilabzrlib, no matter how well they are chosen (and they are ;)."09:58
vilaprogress bar is the canonical example: we went through several iterations to dwim... but in the end, there are always edge cases where the user should be able to set the Right Thing09:59
vila... and without needing to write a single line of code10:00
mgzvila: so, apart from "the following will (rightly) break"... that doc change is okay10:03
vilahehe10:04
vilaso s/(rightly)// ?10:04
vilahttps://code.launchpad.net/~vila/bzr/mergetool-doc/+merge/12515010:04
vilaby the way10:04
mgzI'm not sure you want to give the broken example at all10:05
fullermdIf we don't give broken examples, how will people know it's open source software?10:05
vilawell, then the working one makes less sense as --all requirement is less clear10:06
vilafullermd: pff10:06
mgzif we don't give "you're doing it wrong you silly user" documentation, how will people know...10:06
fullermd... that they're using git?  But this is for bzr, isn't it?10:07
vilawell, I'm pretty sure simone (the guy/girl) asking the question read that doc you cited and mergetool templates can be tricky...10:07
* fullermd has got his snark burner running on overdrive tonite.10:07
vilalunch break, bbl, daughters hate it when they prepare it and I'm late ;)10:08
mgzgirl I think, but that sounds so much more condecending that guy10:08
mgzthere's not a good equivalent, so guy should just become gender neutral10:08
fullermd"motile sack of mostly water"?10:09
vilaI think simone can be a male italian first name10:10
fullermdAnyway, it's English; the masculine has always been the gender mixed-or-indeterminate form for pronouns, at least up 'till the last couple decades of rampaging.10:11
mgz...blasted continentals, I'm still not used to andrea being a male name, or anne10:11
fullermdMany years ago, in my youth, I knew this guy named Jamie, who was dating this girl named Jamie.10:12
mgzeveryone needs sensible, obviously masculine names, like matthew.10:12
fullermd(I'm pretty sure that was the _only_ reason they dated, briefly as it was)10:12
fullermdNo, only the most handsome and brilliant people should have named like Matthew.10:13
bob2haha10:13
bob2I knew a couple of James's10:14
ant384Hello.10:43
mgzhey10:44
ant384Just starting with Bazaar. I set up a repository on a server, checked out a trunk, and now I'm playing with stuff. I managed to get info on all subjects except creating a header with keywords such as $Date$, $Author$, etc. I installed bzr-keywords, but can't figure out how to make it work. I used the version-info command to generate a version.py, but don't know where to place it. Please help. :)10:45
mgzso, in general keywords are a bad habit from older vcses that you want to drop for other ways of doing things with a dvcs10:46
fullermdFor the former, the keywords plugin functions mostly at a PoC level.  For the latter, it depends what you want to do with the version.py   ;)10:47
mgzputting that info into your build system rather than your versioned source is generally advisable10:47
ant384I'm only working on python and shell scripts so far, so I'd like to have a header in them, in order to know what I'm testing / working on. Is it a bad idea in itself ?10:50
mgzant384: yes, you can just get that info from the vcs itself10:51
mgzwith a fancy editor, you can even have a call out to bzr to display that stuff to you alongside the file10:51
mgzfullermd may have suggestions on that front10:51
ant384So if I have a script that does X things on serveral machines, how do I make sure it's updated to the last version, if all I see is the code itself, with no version information ?10:52
fullermdIn probably a good 75% or so of the cases where you'd use keywords in CVS, there are better choices in modern systems.10:52
fullermdIn the other 25 or 20 or 10 or whatever percent...   well, you suffer.10:52
mgzant384: so, for example in that case, seeing the revno/date of last commit to the branch you're working on by the file would solve that10:54
=== mmrazik|lunch is now known as mmrazik
ant384So simply compare the script creation date with the date of the last commit to the branch ?10:58
fullermdThat wouldn't tell you anything definitive, at least absent very particularly constrained workflows.10:59
fullermdOne common simple setup would just be that you don't throw the script around by itself, you just have real branches or checkouts or whatever of it on each system, so you have all the VCS info right there to see.11:00
ant384Aiee.11:00
ant384Well, here's my current situation: maintaining / developing some bash and python scripts for my employer, aside from my real job. They're generally unique to the machine they're deployed on. I "develop" on my workstation, and use "header" type information in each file. Now I got a server that's usable as a central repository for code (among other things).11:02
ant384The idea was to get everything on that server in Bazaar, then checkout scripts when I work on them, commit, and then deploy.11:03
ant384Are you suggesting that it's a sane (you can tell I'm not really a programmer :) ) solution to check out each script on each machine it's used on ?11:03
mgzwhat would you do otherwise, scp?11:04
fullermdIt can be.  A very situational thing.11:04
mgzthe real question is whether it's sane to have a branch per independant script11:04
mgzand I do do that for some things (again, with a few helpers to making using bzr-as-rcs a bit nicer)11:04
ant384Some of the scripts get very large. I would love to use a versioning system to track changes and plan work.11:05
fullermdThe alternative, assuming the keywords PoC isn't sufficiently there for you (which I expect it isn't) is that the "deploy" process has to do whatever rewriting to stash the info somewhere convenient.11:05
ant384I see.11:06
fullermd(e.g., with sed(1), as I do in one project)11:06
ant384So instead of linking version info to the source file, I should link it to the deployment process, and only generate it as needed.11:06
mgzyes, or just have checkouts as your deployment11:07
ant384I'll give it some more thought. Thanks a lot for the opinions, guys. :)11:09
=== zyga_ is now known as zyga
=== mmrazik is now known as mmrazik|otp
=== mmrazik|otp is now known as mmrazik
=== beuno_ is now known as beuno
=== Guest70664 is now known as slank
=== slank is now known as Guest79513
SamB_MacG5okay, I've got a run_bzr()-based test, and I want to look at the output of a bzr command for debugging purposes ... what can I stick into the test temporarily to do that ?13:48
SamB_MacG5hmm, "assert False" after a selft.run_bzr *almost* works, but it has "\n"s instead of actual newlines13:48
mgzso, run_bzr returns (out, err) as strings13:51
mgzone way to develop is to do `out, err =  self.run_bzr(...); self.debug()`13:51
mgzwhich will drop you into pdb and you can look at the locals13:52
mgzor you can `self.assertEqual("", out)` and work from there13:52
SamB_MacG5ah, cool13:58
SamB_MacG5darn, something is wrong with "bisect run" ...14:21
* SamB_MacG5 wonders if he can have broken it?14:22
mgzSamB_MacG5: more specifically? or have you worked it out?14:53
SamB_MacG5Well, at least, I'm confused about my attempts to write a grep-using testcase for the -r feature I'm adding ...15:00
mgzSamB_MacG5: if you stick some code in a branch or pastebin I'd be happy to give pointers15:01
mgzthe hiccough is probably that the current tests aren't that great15:02
SamB_MacG5well, it doesn't seem to make a difference whether I tell it to run "grep one test_file_append" or "grep -v one test_file_append" in my attempt at a test ...15:04
SamB_MacG5lp:~naesten/bzr-bisect/683822-bisect-start-range-argument/ and https://gist.github.com/375015015:05
SamB_MacG5and yes, I know it's kind of silly to use gist for bzr stuff, but I had an Emacs command for it handy, so ...15:05
* SamB_MacG5 has to run15:05
* SamB_MacG5 will check back for tips later, though: thanks for offfering!15:06
SamB_MacG5mgz: so long!15:07
mgzlater!15:08
mgzSamB_MacG5: so, run_bzr doesn't actually start a shell subprocess, so you can't just use grep15:12
mgzbisect has support for running a script, but that's as a seperate command15:12
mgz...which you're using, but not with an actual script, but directly?15:13
mgzbisect is somewhat arcane here, what's it actually doing15:13
mgzSamB_MacG5: your grep is just wrong I think, you want it to only match on rev 3 but not rev 4 and 515:35
mgzbut test_file_append alwasy has 'one' in it... it gets appended to, not replaced15:36
mgzSamB_MacG5: and more specifically, -v is not useful because there's always at least one line that doesn't match -> returncode 015:42
ls3_Hello. How can I find out where 'bzr push' is going to push to by default?  (ie with no push args)16:03
LeoNerdbzr info16:04
ls3_ah wow, thanks.16:04
mgzwhat LeoNerd said, or `bzr config push_location` for just that16:05
ls3_Do you mean 'parent_location' ?  I get push_location does not exist.16:05
mgzright, that. :)16:06
mgzhm, no, push_location16:06
mgzbut it might not be set16:06
mgzin which case `bzr push` will tell you that16:07
=== deryck is now known as deryck[lunch]
=== deryck[lunch] is now known as deryck
SamB_MacG5mgz: oh, duh, always one line that doesn't match ...18:16
SamB_MacG5thanks!18:16
SamB_MacG5oh, he's gone18:17
jelmer... and there's no wgz atm :(18:17
SamB_MacG5anyway, yes, the documentation for "bzr bisect run" should mention that the command is run through the shell...18:18
=== yofel_ is now known as yofel
=== Guest79513 is now known as slank
=== Lasall- is now known as Lasall
delinquentmehey all .. I want to add a single file to a commit23:16
delinquentmeand bzr decided to add every file that was changed to the commit23:16
delinquentmei used $ bzr add /path/to/file.rb23:16
delinquentmeand then $ bzr commit -m "som merssage"23:17
delinquentmethen i get this: https://gist.github.com/60ff7b7c9c6f886e194623:18
delinquentmeam I doing something wrong here?23:18
SamB_MacG5delinquentme: bzr assumes you want to commit everything unless told otherwise23:18
SamB_MacG5lately I've been using the qcommit command, which lets you uncheck what you don't want23:19
delinquentmehow can I only add files which I specify to be committed23:19
SamB_MacG5"bzr help commit" probably says?23:20
delinquentmelooking ...23:21
delinquentmeand how about to drop back to the previous commit?23:21
delinquentmesomething akin to $ git reset --hard HEAD^23:22
* SamB_MacG5 forgot23:23
delinquentmebzr help qcommit giving me nothing23:26
delinquentmein the event of a conflict23:34
delinquentmewhich file is the one that is .moved23:34
delinquentmethe one which was previously committed to the repo is the normal one ... right?23:35
delinquentmeand the local copy which differed... is renamed with .moved23:35
fullermdAs for the former, you're reading 'add' in a git way.  In bzr it just adds the file to the list of those being tracked.  If you want to commit only a subset, you list them in the commit command line.23:39
fullermd"previous committed to the repo" is pretty ambiguous.  .moved comes about because a new file (dir, etc) was created independently in the local and the remote branch.  I believe the one called .moved is the one that came about locally.23:40
lifelessgit add really should be git stage23:41
lifelesscalling it add just breaks folks brains if they use svn/cvs/bzr/hg/monotone/tla/darcs23:42
fullermdSure, but it's great for those p4 people!23:42
lifelessall three of them?23:42
fullermdIt's a question of quality over quantity.  At least, it better be...23:43
bjpis there a way to specify a revision range after (but not including) a tag?23:52
bjplike -rtag:sometag..  without the tag23:53
bjp*without the tagged revision23:53
delinquentmefullermd, example of the "  If you want to commit only a subset, you list them in the commit command line. "23:59
delinquentme?23:59

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