/srv/irclogs.ubuntu.com/2012/07/31/#bzr.txt

=== beuno_ is now known as beuno
txomon|homethank you lifeless05:36
txomon|homebut anyway, bzr can work in non-distributed mode?05:43
txomon|homeI am talking about http://doc.bazaar.canonical.com/bzr.2.5/en/user-guide/bazaar_workflows.html?highlight=distributed#centralized-with-local-commits05:56
txomon|homeis there any sharing of data between same elements in different branches? or is just like svn?06:02
txomon|homeI mean when storing06:02
bob2unclear what you mean06:07
bob2do you mean "Do repositorities dedupe revisions common to multiple branches in that repo"? if so, yes06:07
bob2ps bound branches are imvho a bad idea06:08
=== r0bby_ is now known as robbyoconnor
jelmermoin08:03
mgzmorning!08:04
jammgz, vila, jelmer: morning08:07
vilamorning08:07
jamcare to join me in mumble?08:08
vila<shudder> bzrlib.tests.blackbox.test_serve.TestBzrServe.test_bzr_serve_supports_configurable_timeout hanging rings anyone's bell ?09:36
vilaha, never mind, there is a TODO in the test: TODO: Use something like signal.alarm() so that if the server doesn't09:37
vila        #       properly handle the timeout, we end up failing the test instead09:37
vila        #       of hanging forever.09:37
vila...and using alarm() has been implemented indeed09:38
mgzalarm is dodgy09:40
mgzbut so is our serve setup in general, so hey.09:41
vilathe way we use it in features.TimeoutFixture should be ok though (at least on unix)09:43
frathgeberhi all09:44
mgzhi!09:44
frathgeberi'm (still) looking for a way to reliably interact with bzr branches through git09:45
mgzwhy?09:45
frathgeberbecause bzr doesn't have interactive rebasing09:45
frathgeberi know you'll hate me for that09:45
mgzsigh09:45
mgzI said that just for the rhyme09:45
frathgeberhehe. it's a bit heretic to come to #bzr and declare you want to use git on bzr branches, i appreciate that09:46
mgzwell, tell us if you find a way that works for you.09:46
vilayeah :) Especially since what you're asking for as to be implemented in git :)09:47
frathgeberbut maybe you can give me some advice whether my current plan could work09:47
frathgebervila: yes, that's the problem09:47
mgzI'm curious, how often do you modify an n-2 commit vs just the n-1 commit?09:49
tbfwhat's bzr's version of "git add -p"?09:50
frathgeberi've given up on git-bzr-ng and all the other so-called git-bzr bridges because they use fast-im/export, which is a horribly bad idea09:52
mgztbf: shelve and the 'e' option where needed, does the inverse09:52
frathgeberbecause you don't get a stable history09:52
frathgebermgz: all the time. we have another project where the repo is in git and i've got so used to the workflow that i don't want to miss it when working with a bzr repo09:53
tbfmgz, hmm... seems  my bzr is too old to have that option.09:53
mgztbf: you need to have EDITOR set to something09:54
mgzor change_editor in bazaar.conf, see `bzr help shelve`09:54
tbfmzr: 2.5.1 really just says "bzr: ERROR: no such option: -e"09:56
mgzit's one of the things you can type during shelve, it's not a command line switch09:56
tbfah! ok!09:56
mgzif you need to split a diff hunk into two parts, for instance09:57
frathgebermy current plan is as follows: 1) import the bzr branch into a git repo via fast-import 2) bzr branch the git repo so i get a bzr-git branch 3) work on the git repo 4) git push to the bzr-git branch 5) bzr push to the upstream bzr branch from the bzr-git branch09:57
frathgeberis that going to work?09:57
mgzfrathgeber: ...I don't think so09:57
frathgeberis step 5) going to fail?09:58
mgzyou're just making two git branches that share history, but are different to the bzr branch09:58
frathgeberbecause the fast-import will destroy the relationship, right?10:00
mgzright. isn't there a much simpler way?10:02
mgzhm... how do you tell bzr-git to create a local git branch from bzr...10:04
tbfhow do i tell bzr to always print logs in --forward order? is there a list of all configuration options?10:06
frathgebermgz: i'm not sure you can, but i'll have a look. unfortunately the docs on bzr-git are rather sparse, maybe jelmer can help10:16
mgzfrathgeber: so, you can dpush to a branch created `bzr init --format git`10:29
mgzbut you still have the problem that you're trying to work backwards10:29
mgzit would be easier for you to spend this time just making bzr-rebase do what you want.10:30
frathgeberyou may be right10:30
frathgeberit just seems so silly it works fine in the one direction and not at all in the other10:31
mgzbzr is flexible, we can store extra stuff required for git interoperability10:31
frathgeberi guess the git community is to blame because they're not keen enough to interact with bzr branches10:32
frathgeberand launchpad10:32
mgzgit is also flexible, but not in a way that's useful for storing extra stuff for bzr interoperability10:32
frathgeberyep10:32
frathgeberi just found another possible way: bzr serve --git (see https://bugs.launchpad.net/bzr-git/+bug/544776)10:39
ubot5Ubuntu bug 544776 in Bazaar Git Plugin "no roundtripping support" [Wishlist,Triaged]10:39
jelmerfrathgeber: bzr serve --git doesn't really work at the moment - it depends on roundtriping support10:49
frathgeberwhich is exactly what i'm looking for :)10:49
frathgeberso at the moment it's basically read-only?10:50
jelmerfrathgeber: yes10:52
frathgeberare there any other ways to make it work?10:52
frathgeberi haven't found any yet. git-bzr-ng makes promises it cannot keep10:53
jelmerfrathgeber: no, the roundtripping support is really required for this kind of thing.10:53
frathgeberjelmer: thanks, that was the answer i anticipated10:53
frathgeberdoes that require work in dulwich? bzr-git? both?10:54
jelmerfrathgeber: bzr-git10:54
jelmerthe work has mostly actually been done, but there are some smaller kinks to work out10:54
frathgeberanything i can beta test?10:54
frathgeberi'm happy to be a guinea pig10:55
jelmerfrathgeber: see mapping.py line 45710:55
frathgeberin bzr-git/trunk?10:55
jelmerfrathgeber: yep10:55
frathgeberthat's what your comment refers to in #544776 i guess?10:56
jelmeryeah10:57
frathgeberbrilliant. i'll bash on it and report back if and when it breaks10:57
frathgeberwhat's the easiest way of experimenting with it then? via bzr serve --git?10:58
frathgeberor can i convert the bzr branch to a git repo via bzr-git in other ways?10:58
mgzyou can just push into a fresh branch in git format10:58
frathgebergrand10:59
mgzfollowed by `bzr co` or `git reset --hard` to get a tree10:59
mgz(or pull, to avoid that, for that matter)11:00
frathgeberso getting back to the earlier conversation: will i then be able to push my changes back to the upstream bzr branch?11:00
jelmerfrathgeber: you're welcome to report issues with the roundtripping code, but I don't think there is anybody actively working on it anymore11:01
mgzhe's welcome to *fix* issues... :)11:02
frathgeberi guess via a detour of pulling into a bzr branch in bzr format and pushing upstream from there?11:02
jelmerfrathgeber: bzr serve --git should allow pushing11:02
frathgeberok11:02
frathgebermgz: sure, i'll see what i can do (no promises at this point)11:02
jelmerfrathgeber: but I doubt if that actually works11:02
frathgeberjelmer: i'll give it a try11:03
frathgeberit's not fast, so much i can already say ;)11:04
frathgebershould have started on a smaller repo11:04
mgzyeah, doesn't look hopeful: <http://pastebin.ubuntu.com/1121209/>11:07
mgzI might be missing a few fixes though, not sure what bzr-git version I'm running11:07
mgzbetter but no win: <http://pastebin.ubuntu.com/1121220/>11:15
frathgeberi've got this far:11:45
frathgeberhttp://paste.ubuntu.com/1121260/11:45
jelmerfrathgeber: are you running an old version of dulwich perhaps?11:46
jelmeranother option is that this bitof bzr-git just isn't unit-tested well enough and wasn't updated11:46
frathgeberyep, i'm running on bzr-git trunk but dulwich 0.8.5-211:49
frathgeberwill see if dulwich trunk does better11:49
AfCoff topic, but perhaps you might know: why would pycrypto depend on a debug package (python-all-dbg in this case)?11:50
jelmerAfC: generally speaking, that seems like a bad idea11:51
AfCyou would have thought so.11:51
jelmerAfC: this is a dependency in the binary package rather than a build-depends?11:51
AfCjelmer: I tried stripping it out, and sure enough the build broke. There's actually some command python-2.7-dbg or something the package tries to execute.11:51
jelmerAfC: if it's a build-dependency then it would make sense11:51
AfCjelmer: looks like a Build-Depends11:52
jelmerAfC: since it might want to install debug symbols in e.g. python-crypto-dbg, for those that want them11:52
AfCjelmer: [why does it make sense? Other languages use -dev packages for that sort of thing]11:52
AfCweird11:52
AfCanyway, thanks11:53
jelmerAfC: there are -dbg packages for C libraries too11:53
AfCsure, but you don't need them installed to build a package, no sir!11:53
jelmerAfC: you do need to install the dbg packages for their dependencies sometimes during build11:53
AfCanyway11:53
AfCnever come across that before11:53
AfC</offtopic>11:54
AfCthanks11:54
jelmerAfC: sure11:54
frathgeberjelmer: with updated packages from the bzr nightly ppa the issue remains12:24
jelmerfrathgeber: I guess it's just regressed :-/ I haven't touched that code in ages12:42
frathgeberyep. i might have a chance to look into it. but not now i'm afraid12:54
mnnwgz: question about RenameMap14:20
mgz hit me.14:21
mnnif user has an ignored directory in his repo, but decides to add it... but then decides to move that directory around, currently RenameMap ignores new location of that directory (even though it's that (ignored) directory that was added)14:22
mnnshouldn't RenameMap handle such situation and add such directory?14:25
mgzI'm not sure I follow, is the a commit involved too?14:26
mgzor is this all in pending changes?14:26
mnnwell all without commit14:26
mgzbut also without a state refresh?14:27
mnnbecause if there was a commit, such situation wouldn't exist14:27
mgzbecause with that, it all seems normal14:27
mnnwell because if user manually adds such directory (bzr add --no-recurse dir) and then runs autorename, he gets "removed <old_dir>" and "added <new_dir>"14:28
mnn(+ renamed children of that directory)14:28
mgzah, so not bzr mv, which works as intended: <http://pastebin.ubuntu.com/1121522/>14:29
mgzautorename isn't the most robust thing in the world14:29
mnnyeah... but I'm trying to make it at least a bit better :) because sometimes I move/rename things around and I'm just too lazy to do it with Bazaar (well I basically won't leave my IDE (Visual Studio) when doing this)14:31
mgzgo for it.14:32
mnnor if I move/rename stuff I'm just used to use file manager rather than bazaar14:32
mnn*used to do it in file manager14:33
mnnI'm thinking of making RenameMap taking into account filenames - because I have some files that have exact contents but different filenames14:33
mnnand maybe make it optional14:34
mnnalso: https://code.launchpad.net/~mnn282/bzr/sftp-unsupported-operation-more-info/+merge/116849/comments/25234514:34
mnnI didn't understand this very well:14:34
mnnIncluding the path, and just using the operation name rather than the text form would work for everything but the symlink/rename case, which could just be an optional target_path param to the exception.14:34
=== joey2 is now known as nv0n
=== nv0n is now known as joey
=== beuno is now known as beuno-lunch
=== beuno-lunch is now known as beuno
mnnmgz: I've adjusted RenameMap a bit to handle a bump from yesterday, however, I'm not sure about the whole old tree, new tree stuff from InterTree.iter_changes()16:22
mnnoriginal code in RenameMap had this:16:22
mnnmissing_parents.setdefault(parent[0], set()).add(file_id)16:22
mnnI16:22
=== AfC1 is now known as AfC|zzz
mnnI'm not sure why would it check for parent in old tree... I changed it to parent[1] (new tree parent)... that fixed the bump from yesterday and didn't break any tests16:23
mgzmnn: haven't got any particular insight there, but I don't really like rename_map doing actions on the tree that change its state16:46
=== deryck is now known as deryck[lunch]
mnnwell, true but that's what dry_run is for, right?17:11
mnnmgz: don't you think?17:12
mnnand IMO it should change tree state - I mean it has to remap delete/missing files/directories to new ones (e.g. move/rename)17:14
mgzmnn: so, specifically I don't think _make_inventory_delta should be using tree.smart_add17:15
mnnwell I don't like it either17:15
mnnbut otherwise it can't create new entry correctly17:16
mgzit's fine that guess_renames fiddles with the tree, that's what it promises, and as you say is guarded by dry_run17:16
mnnbecause parent_id is None for new directories... that's why it has to add them17:16
mnnbut that smart_add is not guarded by dry_run... I fixed it just now17:16
mgzit might mean making the logic in guess_renames two-pass17:16
mgzI'll think about it a bit and see if I come up with anything17:17
mgzno, I think one-pass is fine, you just need a level of parent indirection17:18
mnnhmm... that's little fuzzy to me... what do you mean by that?17:19
mgzthe sticking point is you need a parent_id for the containing directory before you can create a delta for it's contents, right?17:21
mnnright17:21
mnnotherwise new_entry.parent_id becomes None and that causes real trouble17:22
mgzso, you create a delta adding the parent dir, then a pseudo-delta that refers to the parent so the add logic can lazily look up the parent id17:23
mgzI'd just refactor to defer entry creation till just before add17:24
mgzthen provided you detect missing parents and insert them before children in the stream, you're all set.17:24
mgzso, don't put new_entry in the delta, put entry in and add a helper that does the copy and details fill in17:26
mgzfollow me?17:26
vilamgz: you may not like the suggestion but this sounds like a tree transform job to ensure a safe result (as a bonus you get some sort of rollback protection)17:29
mgzfeel free to guide mnn through doing that...17:29
vilayeah :-/17:30
vilaEOD here17:30
vilaOn the other hand, if this leads to dirstate/inventory bugs (which is what occurred when I didn't use tt for conflict resolution :-/)...17:31
vilatt should accept rename attempts by just feeding it with adjust_path() calls17:32
vilathen tt.apply() should generate conflicts or a proper tree/dirstate17:33
vilathis doesn't require ordering either17:34
vilaoh, and there is a magic call to register trans_id...17:35
vilatt.trans_id_tree_path() or some variant17:36
vilamgz: i.e. renames are what PathConflict._resolve handle, here this may be even simpler17:37
vilamnn, mgz: I'll look into it tomorrow if there are some failing tests somewhere ;)17:40
mgzthe mp is pretty simple, and includes a failing test.17:42
mgzsee your inbox :)17:42
mnnmgz: I've been able to tackle that problem with adding new directory... however I can't handle this situation:18:18
mnnadd directory (with files), move that directory under existing versioned directory18:18
mnnthose files underneath the new directory get kind == (None, None) from InterTree.iter_changes()18:19
mnnand I don't think that's right - it should be kind == (None, 'file') right?18:19
wgzyeah, sounds more reasonable.18:27
mnnhowever this goes beyond me... that stuff is really complicated :(18:27
mnncould you take a look why it is returning (None, None) ?18:27
wgzmnn: I need to cook and stuff right now, but will poke try to have a look later on18:38
mnnno problem, thanks for help18:39

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