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

MTecknologyhow can I make a patch file for binary changes?07:21
Peng_MTecknology: You can't with bzr, but "bzr send" does include binary data in a base64-encoded block at the end (along with other stuff).07:23
MTecknologyPeng_: oh, I have a source_A and a source_B which is source_A + changed; I want to apply the changes from the two onto source_C07:25
Peng_MTecknology: ......"bzr merge"?07:25
MTecknologyI don't know what the actual changes are though :P07:26
Peng_OK, I'm way to sleepy to understand this conversation, sorry.07:27
MTecknologyPeng_: aight - I should head that way too07:28
=== kirkland` is now known as kirkland
=== radoe_ is now known as radoe
radoeHow do I get rid of the remembered locations from pull/push --remember?08:47
lifelessyou can edit .bzr/branch/branch.conf08:54
lifelessor just --remember a better url08:54
* mtaylor pokes lifeless 09:46
LorStill continuing about the uniqueness of file-ids: a special metadata file should have a file-id that is uniquely determined by the id of the tree root.09:55
jelmerLor: I'm not sure if that's necesarily a good idea09:56
LorSo we want the metadata files to have distinct ids when they are in unrelated branches (to avoid collisions in joins), but if the same metadata file is created two times in related branches, they should have the same id.09:56
jelmerwhat would happen in the case of nested trees, in which case multiple versions of this file could exist in different trees?09:56
jelmer(file ids need to be unique)_09:56
LorThose different trees must have distinct tree root ids anyway.09:56
LorThat's the whole point of rich-root, iiuc.09:57
jelmerLor: Sure, but all of the files in those trees also must have unique file ids09:57
jelmerLor: So if e.g. .bzrmeta always had the same file id then it would make it impossible for nested trees to contain .bzrmeta09:57
LorNo, .bzrmeta will have an id that is in one-to-one relation with the id of the tree root.09:58
LorSo each distinct subtree (with a distinct id) will also have a distinct id for .bzrmeta09:58
jelmerLor: in that case, what's the point of having a constant file id?09:58
LorThe point is that if a plugin creates the metadata file in two related branches, then there won't be a path collision (only a text collision, which can be handled) when the branches are merged.09:59
jelmerLor: That's a problem with all sorts of parallel imports, not really specific to the issue you're raising.10:00
jelmerI think we should just handle that situation better in general10:00
LorYes, true.10:00
LorBut metadata files have clearer identities than random imported stuff.10:00
LorIt's better to avoid assigning two file-ids to what is known to be a single logical file identity, when that is possible.10:01
jelmerLor: You should be able to already specify a manual file id if you know how to generate it though10:03
LorYes, obviously it is possible.10:03
LorI'm talking about what should be the convention for plugin authors when they create metadata files.10:03
LorEspecially if .bzrmeta is to be used by everyone, then it would be good that whoever first creates .bzrmeta gives it the "right" file-id.10:05
jelmerLor: I think if it's considered a good idea to have a common file id for that directory, we should add a convenience method to bazaar that creates that directory for you10:07
jelmerit can then also take care of assigning the right file id, etc10:08
LorRight.10:08
clbri'm looking for a way to only merge certain revisions from branch A into branch B (or excluding some). I'm wondering if this is conceptually possible?10:11
jelmerclbr: hi10:13
clbrhi10:13
jelmerclbr: yep, you can specify individual revisions to merge using -c or -rR1..R2 to merge a range of revisions10:13
clbrthx, this was easy :-)10:14
clbrI'll try if I get the results I expect10:15
LorIncidentally, is there some rationale available for bzr's handling of clean ambiguous merges?10:15
Lorhg decides to treat them as conflicts, whereas bzr sees no problem10:16
Lorbzr's approach is certainly more practical, but hg seems to Do The Right Thing10:17
mwhudsonLor: what do you mean by "clean ambiguous merge" ?10:17
LorThe same change being done in two distinct branches, which then get merged.10:17
mwhudsonbzr's default merger is based on a majority voting three way merge i think10:18
LorYes, but _why_ do it this way?10:20
Lorhg docs provide a rationale for their choice10:21
LorI'd like to see something similar for bzr10:21
mwhudsondunno really10:21
mkanatLor: Personally, I'd be extremely annoyed if identical changes showed up as a conflict.10:24
LorI can't find the rationale from ht docs right now, but here's how it went:10:24
LorSuppose that in the original you have:10:25
Lor#define NUM_THINGIES 310:26
Lorenum { FOO, BAR, BAZ } Thingy;10:26
Lor(Those lines might be in completely different places)10:26
LorIn THIS you have:10:26
Lor#define NUM_THINGIES 410:26
Lorenum { FOO, BAR, BAZ, QUUX } Thingy;10:26
Lorand in OTHER you have:10:26
Lor#define NUM_THINGIES 410:26
Lorenum { FOO, BAR, BAZ, FNORD } Thingy;10:27
LorAfter the merge, we _don't_ want to have #define NUM_THINGIES 410:27
mkanatLor: That will conflict anyway, though.10:28
mkanatLor: Because the enum line isn't the same.10:28
mkanatLor: Oh, I see what you mean, though.10:28
LorI'm talking about the #define line.10:28
LorIt might be far away from the enum.10:28
mwhudsonLor: but there are always going to be cases where a clean merge doesn't mean working code10:28
LorAlso, the items of the enum line might be listed one per line. Then an automatic merge could handle it.10:28
LorTrue enough.10:29
mkanatLor: Yeah, I think that case is uncommon enough that I'd rather have it merge for me.10:29
mkanatLor: Given that otherwise, in some branches I'd be getting literally hundreds of conflicts on merge.10:29
LorBut that's because your changes do have a common origin that the version control system just can't track?10:30
LorIf you just apply a patch to two branches, then bzr won't have any way of knowing that the changes are really the "same" change.10:31
mkanatLor: Yes, I actually had a discussion about this the other day with folks here.10:31
LorDid darcs come up? :)10:32
mkanatLor: Ha. No, DaggyFixes did.10:32
mkanatLor: But I think DaggyFixes is a bad, hackish solution.10:32
mkanatAnd also one that isn't broadly-applicable enough to development processes to work.10:32
LorDarcs tries very hard to Do The Right Thing.10:32
mwhudsonLor: have you seen http://github.com/droundy/iolaus ?10:32
mkanatLor: Actually, though, bzr doesn't worry about *identical* patches.10:33
mkanatLor: It handles those fine, now. So that's why those merges are good for me.10:33
LorYes, well, obviously it is impossible for a non-semantics-aware tool to guarantee that the result of a merge makes any sense.10:36
LorIt's just a question of what level of imperfection to strive for.10:37
mkanatLor: Well, I think it's more of a matter of what's the most practical for the majority of users.10:37
mkanatLor: That is, if it's a question that can't be solved for 100% of them in all cases.10:37
Loriolaus seems pretty neat10:40
LorThe semantics of darcs with the performance of git would be a sweet combo.10:41
Lor(Still, I'm not very fond of git.)10:41
mwhudsonyou could do something similar for bzr i think, the model is similar enough10:42
Lorloom and pipeline are the first steps in that direction10:45
mwhudsonwell10:47
mwhudsona similar direction i guess10:47
LorThose require you to specify the dependencies explicitly, and with coarser granularity, and the dependencies form a list and not a full graph. But anyway.10:48
spivLor: the rationale for clean merges when both sides make the same change is:11:03
spiva) if both sides agree then it's probably what you want, and11:03
spivb) it makes coping with cherrypicks much more pleasant11:03
spive.g. the scenario of backporting a particular fix from trunk to a stable release branch, but then later merging that release branch back into trunk.11:04
LorYes, but that seems like a symptom of the fact that the history of cherry-picks isn't tracked.11:04
spivSure.11:05
spivIf you want it'd probably be not too hard to provide a plugin to trigger conflicts in this case.11:06
LorTrue enough.11:07
spivOddly enough users most don't ask for more conflicts ;)11:08
spivKind of related: http://doc.bazaar.canonical.com/bzr.dev/en/user-guide/hooks.html#example-a-merge-plugin11:08
LorYes, I just wrote one.11:09
LorA trivial one, though: the metadata file is recreated during commit, so the merge hook doesn't need to do anything except notify that there is no conflict.11:09
spiv*nod*11:10
LorAnyway, there should also be subsume- and extract-hooks.11:12
LorOr, preferably, versioned per-entry metadata, so it gets moved automatically during a join or split.11:12
wgrantWith bzr 2.1.1 and bzr-git 0.4.3 on Lucid, attempting to branch from a git://... URL crashes like http://paste.ubuntu.com/432198/13:11
wgrantAny hints?13:11
parthmjam: https://code.edge.launchpad.net/~parthm/bzr/538868-message-for-heavy-checkout/+merge/2448313:13
=== IslandUsurperAFK is now known as IslandUsurper
LorIs it a policy that every distinct plugin hosted by launchpad should have its own project?14:02
LorEven if it's just a single file?14:02
jelmerwgrant: that's the bug I was talking about earlier with upstream python changing behaviour14:04
jelmerwgrant: doing an SRU for that is on my todo list for this week14:04
LorAlso, what's the preferred way to share code between plugins?14:08
maxbLor: The way Launchpad, especially its automatic stacked branches, works, makes it very much preferable for there to be 1 project per group of branches sharing history.14:11
maxbThat pretty much implies 1 project per plugin14:11
LorNot really.14:12
LorI could develop several plugins in a single branch.14:12
LorAnd have a project that covers all those plugins.14:12
jelmerLor: that makes it hard to check out those plugins though14:12
LorIt seems a bit ugly, but it would allow straightforward code sharing.14:12
LorHard to check out? How?14:13
jelmerLor: you can't just run "bzr branch lp:foo ~/.bazaar/plugins/foo" anymore14:13
LorWell, I never do that anyway, I create explicit symlinks.14:13
LorI think it's bad style to have any real content in dot-directories.14:13
LorWell then, it is also possible to just develop a single plugin (a single directory, that is), that provides lots of unrelated functionality.14:14
LorLike bzrtools.14:14
LorIs that considered bad style?14:15
jelmerLor: it depends on the tools I guess14:15
jelmerLor: the stuff in bzrtools is all quite small so the maintainance overhead probably doesn't make it worth having separate plugins14:16
LorI just wrote a plugin that is 143 lines.14:16
LorIt doesn't quite seem worth its own project.14:16
jelmerLor: what does it do?14:16
LorIt records mtimes of modified files in .bzrmeta/mtimes14:17
jelmerLor: I think that probably deserves its own file14:17
jelmer*plugin14:17
LorI find myself defining lots of general-purpose auxiliary functions that bzrlib doesn't provide. I'd like to use those in other plugins, too.14:18
spivLor: projects are cheap ;)14:18
LorWhat do I do?14:18
jelmerLor: can you give examples of those auxiliary functions?14:18
jelmerI haven't noticed that so far14:18
spivLor: submit patches to bzrlib!14:18
jelmeror not anymore, rather :-)14:18
Lorhttp://pastebin.com/pi1Fw2YV14:18
dickelbeckNeed help on a command line formulation.  The built in help is not cutting it....14:25
dickelbeckI want to get the diff between the latest rev in a branch and the previous version.  How?14:26
dickelbeckA single file.14:26
LorPrevious version of the file or previous revision of the tree?14:27
spivdickelbeck: bzr diff -c -1 FILE14:29
spivHmm, or perhaps bzr diff -r -1..-2 FILE depending on the direction you want.14:30
dickelbeckspiv: thanks, but that is outputting nothing.14:32
dickelbeckis there a way to show the last changes, regardless when they occurred?14:32
jelmerLor: the first one seems like it could be in bzrlib somewhere14:33
jelmerLor: the second one doesn't seem generic enough to me14:33
dickelbeckLor: previous version of the file14:33
Lorjelmer, I would expect that something like the second one is needed by any plugin that creates metadata files.14:35
LorOops, default_path shouldn't be optional.14:36
spivdickelbeck: oh, I see, I thought you meant the file as it was in the previous revision of the entire tree14:37
jelmerLor: it encourages the use of hardcoded file ids though, and they are a bad idea14:38
spivdickelbeck: I don't think we have a good shortcut for that :/14:38
jelmerLor: it should be possible for the user to create such files as well14:39
LorDidn't we just talk about this?14:39
jelmerLor: yes, but we concluded that constant file ids were bad right?14:39
spivdickelbeck: although if I want to explore changes in old versions of a file I usually go straight to using something like 'bzr qannotate'14:39
LorNot globally fixed but determined by the root id.14:39
jelmerLor: file ids based somehow on the root id are a less bad idea14:39
LorThat's what's supposed to be given as an argument.14:39
LorSure, the above function could be given an "id template" which it would then mangle with the root id to create the actual file id of the created file.14:40
jelmerLor: I'd rather see something more specific for that situation14:40
jelmeri.e. something that also makes sure .bzrmeta exists with a particular file id and takes a file-id postfix14:40
LorWell, the function is underscored for a reason. :)14:41
jelmerLor: it's also a bad idea to require that a path has a specific file id14:41
spivYeah, we should provide some facilities to help plugins use .bzrmeta14:41
jelmerLor: it should be possible for the user to create these files manually14:41
LorNot in this particular case.14:41
LorThe user isn't supposed to even see the file, much less alter it.14:41
jelmeralways14:42
jelmerLor: if the user isn't supposed to see the file it shouldn't be in .bzrmeta14:42
LorWhere, then?14:42
LorI want the file to be versioned.14:42
jelmer.bzr/14:42
spiv.bzr is the place for "No user serviceable parts inside"14:42
LorYes, but it isn't versioned.14:42
jelmerLor: supporting this properly would require a format change14:43
LorWhat should I do in the interim?14:44
spivHold your nose and use .bzrmeta, probably.14:44
LorCurrently the idea is that .bzrmeta/mtimes is recreated from scratch during commit.14:45
LorOnly the versions from the parent trees are read, not the one in the working tree.14:45
jelmeralternatively this sort of thing could supported by the luggage proposal when it is implemented14:48
jelmer*baggage14:48
mwhudsonjam: you there?14:55
jammwhudson: I'm here now14:57
jamdownstairs in Pomegranate14:57
mwhudsonjam: a good time to come down now?14:58
jammwhudson: yeah, should be14:58
mwhudsoncool14:58
mwhudsonbe there in a bit14:58
dickelbeckspiv: thanks, bye.15:00
LorIs it recommended that even single-file plugins are implemented as myplugin/__init__.py instead of myplugin.py?15:14
spivLor: I think so; it gives you a place to put a README etc, and also means .pyc files are out of the way15:18
LorOkie.15:18
LorStill, code sharing seems tricky.15:19
LorWell, nested trees would in theory be the solution...15:19
Lor(For development, not for distribution)15:19
jelmerLor: How much code is there to share though?15:21
LorIn my case, probably not much.15:21
jelmerLor: Ideally code that's generic enough should be in bzrlib15:22
LorYou can't expect a plugin author's workflow to be contingent on bzrlib development.15:23
LorBut yes, ultimately code can of course migrate from plugins to bzrlib.15:23
jelmerLor: It's hard to answer this without a concrete example15:24
LorHow come?15:24
jelmerLor: As far as I know (and have experienced, I've written > 10 plugins) bzrlib provides sufficient functionality15:24
jelmerLor: You can always copy code between plugins if nothing else is possible and I've done that on occasion15:25
LorYeah, I'd like to avoid that.15:25
jelmerLor: Ultimately that code has all gone upstream15:25
jelmerLor: I guess you could maintain a library with utility code that more than one plugin can use15:27
LorYes, but distribution of plugins would be difficult.15:27
LorWell, this is not a very critical problem.15:28
jelmerLor: this is a problem with all sorts of library code and packaging15:28
LorYeah.15:28
jelmerLor: the solution is called apt :-)15:28
LorI wouldn't mind if launchpad automatically generated deb packages for the plugins.15:29
jelmerLor: it doesn't have enough information to do that15:29
jelmerLor: it could be possible with some extra metadata I guess15:29
=== oubiwann is now known as oubiwann_
=== oubiwann_ is now known as oubiwann
=== oubiwann is now known as oubiwann_
=== oubiwann_ is now known as oubiwann
yuriiHi anyone around who uses Bazaar on Snow Leopard?15:55
dashi do15:57
yuriiAny way I can uninstall the bundle? The uninstaller doesn't work on Snow Leopard15:58
mwhudsonjam: the session just got cancelled :)16:15
mwhudsonback soon16:15
spivvila: https://bugs.edge.launchpad.net/paramiko/+bug/579530 is the bug for that failure17:00
ubottuLaunchpad bug 579530 in bzr "paramiko does not try all available address families" [Medium,Confirmed]17:00
vilaspiv: thanks !17:01
=== IslandUsurper is now known as IslandUsurperAFK
vilapoolie: PING (note the caps), have a look at https://code.edge.launchpad.net/~mbp/bzr/491763-transform-rename-failed/+merge/24474 ! And land it quickly :-)17:03
=== oubiwann is now known as oubiwann_
=== oubiwann_ is now known as oubiwann
=== beuno is now known as beuno-lunch
=== Pilky_ is now known as Pilky
ciss_hi18:09
bendjHow do I 'reset' a repo's history to start at a given commit?  E.g., if I've got many months' of revisions tracked, but don't need/want anything kep anymore before a recent commit labelled "blah blah".18:09
ciss_i was wondering if someone can suggest a tutorial or tool on how to create patches from a revision and applying them via ssh?18:10
dashbendj: create a new branch using 'bzr init'18:10
dashbendj: copy files into it18:10
dashbendj: add them, commit.18:10
bendjdash: a bit confused ... that seems like it'd work just fine to create a 'reset' repo starting with the _current_ state.  But I just want to 'prune' the repo of info/data before a given, prior commit.  I.e., I _do_ want to have/track all the revisions _cince_ that prior commt.  Possible?18:14
=== IslandUsurperAFK is now known as IslandUsurper
dashbendj: i guess the 'rebase' plugin is supposed to do this18:16
bendjdash aha ... looking18:16
bendjdash: bzr_rewrite looks to be the ticket (http://wiki.bazaar.canonical.com/Rewrite).  Thanks!18:18
dash'bzr memory_hole'18:19
bendj:-)18:22
Lorbendj, tailor can do that too18:22
bendjLor another new one for me, thanks!18:25
=== beuno-lunch is now known as beuno
mathrickjelmer: hi21:06
mathrickbzr-git doesn't want to download git repos when served URLs like http://common-lisp.net/project/parenscript/git/parenscript/21:07
mathrickie. that directory already contains what .git normally holds21:07
mathrickgit itself has no problems with operating off that21:07
GaryvdMmathrick: Do you get a error.21:08
mathrickbzr: ERROR: Not a branch: "http://common-lisp.net/project/parenscript/git/parenscript/".21:08
GaryvdMmathrick:  I think it is a known error due to a change in python.21:08
mathrickoh?21:09
GaryvdMmathrick: What OS an bzr-git version?21:09
* GaryvdM looks for bug21:09
mathricklucid and, lemme see21:09
mathrickbzr-git 0.4.321:09
mathrickout of some debs21:09
GaryvdMmathrick: I was think about Bug 556968, but that gives an error message.21:11
ubottuLaunchpad bug 556968 in bzr-git "bzr branch crashes with "exceptions.TypeError: expected string or buffer" when cloning a git repository (needs upstream cherrypick/backport)" [Critical,Confirmed] https://launchpad.net/bugs/55696821:11
GaryvdMmathrick: But that affects your version.21:11
mathrickGaryvdM: for me it seems likely that bzr-git is merely not expecting the git repo to be at the top level and not under .git21:12
mathrickit's too orderly to be that error :)21:12
GaryvdMmathrick: Ok - best look for Jelmer then.21:12
ciss_is there a convenient way to remove all files from versioning that are matched by the patterns in .bzrignore?21:13
* GaryvdM looks arround the lobby at uds for Jelmer, no, he is not here - sorry21:13
ciss_or are those automatically removed on the next commit?21:14
mathrickGaryvdM: ok, thanks21:15
Lor.bzrignore only applies to unknown files21:20
LorAs is good and proper.21:20
LorI'm not sure that .bzrignore really belongs in the inventory.21:22
LorIt's just a user interface configuration, and no other configuration information is versioned.21:22
ciss_Lor, usually my .bzrignore file needs some tweaking until i get all the rules right, putting several unwanted files into versioning in the process. i was wondering how to get them out of versioning without removing each pattern match one by one21:23
LorOrdinary shell expansion ought to help a lot.21:25
LorBut really, you have been quite careless if you have added unwanted files and committed before checking what exactly is going to get in.21:26
ciss_checking 11K files is a little time consuming21:26
ciss_anyway, thanks for the hint21:26
LorIt's probably pretty simple to write a plugin to remove all files that match the ignore rules.21:27
Kobazhow do i undo a merge... i deleted new files, and revered modified files, but bzr st is still reporting a pending merge21:43
Kobazi guess i can commit and then uncommit21:44
beunoKobaz, --forget-merges I think21:44
beunorevert --forget-merges that is21:44
beunoI do think, though21:45
Kobaznifty21:45
Kobazthat worked21:45
beunothat plain "bzr revert" should leave everything in a default state again21:45
Kobazis there a changelog for the new stuff in 2.1.121:45
Kobazi'm still on 1.1821:46
beunothat's super old!21:46
Kobazheh21:46
Kobazbut it works21:46
beuno2.x has the new format21:46
beuno2a21:46
Kobazi upgraded to 1.20 at one point, and it kind of broke everything21:46
beunowhich is a trillion times faster21:46
Kobazso i stayed with 1.1821:46
Kobazmmm, it does seem faster21:57
Kobazplaying with a copy of my repo with 2.1.121:57
kojiroargh22:15
bendjmy bzr is working ok.  just installed bzr-git/dulwich.  when i try to branch a git repo, i get an 'internal error' -> http://pastebin.com/kd2BsmDa23:35
bendjis it my bad, or a prob with bzr or bzr-git?23:35
Peng_Prob'ly not your fault.23:43
jelmerbendj: bzr just changed its api and that broke bzr-git23:44
jelmerif you use a bzr from a couple of days back it should work ok23:45
bendjjelmer: Sounds like it's "known" ... still needs reporting?  I've not (yet) found a bug abt it ...23:46
jbowtiejelmer: Any details on this API change?  I've a got a foreign VCS plugin I might be releasing soon (waiting for approval from lawyers)23:48
jelmerjbowtie: basically lock_write / lock_read need to return an object with a unlock method now23:49
jelmerbendj: I don't think it's reported yet23:50
jelmerjbowtie: just curious, what foreign VCS does this plugin add support for or can you not say yet?23:51
bendjjelmer: offhand, know which revision triggered it?  i've dropped back to r5218, from 5/7 -- same problem23:54
LorIs it guaranteed that a merge with an ancestor will have no conflicts?23:54
Peng_Look for "lock" in the log?23:54
jelmerLor: I think so, it would be a no-op23:54
jelmerbendj: less than 10 revisions on mainline back23:55
LorNo, it creates a new revision.23:55
LorWhich is good, because I need that feature.23:55
jelmerLor: merge never creates a new revision23:55
LorI mean, it creates changes.23:56
bendjPeng_: sure, i did ... last 'lock' @ r522323:56
LorAnd after the merge a commit won't complain that there are no changes to commit.23:56
Peng_Lor: Not if you merge an ancestor, since it's a no-op. It does nothing whatsoever.23:57
LorI mean, I merge the head _into_ the ancestor.23:57
Peng_Oh.23:57
Peng_Lor: in that case you could pull.23:57
LorNo, I want a merge.23:57
LorIt seems to work just right, I just want to know if there is some obscure corner case that could create conflicts.23:58
jelmerLor: you're merging a single revision, not a range or something?23:58
LorA range.23:58
LorThe idea is to make a bunch of revisions look like a single merge, so there will only be a single log entry shown by default.23:59

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