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

vilahi all !07:44
=== vila changed the topic of #bzr to: Bazaar version control <http://bazaar.canonical.com> | try https://answers.launchpad.net/bzr for more help | http://irclogs.ubuntu.com/ | Patch pilot: vila
jelmeryo vila07:58
vilajelmer: hey !07:58
pooliehi all08:03
jelmerhi poolie08:07
mgzmorning all08:09
vilamgz: hey08:09
pooliehi mgz, jelmer08:10
poolie:)08:10
vilamgz, jelmer: 'bzr st' says 'bzrlib/locale' is unknown, any idea where it's coming from ?09:28
mgzthe build09:28
mgzit should probably be added to ignores09:28
mgzmo files get put in there09:29
mgz(otherwise it's a pain to test locale stuff in place)09:29
vilaooooh, and a full test suite run triggers a build...09:29
vilabad isolation :-/09:30
vilaok, thks09:30
vilayeah, probably worth adding it to .bzrignore09:30
mgzhm, yeah, selftest really shouldn't build mo files in place09:30
jelmermo files mo problems09:30
vilaLOL09:31
vilajelmer: in other words: config options are good to test command-line parameters before making them official, I'm far from convinced that --overwrite-tags should be an official cmdline parameter (which is totally different from being convinced that *right* now (including 2.5) we *need* a way to overwrite tags)09:51
mgzvila: do you have any idea why doing -Olaunchpd_username= isn't enough to revert from bzr+ssh to http?09:52
mgzalso, is there a way of unsetting a value, rather than using an empty string?09:52
fullermdlaunchpd?09:52
mgz...irc tyop only09:53
fullermdOh, right, I missed that you were talking to vila.  Yeah, gotta keep it in his dialect  ;p09:53
vilamgz: the missing 'a' is a typo right ?09:54
vilamgz: ha ! authentication.conf ! lp-login creates a section there :-/09:54
vilacrap, read the log before replying vila...09:55
mgzaha, and authentication.conf is still a special case.09:56
jelmervila: I disagree, if we add a configuration option for something before making it official then that means that we have to update all format implementations twice, plus all of the skew that comes with API changes09:58
vilajelmer: meh, your're assuming it will become official...10:02
jelmervila: you did :)10:02
jelmer10:51 < vila> jelmer: in other words: config options are good to test command-line parameters before making them official,10:02
vilatest doesn't imply success10:03
jelmerwhat do you want to test in that case?10:03
vilathat pull and push are the right place to add the parameter for example which is not obvious 'bzr tags' or something along the way to versioned tags may well be better suited10:04
vilaghaa, miss punctuation10:05
vilathat pull and push are the right place to add the parameter for example ; which is not obvious. 'bzr tags', or something along the way to versioned tags, may well be better suited10:05
vilaif push and pull is not appropriate your arguments about API skew will then apply to the removal10:06
* fullermd finds the whole discussion a little bizarre...10:06
vilafullermd: see https://code.launchpad.net/~jelmer/bzr/overwrite-tags/+merge/91277 and https://code.launchpad.net/~jelmer/bzr/overwrite-tags/+merge/9455110:07
jelmervila: I really don't see why this would need be tested in that way10:07
jelmervila: if you think pull and push are inappropriate for this option, then I think it's fair to bring that up during review10:07
jelmervila: I don't see why this is something we would want to test and then perhaps later revert, or why 'bzr tags' might be more appropriate10:08
vilawithout a better definition of versioned tags, I can't10:08
fullermdOh, I've seen the discussion.  It just seems wacky.10:08
jelmerfullermd: what's wacky about it?10:08
vilasince there is a way to bring in the feature *without* adding a parameter that may be removed later, I prefer the less intrusive path which address the issue now and leave us room to decide later10:09
fullermdThe whole idea of using the "config option" tool for the "vary how the command works this one time I invoke it" job leaves me wanting a drink.10:09
jelmervila: I don't see why the configuration option leaves us more room to remove it later.10:09
vilaremoving the cmdline param10:10
jelmervila: what about removing the cmdline param?10:10
jelmerremoving the cmdline parameter and configuration option both break backwards compatibility.10:10
vilanot adding the cmdline param means we won't have to remove it10:11
jelmervila: but then we'll have to remove the configuration option10:12
jelmerUsing a configuration option is just a slightly implicit way of passing the information along from the command-line to the underlying code10:12
vilawhich is less intrusive, opt-in and less work overall than a cmdline param in term of support down the road10:13
jelmervila: how is it any less intrusive *or* opt-in?10:13
jelmerin both cases the backends will need to be updated to support the new functionality10:14
vilabut not the front-ends10:14
jelmerthe frontend change is trivial, and without it it is really hard to discover this functionality10:14
vilayou may consider it trivial but its fallouts are not10:16
jelmerwhich fallouts?10:16
vilaIf we have --overwrite-tags, I can argue that during pull in a dirty wt, I also want an option that will overwrite my local changes if they conflict with the versions I'm pulling10:17
vilathere is no end to that10:17
vila--overwrite-tags is a work-around for lack of versioned tags, can we agree on that ?10:18
jelmervila: partially, overwrite tags makes perfect sense with versioned tags too10:18
jelmervila: I don't see how a working tree is relevant here, tags are associated with branches10:19
vilaif you go that route, --take-other on bzr pull also makes perfect sense, where do you draw the line ?10:19
vilathe working tree analogy is relevant in the context of versioned tags where bzr provides a way to resolve tag conflicts10:20
vila--overwrite-tags is a simplification, I may well cherry pick which tags I want to override10:20
jelmervila: so is --overwrite, which currently *already* overwrites tags10:20
fullermdThat whole really sounds like a perfect-enemy-of-the-good sort of argument.10:22
fullermdPull is already a bit of a mess of confused branch-vs-wt actions.  This sorta continues in that vein and doesn't really make it better.  But I'm not sure that it really makes it _worse_.10:22
vilajelmer: no, --overwrite will works the same with versioned tags, it resets the branch tip10:22
jelmervila: it would also reset the tags, I hope10:23
vilajelmer: me too10:24
jelmervila: so I don't see why it's so odd to also allow people to *just* overwrite the tags, not the branch tip10:24
vilabecause it's only one out of several choices which only make it more obvious that the UI is broken until we have versioned tags10:25
* quicksilver wonders if jelmer recommends any *particular* drink for working with bzr config options.10:26
vilaso rather than adding one option now and another (or several later), I'd rather say: look, we know we have an issue there, this option will address the most obvious shortcoming *until* we have a more complete solution10:26
jelmervila: by that reasoning, we should have never added the current unversioned tags in the first place10:27
vilano10:27
vila:)10:27
vilatags are they exist today address valid uses cases10:28
jelmervila: This still brings us down to the same basic question: how is a configuration option less permanent than a command-line option?10:28
vilabecause we can say so :)10:28
jelmervila: We can do so with a command-line option too.10:29
jelmerquicksilver: :)10:29
vilait doesn't carry the same weight10:29
jelmervila: Why not?10:30
vilaand doesn't have to be tighted to a particular command10:30
vilaif you call it tags.overwrite for example it can be used by both pull and push today and by tags tomorrow and will better reflect the feature itself rather than the command behavior10:31
jelmervila: I don't see how you would want to use this with 'bzr tags' tomorrow, even with versioned tags. Why does that matter if people are going to specify this on the command-line to push and pull?10:32
vilajelmer: bzr tags or whatever command we add to deal with versioned tags10:33
jelmervila: why does that even matter? It will still require code changes to the backends *and* it will require users to change their use of bzr, both with a command-line option and with a configuration option.10:34
jelmerI'm sorry, this whole point just seems surreal to me.10:35
vilawe're running into circles if you keep ignoring my objection about adding a parameter to commands which shouldn't have to handle tags in the first place :-/10:36
vilathe distinction seems pretty clear to me: an option makes it clearer that we working around an issue, it feels dirty to add official parameters for each and every workaround10:37
vilawhatever is needed for the front-ends, the backends should be updated to address the issue, split that part and the issue is addressed10:37
mgzvila: tags are clearly a special case, and pull isn't drowning in switches10:37
vilamgz: good, let's not start then10:38
mgzin many ways I think a config option is worse10:38
mgzthis is likely to be something most people will only want to do on occasion10:38
mgzwhereas encouraging them to turn it on all the time without thinking is likely to lead to mistakes10:38
vilahold on, where did I encourage anyone to turn it on all the time ?10:39
fullermdIn the term 'config option'.10:39
mgzby suggesting a config option rather than a switch, that's the direction we're poking people in10:40
vila.. which doesn't say anything about the default value :)10:40
fullermdIt may functionally be a distinction without a difference, but it's still conceptually a distinction.10:40
mgzit's an encounter problem once, set config option, forget you did it, kind of scenario10:40
mgzwhereas with a switch you need to pass it every time you want the different effect10:40
vila-O is not persistent and should be the recommended use10:41
vilamgz: this perfectly applies to -O10:41
mgzwe have this even with https cert optionss where we suggest -O in errors but people are unsuprisingly setting the option globally10:42
vilathe distinction I make between the cmdline param and the option is that the cmdline param says: we will support it for this cmd, whereas the option is more blurry about being tighted to the cmd or not10:42
vilamgz: that's yet another bug (already filed) that we don't provide a way to set it on a per-host basis, different use case10:43
jelmervila: a configuration option should apply to all things where it is relevant10:43
vilajelmer: exactly, that doesn't mean the set of things can't evolve10:44
jelmervila: the point is, 'bzr pull' and 'bzr push' already deal with tags. my branch isn't changing anything about that, it just gives users a bit more control over how tags are handled.10:45
mgzI think --overwrite-tags is the right thing for now, and it's not that hard to deprecate switches if we completely change how tags work in the future, especially one that basically becomes a noop10:45
vilaand that's my objection: we don't know yet whether it will always apply to push/pull and we already know it doesn't really fit well there, it's the only reasonable place today10:46
jelmervila: sure, but how is a configuration option better in that regard?10:46
vilaread above10:47
mgzmy objection is the reverse, the mp is too worried about how things may change, rather than just fixing the tags problem :)10:47
jelmervila: if we remove tag dealing from bzr pull then whether users use 'bzr pull -Otags.overwrite=true' or 'bzr pull --overwrite-tags', we'll have to break backwards compatibility.10:48
vilajelmer: and it will be less work for an option than for a cmdline param, that's the point10:50
vilawell, one point10:50
vilathe other being that we won't have added an option fully knowing it wasn't the right place for it10:50
jelmervila: we probably don't want to silently ignore that option but print some sort of warning; I'm not sure if a configuration option is easier in that regard10:50
vilagrr a cmdline param not an option10:51
jelmervila: either way, it shouldn't really be a big difference either way10:51
jelmers/either way//10:51
mgzvila: but you also would want a -Ooverwrite=true config option? That's asking people to make mistakes.10:51
mgzthis isn't a configy thing.10:51
vilamgz: no, --overwrite makes perfect sense for a branch10:52
vilathere were discussions when tags were introduced with concerns about leaks, this is one more leak10:52
vilapeople are already sometimes confused because you can pull (or even push locally) into a dirty tree, this will add to the confusion10:54
jelmervila: pull and push *already* deal with tags, this doesn't make it any worse, it just gives users more control.10:54
vilausing an option recognizes that we know this is a workaround10:55
mgzI'm with fullermd, I don't really thing it makes the current status worse10:55
vilawell, obviously we're not making progress and we can't reach a consensus, to me, this means there is something wrong. I don't see what I can add to clarify further :-/10:58
fullermdThat generally means we're all pointing at somewhat different things as being The Problem.11:00
fullermdThere _are_ various differences in the implications of removing command line options vs. config options.  I don't think they're particularly relevant though (partly because I just don't see how removal gets on the forseeable horizon anyway).11:02
fullermdBut I'm outside the circle that really gets a say in it, and I've got a meeting in ~9 hours I really should get some sleep before, so...11:06
vilafullermd: enjoy your sleep !11:07
jelmerfullermd: Thanks for trying to help resolve it11:07
jelmerWe indeed don't seem to be making much headway11:07
vilafullermd: you have a say in it11:08
jmlif I want to fetch a get a local tree for a particular revision of a remote branch, what's the fastest way to do that? checkout? export?12:01
jelmerjml: it should be export12:03
=== Ursinha` is now known as Ursinha
=== beuno is now known as beuno-lunch
=== beuno-lunch is now known as beuno
=== yofel_ is now known as yofel
=== 17WAAYI1Q is now known as zyga
=== r0bby is now known as robbyoconnor
mgrandihi, wondering if anyone could answer a question about bzr-git for me :19:18
jelmermgrandi: sure19:30
mgrandiso, you probably remember i was pushing a bzr branch to github19:31
mgrandiwhen i branched it originally, it had some git commits, then i made some in bzr19:31
mgrandiand those commits had bzr revision ids19:31
mgrandiand then when i pushed to github, those were replaced with the git-v1:<sha> revision ids19:31
mgrandii was just wondering if the bzr ones were saved somewhere or they revision ids just changed when you start pushing to a git repo?19:32
jelmermgrandi: the original revisions are still in the repository, just no longer in the branch19:34
mgrandiso the branch essentially just has two sets of revisions, the bzr ones and the git ones?19:34
mgrandierr repo*19:34
jelmermgrandi: the new revisions are created by fetching the changes that were pushed into git back into bzr19:34
jelmermgrandi: the bzr ones are no longer used after 'bzr dpush'19:35
jelmermgrandi: you can keepusing the bzr revisions in your local branch by using 'bzr dpush --no-rebase'19:35
jelmerbut if you do that, your local branch and the remote git branch will have diverged19:35
mgrandiah ok19:35
mgrandiso this way you are theoretically the same as the git branch, albiet being in bzr19:36
jelmermgrandi: yes - and using 'bzr dpush' will discard all information that can not be represented in git19:36
mgrandiit will discard it in the local branch as well?19:36
jelmermgrandi: unless you specify --no-rebase19:37
=== KombuchaKip1 is now known as KombuchaKip
mgrandiok. is it necessarily a bad thing if you use --no-rebase ? will it still show up as one branch on the git side or will it show as merges from another branch sorta19:38
jelmermgrandi: if you use --no-rebase then your local branch will diverge from the remote git branch19:38
jelmerbecause the revisions have different contents and different revision ids19:38
mgrandiyeah, but all i'm doing is really just mirroring my changes on github19:38
mgrandiand pushing to github occasionally19:39
mgrandiso in that case it wouldn't really matter if my local branch diverged since i'm working in bzr mostly19:39
jelmerin that case 'bzr dpush --no-rebase' should probably work sufficiently well19:39
mgrandiok. cool =)19:39
jelmermgrandi: but you'd have trouble pulling in changes from people who base their work on your git branch19:39
mgrandikeyword "probably" =P19:39
mgrandiah.19:40
jelmermgrandi: at some point bzr-git will support 'bzr push' itself and just store bzr metadata in git revisions for things that can't be natively represented in git19:40
mgrandiin that case i'll just leave it be. what sort of things cannot be represented in git, just curiously?19:40
mgrandiah thats cool!19:40
mgrandiwould it be stored as a file or something or does git have a metadata thing19:41
jelmermgrandi: revision ids, file ids, revision properties, ghost revisions19:41
jelmerit would be stored as a magic file and in git notes19:41
mgrandimagic file as in just a file that only bzr uses?19:41
jelmeryeah19:42
mgrandithats cool =) thanks, i was just curious19:42
mgrandiand something to keep in mind if i ever care about the revision ids19:42
jelmermgrandi: well, you care about the revision ids if you e.g. want to use 'bzr dpush --no-rebase' and merge in contributions from people using git :)19:44
mgrandiyeah19:44
mgrandicause then it gets all confused im assuming19:44
jelmermgrandi: well, not really confused; they are in fact different revisions :)19:45
mgrandiyeah, which would make merging harder then it should be19:45
mgrandiso i'll just leave it without the --no-rebase thing for now in case i ever need to merge something back in it19:46
mgrandialso, i'm intereted in perhaps participating in the GSoC thing, even if i don't actually 'offically' participate in it, but it would be cool to work on something20:00
mgrandii dunno if anyone decided on what stuff to do for it, although i saw people on the list were talking about netbeans support, which i assume is a java ide, and i know java fairly well20:00
jelmermgrandi: there is a page with GSoC ideas20:10
jelmerlet me find the link20:10
mgrandi(although i feel an eclipse plugin might be better, since many things use eclipse, android, flashbuiler, eclipse itself, etc)20:11
jelmermgrandi: http://wiki.bazaar.canonical.com/SummerOfCode201220:11
jelmermgrandi: I think we would be happy to mentor you, whether as part of SoC or outside of it20:11
mgrandiyeah.20:12
mgrandiquick question, what in bzr uses CPython?20:12
mgrandire the 'porting bzr to python 3'20:12
jelmermgrandi: apparently bzr works reasonably well in pypy, LarstiQ should know the details20:13
mgrandiwell i mean20:13
mgrandibzr is written in python, so i dont see why it was saying good knowledge of cpython is needed unless there are C excentions or something20:14
mgrandiunless its referring to porting bzr to pypy or something, not just making it work with python320:15
jelmermgrandi: well, there are a bunch of implementation details in Python3 you have to know about to do the porting20:16
jelmerespecially regarding character encoding handling20:16
mgranditrue20:16
mgrandithats always fun20:16
LarstiQnote that while pypy has 3.x support in the works it currently implements python 2.7 api20:31
LarstiQso working in pypy doesn't help with working in python 320:31
LarstiQimo the two paragraphs under "Alternative Python implementations" are unrelated20:32
mgrandiyeah20:32
mgrandithats what confused me xD20:32
LarstiQmgrandi: there are, afaik, two eclipse plugins20:34
=== zyga_ is now known as zyga
mgrandilast i heard they didn't work too well20:34
* LarstiQ nods20:35
LarstiQnot that I'm an eclipse user, but that is indeed my impression20:36
mgrandimight be good to start with. although eclipse is a beast within itself haha20:38
thomiHi. I have a bzrlib Branch object, a relative path within that branch, and some line numbers, and I'd like to work out who wrote those lines (essentially like annotate, but only for certain lines in a file).22:48
thomiit looks like I need a VersionedFile object from a branch, but I can't see any easy way to get one. Any hints?22:49
spivthomi: you should be able to resolve the path to a versionedfile via branch.repository22:51
spivAlthough I forget the exact method22:51
thomispiv: ok, thanks. I'll poke around :)22:52
spivBut basically it's the branch's repository that actually holds all the records about the history22:52
spiv(You may need the current revision ID, branch.last_revision(), to pass to whatever repo API you need)22:53
spivI'd start by looking at how annotate works :)22:53
thomicheers22:55
=== ubot5` is now known as ubot5
thomispiv: I'm so close to having this working - the problem I have now is that bzrlib.annotate.annotate_file_tree calls _print_annotations, but I just want to get the annotation information...23:30
thomiI could reimplement annotate_file_tree in my code I guess..23:31
spivthomi: yeah, the core of it is just a call to branch.repository.texts.annotate((file_id, file_rev_id))23:44
spivthomi: (as you might have already found, file_rev_id might not be branch.last_revision(), you need to consult the branch.repository.inventory to map your file path to the file_id,rev_id pair to use)23:45
thomiyeah.23:46
spivEr, not quite literally branch.repository.inventory, but you know what I mean I think :)23:46
thomiI hadn't seen the repo.texts thing, i was trying to do it some other way23:46
spiv(I'm getting rusty at bzrlib clearly!)23:47
thomiyep23:47

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