/srv/irclogs.ubuntu.com/2012/03/14/#bzr.txt

thomispiv: hmmm, I can't see how to get a rev_id for a give file_id in the branch.repository inventory00:01
thomiahhh, this works (bug is kind of ugly): dict(inv.entries())[relpath].revision00:03
thomispiv: got it! Are you able to tell me if I;m doing anything really wrong in this: http://pastebin.ubuntu.com/882561/ please?00:09
lifelessthomi: inv[inv.path2id(relpath)].revision00:19
lifelessI think there is a more direct one still00:19
thomiahh, I didn't realise the inventory was usable like a dictionary :)00:21
Pikkachuhi, how can I keep an up-to-date reference in my code to submit or push branch?01:05
Pikkachuin the specific case, it's the branch url used as project home01:05
Pikkachudoes bazaar allow to create a commit hook at least?01:06
Pikkachuor is it better to just write an enclosing shell script which performs the changes before committing (for example using sed)?01:07
spivPikkachu: you can create commit hooks, yes01:15
spivPikkachu: I don't entirely follow what you're asking for, though01:15
spivPikkachu: you want the text you commit to contain the location of the submit or push branch?01:16
Pikkachuno, I want every commit to trigger the references in code to be updated before the commit is performed01:38
PikkachuI think I can enclose the commit with a previous look into .bzr and subsequent update of required files...01:48
Pikkachuwith a shell script, I mean01:48
=== Pikkachu is now known as PikkachuAway
=== PikkachuAway is now known as Pikkachu
=== Pikkachu is now known as PikkachuAway
=== r0bby is now known as robbyoconnor
Kamping_Kaiseris it possible to diff one bzr branch against another branch at an arbitrary revision?02:44
Kamping_Kaiseri want to find out if foo/ (at rev 13) was merged into bar (at rev 191) at any point02:44
spivKamping_Kaiser: bzr help revisionspec, see revno:02:46
spivKamping_Kaiser: e.g. -r revno:13:foo/..revno:191:bar/ I think02:46
Kamping_Kaiserspiv: i'll have a try, thanks.02:47
=== PikkachuAway is now known as Pikkachu
Pikkachuthanks spiv anyway03:02
spivOh!  It sounds a bit like Pikkachu wanted keyword expansion.03:37
mwhudsonnoone really wants keyword expansion do they?03:40
bob2lots of people think they do though03:40
* fullermd does.03:55
* bob2 expands fullermd's keywords into merge conflicts03:58
fullermdI didn't say I want a crap implementation of keywords   :p03:59
bob2haha04:00
pooliehey all08:46
vilahmm, internet access issues here :-/ Rare but painful event, seems to to come from ADSL itself which is worrying09:06
ggherdovvila: totally OT, but you hit a point that bothers me when I have unstable connections: i am conversating over IRC, then I am cut off from the internet, the person I'm talking with continues writing, but I miss part of the chat. Is there any kind of "IRC buffering thing" I can install on a remote server I have (which has reliable internet), in order to proxy my IRC connection thru a "stabilyzer"?09:10
mgzmorning all!09:11
vilaggherdov: probably what IRC proxies are about, I don't use one myself :-/ (On the other hand, since I'm connected via ADSL I think the availability have been like 99.999999% or something...)09:12
vilamgz: hey !09:12
* ggherdov IRC proxies... interesting.09:13
Pengggherdov: They're frequently known as bouncers.09:13
ggherdovPeng: good to know. thx.09:13
Pengggherdov: Personally, I prefer to run a command-line IRC client, and I usually run it on something with a stable connection that I have SSH access to. (That's what I'm doing now.)09:14
ggherdovPeng: I see your point. But is the SSH part of the connection is faulty, you risk to miss stuff. You still need you remote-cmd-line-irc-client to buffer stuff for you, and send all the stuff you missed when it sees you again.09:16
ggherdovs/is/if09:16
Pengggherdov: I use GNU screen, so the SSH connection doesn't have to be reliable.09:17
PengSorry, I should've said so, but I think of screen/tmux as a given when using SSH.09:17
* ggherdov Peng got game09:17
ggherdovPeng now I see. wow a powerful combination09:17
ggherdovbtw, using tmux since 2 months and it's a great util.09:18
PengI've never tried tmux. screen's good enough for me.09:18
ggherdovPeng: I use tmux in order to split my terminal in several shell in a tiledfashion. didn't know of the fault tolerance thing untill now.09:19
ggherdovshells*09:19
PengAh. I don't tile stuff.09:19
* ggherdov nobody's perfect :-)09:20
Peng:(09:22
nigelbPeng: tiling irssi leads to really really claustrophobic typing space :)09:41
PengBut but I need to IRC in six channels at once.09:43
nigelbhaha09:44
ggherdovthere was an option to 'bzr rm'  in order to bzr-remove a file that you had already bash-removed. what was that ?11:02
jelmerggherdov: there is no special option necessary11:03
jelmerggherdov: 'bzr rm' (without other arguments) should also pick that up11:04
ggherdovah good.11:04
ggherdovthx jelmer11:04
ggherdovI was mixing up with 'bzr mv --after'11:04
jelmervila: hah, the main user of .revision_history() is bzrlib.tests.per_branch.test_bound_sftp, but all tests there seem to be skipped for some reason11:29
vilajelmer: hmm, did I tyoped set_revisions_history ?11:31
vilain the line above ? yes :)11:31
mgz"Not a local URL"11:31
mgzfun.11:31
vilamgz: huh ?11:33
vilajelmer: so, having read your review (thanks !), I'm talking about *set_revision_history* not revision_history, probably related but still different beasts11:35
mgzwe don't really have a way of detecting test success->skip regressions11:35
mgzwithout carefully watching babune test counts across runs11:35
vilajelmer, mgz: By the way, I didn't touch code deprecated in 2.5.0, I can't remember what our rule is ? n+1, n+2 ?11:35
vilameh, rule to delete code deprecated in series n that is11:36
mgzvila: what you did seems fine, 2.4 gone in 2.6 seems right11:36
vilaanyway, there is still a bunch to remove before touching code deprecated in 2.511:36
vilak, thought it was a bit conservative but since there is still a bunch to do before touching that...11:37
vilaI think I saw code that was deprecated without any version attached which is... bad :)11:37
vilabut again, let's get rid of what we can safely remove first11:43
mgzjelmer: those tests seem too be skipping all the way back to 2.211:44
mgzit might make more sense to work out what they're trying to do, write new tests, and delete the module11:46
mgzthere's already bug 728252 for those tests skipping, so just proposed deleting them to reduce the chance of us rediscovering that again in future12:36
ubot5Launchpad bug 728252 in Bazaar "All tests in bzrlib.tests.per_branch.test_bound_sftp are skipped always" [Low,Confirmed] https://launchpad.net/bugs/72825212:36
mgz"Ran 1 test in 102.260s" heh...12:55
ams_csbzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Cannot add revision(s) to repository: missing chk node(s) for id_to_entry maps13:08
ams_csanybody know what I can do about that?13:08
jelmerhi ams_cs13:12
jelmerams_cs: can you provide some more background?13:12
ams_csI'm trying to merge lp:gcc/4.7 into (a clone of) lp:gcc-linaro/4.713:13
ams_csI've tried it on two machines and get the same result, so it doesn't appear to be some local corruption13:13
jelmerah, hmm13:18
jelmerI didn't realize those two branches had related history13:18
jelmerthat usually indicates branches having a slightly different view on shared history13:19
jelmercan you file a bug? I'll try to look into it.13:19
ams_cshmm, lp:gcc-linaro/4.7 was originally branched from lp:gcc/trunk13:19
ams_csupstream branched 4.7 from trunk (in SVN) a week or two ago13:20
ams_csdoko imported the new branch as lp:gcc/4.7, but they should share history right up to the svn branch point13:21
ams_csand lp:gcc-linaro/4.7 has not diverge far from lp:gcc/trunk13:21
ams_csjelmer: any luck?13:39
jelmerams_cs: still fetching the branches13:41
ams_csjelmer: yeah, that'll take a while. BTW, there's no need to have a local copy of lp:gcc/4.7 to reproduce the problem ... although maybe to debug it13:43
jelmerok13:53
mgzvila: did you file a bug for the bzrlib/locale thing?14:23
vilamgz: nope, sry14:23
vilamgz: this test_bound_sftp stuff is... worrying :-/14:24
mgzI think it's less worrying than it looks.14:24
vilahow d'you know we're not reducing coverage here ?14:25
mgzbecause the tests have never (at least since 2.0) actually been run.14:25
mgzwe certainly lack functional style testing on various real world things with both the smart server and other remote branches14:26
vilarevno 5030 (2.1 => 4857, 2.2 => 5120) says otherwise (but I can't run the tests there due to some testtools/subunit issue)14:26
vilawell, not 5030 but rather 5017.3.3314:27
vilabut what worries me is that we didn't notice it earlier14:27
mgzwe did!14:27
mgzspiv filed a bug :)14:27
vila# ?14:28
mgzlinked from the mp.14:28
mgzbug 72825214:28
ubot5Launchpad bug 728252 in Bazaar "All tests in bzrlib.tests.per_branch.test_bound_sftp are skipped always" [Low,Confirmed] https://launchpad.net/bugs/72825214:28
vilagha, I parsed that as added by lp :-)14:28
mgzanyway, deleting these certainly doesn't reduce coverage, and I don't think there's much worth salvaging from their logic14:29
vila... color me confused but how to you know these doesn't reduce coverage ?14:30
vilas/to you/do you/14:30
mgzwe have pretty good unit testing for bound stuff, and we know we have holes for functional testing14:31
vilaha, ok14:32
mgzvila: eg. bt.per_branch.test_branch.TestBound14:34
jelmerit does seem kindof odd to have these kinds of tests in bt.per_branch14:35
mgzwe're not testing against remote branches, but that's been true for... ages14:35
vilayeah, yeah, I mis-interpreted :)14:35
vilaindeed, looks like very old bb tests14:35
vilaapproved by the way14:36
jelmeruhoh14:38
jelmerI guess that means https://code.launchpad.net/~jelmer/bzr/remove-branch-history/+merge/97411 will conflict14:38
* vila reviewing, was about to mention14:38
mgzjelmer: you made them run again?14:40
vilanope, he made them keep skipping ;)14:41
vilainstead of erroring :)14:41
mgzwell, I better win the race then :)14:41
jelmerwell, I kept them around but at least avoided the calls to the functions I was removing14:42
vilawhich is a bit unfortunate :-/14:42
vilaerr, I mean, it's unfortunate you spend time on them not knowing they were skipped anyway14:44
jelmervila: in what way? It should be trivial to resolve the conflict..14:44
jelmerah14:44
jelmerwell, not the worst thing in the world :)14:44
Pikkachuwhat a straightforward way to make automated pre-commit (1) validations and/or (2) source code modifications? I'm just thinking of using shell script or the like15:06
LarstiQPikkachu: you could look at how the bzr-text-checker plugin works15:11
=== zyga is now known as zyga-afk
ams_csjelmer: any news?15:31
jelmerams_cs: I'm still looking, but I'm pretty sure it'll take a couple of days squash this bug. I'm not really familiar with this bit of the code.15:38
jelmerams_cs: I'll file a bug about it and subcribe you - who are you on Launchpad?15:38
ams_csams-codesourcery15:38
ams_csjelmer: thanks, I was hoping there'd be a work-around :(15:39
alansaulIf I push over the top of a respository, can get get the previous one back?15:40
jelmeralansaul: yes, by using "bzr pull -rREV ."15:45
jelmeralansaul: yes, by using "bzr pull -rREV . --overwrite"15:45
mgzone jelmer always tells the truth, and the other jelmer always lies15:47
mgzhow can you tell which command to run?15:47
alansaulLol15:47
alansaulUh oh15:47
mgzokay, so maybe I'm an idiot, and someone would have pointed the problem out by now if it was actually the case but...15:48
mgzdon't the .mo files never actually get installed?15:48
mgzso... all that translation stuff we did for 2.5 isn't actually enabled?15:49
vilamgz: as in: on debian/ubuntu you mean ?15:50
mgzwell, I'm looking at the code in setup.py15:50
vilaI thought we had bug reports about that and that you even fixed some of them... may be we are 2 idiots :)15:51
mgzit may be that the way debian builds it the files are included, but they don't seem to be in the windows installer15:51
LarstiQhow does gettext on windows work btw?15:51
mgzbadly.15:51
mgzehem...15:52
vilait misses a leg or two may be...15:52
mgzpython has it's own implementation, so you just point it at a directory of specially arranged .mo files15:52
vila. o O (post-install tests)15:54
mgzhm, there are .mo files in python-bzrlib15:55
mgzso, however we're building for debian works somehow at least15:55
vilaWARNING: gnome-keyring:: couldn't send data: daemon closed connection15:55
vilawhile running the full test suite15:56
viladoes that ring a bell ?15:56
mgzbut the code seems to need the build artefact to exist at setup.py invocation to include it15:56
mgzwhich... implies you must run setup.py twice for it to function15:56
jelmermgz: translations seem to work here..16:01
mgzjelmer: how do you build for debian exactly?16:02
mgzthe intersection of makefile and setup.py is a little confusing16:02
mgzI'm trying to fix the inplace creation of .mo files but don't want to accidentally break you.16:03
jelmermgz: don't worry about that16:04
mgzoh but I do :)16:08
Pikkachusorry, pidgin crashed, who was talking to me?16:24
Pikkachuthe text checker plugin seems overkill16:24
=== zyga-afk is now known as zyga
LarstiQPikkachu: sure, but the interest for you is the pre-commit machinery?16:39
wgzwhat was that thing from lifeless about not using "should" in bug titles?16:41
wgzI'm struggling to phrase things without it16:42
jelmerwgz: I think the point was mainly that bug reports should primarily describe problems16:43
jelmeras opposed to a ticket tracker I think16:44
LarstiQwgz: I find that hard too16:45
* LarstiQ looks it up16:45
wgzI think it was on google+ so good luck ever finding it again...16:47
PikkachuLarstiQ: I don't want a machinery that's why it's overkill, I want some simple concept16:51
PikkachuLarstiQ: I don't need to set up and configure any machinery for using an enclosing shell script with the custom rules for each branch, for example16:52
Pikkachuwgz: maybe because it's implied16:53
wgzPikkachu: that's contradictory16:53
Pikkachuhow so?16:54
wgzyou want to do something pre-commit, but not have to worry about any machinery for doing things in response to actions?16:54
LarstiQwgz: actually, it is the second hit on "bug should" in my circles16:54
Pikkachuwgz: I mean for example "Bazaar should grep revisions from diffs" => "Grep revisions from diffs in Bazaar"16:55
LarstiQwgz: https://plus.google.com/u/0/105660309458564946897/posts/BLhnbgoouXV16:55
Pikkachuwgz: ah you mean my case, ok16:55
wgzLarstiQ: logging in and being in Robert's circle is cheating :)16:55
Pikkachuwgz: it's not contradictory, it's you who's not understanding16:55
LarstiQwgz: isn't that how you find stuff on g+? ;P16:56
LarstiQPikkachu: could you explain some more what you're trying to do?16:56
wgzPikkachu: I mean, sure you can write a shell script that does something and then calls bzr commit, and use that rather than commit itself16:57
Pikkachuwgz: doing complex things may require a machinery setup or not, making the former case unnecessarily complex, that's what I mean. In this specific case, I don't want to depend on some plugin installed and configured for anyone willing to commit to the branch. This can be completely avoided16:57
Pikkachuwgz: the shell script has the advantage of not requiring any installation, it's self-contained in the branch and ready for use for anyone who branches the repo16:58
wgzprovided they remember to run it instead of using commit16:59
Pikkachuwgz: READE.BEFORE.COMMITING :)16:59
Pikkachuwgz: or seriously, for a single file branch, commit.sh will call user's attention unless he's dumb17:00
wgzdoesn't seem that different from having an instruction in there to cp commit_hook.py to ~/.bazaar/plugins17:00
wgzbut whichever you like.17:01
wgzit would be nice to have a better mechanism for branch-specific thingies, but there are reasons it hasn't happened17:01
Pikkachuwgz: that's why I was looking for a even better solution, but pre-steps like installing and configuring stuff *so that* I can achieve what I want is a non-go. This step can be completely replaced with a shell script already there and ready for using17:02
wgzmostly because the idea of branching something then meaning it automatically runs arbitrary code when you do some operation is scary17:02
Pikkachuwgz: I think a more straightforward solution was if I was able to register a commit hook natively within the branch without any external setup required17:02
wgzthere are a few threads on the bazaar list on this topic17:02
lamalexjml, with testtools, what's the proper matcher to ensure something is not None?17:03
jmllamalex: assertThat(x, Not(Is(None)))17:03
Pikkachuwgz: I'd be really surprised that bzr does not support commit hooks though17:04
wgzit does, you just need to manually install them, for the above reason.17:04
jmllamalex: I guess if you wanted to you could define 'IsNotNone = Not(Is(None))' and then do assertThat(x, IsNotNone)17:04
lamalexha right17:05
lamalexthanks17:05
lamalexi wasn't reading carefully and skipped over Not :P17:05
lamalexwhoope17:05
Pikkachuwgz: manually install? how so?17:10
wgzas mentioned, `cp commit_hook.py ~/.bazaar/plugins/commit_hook.py` or similar.17:13
wgzprobably want `mkdir -p ~/.bazaar/plugins` first.17:14
wgzif you desperately want to write your checking logic in shell you'd have to use subprocess from the commit hook callback17:16
wgzjelmer: you're the man today. or maybe the page?17:22
Pikkachuwgz: I have no idea what to put within that file17:25
Pikkachuwgz: besides a hook should be a hook not what the hook holds17:25
Pikkachuwgz: a hook is supposed to just trigger something, not be that very something17:25
jelmerwgz: eheh17:26
jelmerwgz: This coming from somebody with surname that's just begging for VCS-related puns?17:26
jelmer*a17:27
Pikkachuwgz: I mean something like $bzr add-hook --pre-commit --system "commit-validation.sh"17:27
LarstiQPikkachu: in my hazy memory something like that exists17:27
jelmerPikkachu: that is what this is, except it is in Python, not shell.17:28
wgzPikkachu: LarstiQ was trying to help you earlier linking an example17:28
Pikkachuwgz: or $bzr add-hook --post-commit afterCommitting => afterCommitting.py, run it directly from within python instead of catching output/return value from a system executable17:28
jelmerPikkachu: hooks are installed per-user, perchance using per-branch configuration data. They don't live in the branch itself, for security reasons.17:28
Pikkachujelmer: if it's like wgz is saying, then it's not really a hook, it's a plugin which catches commit events17:29
LarstiQPikkachu: branch.Branch.hooks.install_named_hook('pre_commit', pre_commit_hook, 'text-check')17:29
wgzapart from a slightly different wrapper, I don't see the difference17:29
PikkachuLarstiQ: 'text-check'?17:30
LarstiQPikkachu: that is from bzr-text-checker, it is the analog of your `bzr add-hook --pre-commit text-check.py`17:30
Pikkachujelmer: what reasons17:30
jelmerPikkachu: if I download a branch from somewhere, tweak it and then run "bzr commit" I don't want to run arbitrary code that came from that branch.17:30
PikkachuLarstiQ: no it's not, mine is a command line, yours is python code17:30
LarstiQPikkachu: hence, analog17:31
PikkachuLarstiQ: no17:31
PikkachuLarstiQ: it may be analog but not in the sense I mean17:31
=== yofel_ is now known as yofel
LarstiQPikkachu: and as I also said, I remember there being something to run arbitrary commands for hooks17:31
Pikkachujelmer: that's easy to fix17:31
PikkachuLarstiQ: ah thanks...that would be interesting....17:32
jelmerLarstiQ: there is bzr-shell-hooks, which allows you to define shell commands to run in .bzr/branch/branch.conf17:32
jelmerI haven't updated it in a long time though, so it may have bitrotted17:32
LarstiQPikkachu: apparently, it is called bzr-shell-hooks ;)17:32
Pikkachujelmer: so you're the author? cool... by shell you mean any system command or the underlying shell like bash etc?17:33
Pikkachuis it my imagination or can plugins be installed within a branch?17:33
LarstiQPikkachu: you can have configuration for them in a branch17:34
jelmerPikkachu: plugins can't be installed within a branch, they're installed in the users home directory17:34
jelmerPikkachu: bzr-shell-hooks installs trivial hooks that can run commands configured in the branch17:34
LarstiQjelmer: or well, you _could_ point BZR_PLUGIN_PATH at a branch17:35
jelmerLarstiQ: that's true17:36
lamalexhi im trying to write a push hook, and i want to get the author of the last commit17:37
lamalexreally i want all the authors for each commit since the point where its parent was branched17:37
lamalexbut just the one is fine for now :P17:37
jelmerlamalex: your hook should receive the relevant revision ids, which you can use to retrieve the revision metadata17:37
lamalexanyone have a tip? i see i can get the revision easily, but i dont see what i can actually do with that17:37
jelmerlamalex: The revision object has a .committer attribute which is just a string with the author name and email, and it has a .get_apparent_authors() method which returns a list of strings with authors17:38
lamalexah nice17:38
lamalexso would i take that from my target branch17:39
PikkachuLarstiQ: the BZR_PLUGIN_PATH seems a good idea if bzr-shell-hooks is lightweight, this way users would not be required to install it17:41
jelmerlamalex: yeah, usually. since you're sure the revision is present there17:42
Pikkachulamalex: how are you writing a bzr hook?17:42
LarstiQPikkachu: on the other hand, you might not want to forcefully override their plugin path17:42
lamalexPikkachu, http://doc.bazaar.canonical.com/beta/en/user-guide/hooks.html17:42
Pikkachujelmer: well, wasn't you who said about security risks? and yet has such a plugin like bzr-shell-hooks? :P17:43
lamalexjelmer, so do i just take that id and make a new revision?17:43
LarstiQPikkachu: are you confusing me with jelmer?17:43
lamalexRevision(id).get_apparent_authors17:44
jelmerPikkachu: that's exactly why bzr-shell-hooks is a plugin, and not part of the core17:44
jelmerPikkachu: also, I don't actually use bzr-shell-hooks myself.. it was just a quick hack a couple of years ago17:44
Pikkachulamalex: that looks like non-branch specific17:46
Pikkachuno LarstiQ: "jelmer: Pikkachu: hooks are installed per-user, perchance using per-branch configuration data. They don't live in the branch itself, for security reasons."17:46
lamalexPikkachu, i have no idea what you're talking about. i'm guessing you pinged me due to a misunderstanding17:47
Pikkachulamalex: we're talking about commit hooks, coincidently17:47
jelmerlamalex: e.g. something like target_branch.repository.get_revision(id) will return the revision object17:47
lamalexah, im talking about push hooks17:47
lamalexbut totally unrealted17:47
Pikkachulamalex: I want a commit hook on a specific branch, not wherever I typ bzr commit17:48
LarstiQPikkachu: that's easily controllable with configuration17:48
* LarstiQ eats dinner17:53
Pikkachuactually I will explain the exact problem:18:16
PikkachuI have a pidgin plugin written in C which needs to provide an URL, I didn't care to register a project in LP so the URL is basically [...]/+junk/branch-name. But it happens that this URL is already contained in .bzr as push/submit branch. I want to keep source code always up-to-date with what's in .bzr. Any ideas?18:19
Pikkachuwell, actually I think it doesn't matter that much it being in source code, more in the resulting builds...18:19
Pikkachutherefore I could implement this as a build step not a commit hook... but I don't want to use make because I would duplicate code from pidgin build environment which is mostly required anyway in windows18:20
Pikkachuso any ideas? thanks18:20
jelmerre18:23
jelmerPikkachu: I'm not sure I follow what you mean; are you talking about changing the default locations for 'bzr pull' and 'bzr push' ?18:25
Pikkachuno... nevermind I think I'll resolve the problem myself18:32
LarstiQPikkachu: at build time you want to say "this code came from <here>"?18:48
Pikkachuat build time it would be like:18:54
Pikkachuplugin.c => #define URL "@@PLUGIN_URL@@", then18:55
Pikkachusomething like using sed for replacing @@@PLUGIN_URL@ from what's within .bzr before compiling it18:56
LarstiQright18:56
LarstiQsort of like the `bzr version-info` use case, but with different data18:56
Pikkachuseems like not18:57
LarstiQPikkachu: where would the url come from? Is `bzr config parent_location` sufficient?18:57
Pikkachu$ bzr help version-info => Show version information about this tree.18:57
Pikkachushows, does not change anything18:57
LarstiQPikkachu: read on18:57
Pikkachuah sorry...18:58
Pikkachunice to know about $ bzr config, I'm not sure if it's submit or push branch, but yes it's either of it18:59
Pikkachuunfortunately the submit/push urls are not available there :(19:01
LarstiQPikkachu: if they're not set probably not19:01
LarstiQPikkachu: but it depends on your workflow what will be in there19:01
Pikkachuthe ones listed are {date} {build_date} {revno} {revision_id} {branch_nick} {clean}19:02
LarstiQPikkachu: e.g., in my bzr.dev copy submit_branch is not set, but in my 2.5-fixes branch it is19:02
LarstiQPikkachu: ah, in version-info?19:02
LarstiQright, that is what I meant with "different data"19:03
LarstiQPikkachu: I wonder if it makes sense for version-info to include this data19:03
Pikkachuit includes the branch nick already19:03
LarstiQPikkachu: yeah, but that is more portable19:04
LarstiQPikkachu: it's actually contained in the commit data19:04
PikkachuI don't get this command though, the example says it will *generate* a C header file?19:04
LarstiQPikkachu: in the example the template will give valid C syntax19:05
LarstiQPikkachu: and then you'd direct the output to, say, build_info.h19:05
Pikkachubut I don't think it meant to " produce a C header **file**", just a valid header string19:06
Pikkachuanyway, I think I can simply seek into .bzr anyway19:07
LarstiQPikkachu: that is more fragile, but if you want, yes19:07
LarstiQPikkachu: sure, the example is a valid header *fragment*. The common use of it would be as a single header file though. And of course your template can be more complicated19:08
PikkachuI think the help message needs a small fix19:09
Pikkachufragile in which sense, just missing to be there?19:09
LarstiQPikkachu: that, and in theory subject to change19:10
LarstiQPikkachu: what fix to the help message do you propose?19:11
PikkachuLarstiQ: change what, the config format/location?19:11
LarstiQPikkachu: yeah19:11
LarstiQPikkachu: you're poking around in internals19:11
LarstiQPikkachu: that's always at ones own risk19:11
PikkachuLarstiQ: fix: not mentioning it will generate a file, it just generates text output which is supposed to be placed separately into a file (from what I've got of what the command does)19:12
PikkachuLarstiQ: I just forgot, I can use cd branch; url=$(bzr config push_location)19:13
LarstiQPikkachu: or even `url=$(bzr config -d branch push_location)`19:14
Pikkachuoh I tried without -d, cool!19:17
Pikkachunow the problem is: I reuse the whole pidgin build infrastructure, because most of it is required anyway19:18
Pikkachua pidgin windows build environment contains everything a regular plugin requires, plus the ability to build them if you place them in the correct place19:19
PikkachuI could duplicate the makefiles and make them point to pidgin root, but I think it's overkill19:20
Pikkachuhmm I just had an idea19:20
Pikkachusomething like build.sh:20:02
Pikkachuurl=$(bzr config push_location | sed 's/\//\\\//g')20:02
Pikkachucat plugin.c | sed s/@url@/$url/ > "$devroot/pidgin-$version/pidgin/plugins/plugin.c"20:02
Pikkachucd "$devroot/pidgin-$version/pidgin/plugins" && make...20:03
LarstiQPikkachu: right.20:03
LarstiQPikkachu: stylistically I would go for including a header instead of rewriting plugin.c, but that's a small niggle20:04
PikkachuLarstiQ: it's overkill to split the plugin into a separate files, and it doesn't rewrite the plugin itself, but the copy from which it will be built20:08
Pikkachuthe above would be the same as copying the plugin to there then sed -i20:09
Pikkachuhmm actually I could use your suggestion to avoid build.sh not being used (if one copy the file to there and $ make it, then the url will remain as "@url@" in the binary)20:11
* LarstiQ nods20:11
Pikkachuif I use #include "plugin.url.h" then 'URL' instead of @url@, compilation will fail if build.sh is not used and no header is manually created...sounds interesting, thanks for the tip LarstiQ20:14
Pikkachuthanks all for the constructive discussion!21:19
pooliehi all21:45
pooliehi lifeless21:45
* jelmer waves to poolie22:42

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