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

mgzmorning!08:04
vilahi all !08:10
mgzhey vila!08:32
mgzhow was the holiday?08:32
vilagreat :)08:36
mgzgood :)08:38
seanyare there any resources on the kndx and knit file internals?08:44
seanyi have a revision that doesn't show in the series of revno's, and shows only in the log only by specifying -r revid:user@...09:58
seanywhat's the likely scenario here?09:59
mgzit's no longer present in the branch, but is still in the repo?09:59
mgzeg, after pull --overwrite or uncommit.09:59
fullermdMerged rev?10:00
mgzI don't see any seperate docs on knits under doc/developers but you can always look at bzrlib/knit.py10:00
seanythanx mgz and fullermd10:01
seanyi suspect that it is part of a merged rev10:01
mgzah yes, and just use log -n0 to see everything10:01
fullermd(though the case could be made that if you're looking for knit docs, the right answer is probably more like "hey, y'know, the Flood has receeded..."  ;p)10:01
fullermdIf it's a merged rev, the log output probably has a dotted revno for it.10:02
seanyhmm that particular revision doesn't show even under -n010:04
seanylet me try again10:04
fullermdYou probably need --show-ids to make it show the revids in the output, if you were looking for it that way.10:04
fullermdBut if it's truly not there, then it's not in the branch history.10:05
seanyyeah i'm using the --show-ids flag..10:06
fullermdYou may be able to craft up an invocation of missing to tell you more too.  But I wouldn't be confident in saying how without experimenting, which kinda reduces the usefulness...10:06
seanyso the only likely scenario is an uncommit?10:07
seanythought that'd get rid of the revision from the repo as well..10:07
mgznope, deliberately leaves it in, so you can undo10:07
seanyah ok10:07
fullermdOh, there are a handful of ways.  An uncommit.  A --overwrite of some sort.  Repo shared with another branch.10:07
mgzanything else that changes the branch head also can do it10:07
fullermdPulled in via a merge that was reverted instead of committed.10:08
fullermdProbably a bunch of other ways that don't immediately come to mind.10:08
mgzone thing you can do is branch -rrevid:... . /somewhere_else which will give you a branch with just the history of that rev10:09
mgzsome of the qbzr tools are also useful for visualising this stuff.10:10
seanyHmm yeah I'll give that a shot now and let you know how I go..10:10
seanycan a shared repository be a repository tree at the same time?10:45
seanyi'm looking at one of our legacy codebases, and 'bzr info' returns:10:45
seanyRepository tree (format: unnamed)10:45
seanyLocation: shared repository: .10:45
jelmerseany: in theory, I think so10:48
mgzyou can do some weird things, some of which aren't useful10:49
mgzI just make this trying to reproduce that:10:49
mgzRepository checkout (format: 2a)10:49
mgzLocation:10:49
mgz  repository checkout root: r10:49
mgz        checkout of branch: b10:49
mgz         shared repository: r10:49
* fullermd hates those rollup names...10:49
seanylet me try that example10:51
seanyright so in a nutshell, do a checkout into a shared repo10:52
seanyis that right?10:52
mgzright, that's what I did there. it's not a sensible thing to do, because it mixes tree contents in with branches10:53
seanyhmm in the example i mentioned earlier, bzr info recognizes a repository tree10:55
seanybut i guess it could've come from an earlier tree format10:55
seanyformat: unnamed looks suspicious10:55
mgzit's less suspicious than it looks10:55
seanywhat's an unnamed format?10:56
mgzit's anything that's not an exact mix of repo/branch/tree formats that happen to have a name10:56
seanyoh right10:56
seanyso precisely what we have in your example10:56
seanywell we could've embellished and complicated that example a bit10:57
mgzright, and remember info -v gives you more details10:57
seanyyep10:57
mgzit's pretty easy to make something like you have there: <http://pastebin.ubuntu.com/1106220/>11:02
mgzright fix is probably `bzr branch r r/b && bzr rmbranch r`11:03
mgzplus force, then use pull --remember to fix the parent11:04
seanyhmm not sure why anyone would not make a subdirectory inside the shared repo for a branch..11:05
mgzlikely just a mistake11:05
seanythe legacy codebase looks really messed up11:05
seanyanyways if you guys get a chance to come to sydney then call me up for lunch or something : >11:06
mgzwe used to be more antipodean than we are presently :)11:08
seanyas in an expat aussie?11:09
mgzat one point half the people who worked on bazaar were in aus or nz11:09
fullermdI tried being antipodean once, but I pulled my shoulder.11:09
seanyhaha i see ;)11:10
mgzyou're still far from home fullermd :)11:10
=== zyga_ is now known as zyga
=== yofel_ is now known as yofel
abentleymgz: What sort of extra documentation do you suggest?13:29
mgzthere's a shelving_changes.txt under doc/en/user-guide/ though doesn't seem to be a switch equivalent13:31
mgza file with a couple of short examples like that which would appear on website and get indexed would be helpful I think13:32
abentleymgz: This doesn't have an interactive mode, so there's not a lot of examples to give.13:32
mgzabentley: basically just wants your test_store_and_restore_uncommitted blackbox test in example style with some explaining I think13:34
abentleymgz: okay.13:36
mgzcould be a seperate mp if you want to land that one first13:37
=== slank` is now known as slank
=== slank is now known as Guest49605
jelmerurgh, one of my emails just escaped from a mail queue somewhere13:49
mgzas in you sent something that should have been deleted?13:51
mgzor just a very delayed email?13:51
jelmer*very* delayed13:51
=== pfrost is now known as bitglue
jelmerfrom 15 june :)13:51
mgzsometimes the epostman takes the long way round :)13:51
jelmerone of our local mailmen was fired a while ago for hamstering mail13:52
james_wyeah, sorry jelmer, it was held in moderation13:52
jelmerjames_w: ah :)13:52
mgzblame james!13:53
james_whopefully you won't fire me?13:53
mgzjelmer: well, sometimes breeding season comes and they just have to make a nest13:53
mgzwithout a good bed of letters there wouldn't be lots of new little posties13:54
jelmerI would expect mwhudson to be the one keeping emails behind in that case ;)13:54
bitglueso let's say i had a branch, and I merged that branch into trunk. Then I decided it was a bad idea, and in trunk, I reverted the commit where I did the merge. Now I fixed the problem in the branch. How can I reconcile the two branches?14:03
james_wbitglue, merge trunk back in to the other branch14:04
james_wthat will likely cause some conflicts, but hopefully they will be easy to resolve.14:04
james_wif trunk only did the revert in the meantime then a "bzr revert ." might suffice for that14:04
james_wthen commit and merge the branch to trunk again14:04
bitgluewhat if trunk did more than just the revert in the meantime?14:05
james_wyour conflict fixing will be more involved14:05
james_wbut the process is the same14:05
james_wa "bzr revert ." in that case would revert the other changes trunk made, which you presumably want to keep14:06
bitgluethere are no conflicts, but merging production also merges the revert, thus discarding all the changes in my branch.14:06
james_wright, so you could fix that up during the merge14:06
bitglueok, can you elaborate on "fix up"?14:06
james_wor replay the commits on the branch back on top14:07
bitgluei mean, besides going through all the changes line-by-line and essentially re-writing my branch.14:07
james_wfix up = make the branch contain all of the changes again14:07
james_wyeah14:07
james_wif you lost everything merging back then replaying the commits might be easiest14:07
james_wjelmer, mgz: am I missing an easier way to do this?14:07
abentleybitglue: What I do is merge trunk upto the revision before the trunk reverted the branch.  Say trunk's revert is 10.  I'd merge -r 9 and commit normally.14:07
abentleybitglue: Then merge -r 10, revert ., commit.14:08
bitgluewon't that include the revision in trunk where i merged the branch? So, when I later re-merge my branch, it won't include changes I made before the reverted merge?14:09
abentleybitglue: It will exclude the revision in trunk where you merged the branch, because that revision is the last common revision, so it is selected as the BASE.14:10
abentleybitglue: Sorry, that's wrong.14:10
abentleybitglue: It will include that revision.  But I don't understand what you think will happen because of that.14:10
bitgluewell, say in trunk, r10 is the revert, but r9 is the merge14:11
bitgluenow, if i merge trunk's r9 into the branch, and I do what you said, keeping the merge marker but not the changes for r10, then my branch has the right code in it. But, when I later merge this into production again, I'm afraid it won't include the changes I originally made, because r10 will be the LCR.14:12
bitglueI think the significant thing here is that I will have merged r9 from trunk into the branch, so now as far as bzr is concerned, everything from before the merge-then-revert is reconciled between the branches (but it's not, because it was reverted)14:13
abentleybitglue: It will include your changes, because the revision that could have removed them (r10) is something you've already merged.14:13
abentleybitglue: That means your changes take precedence over the changes r10 made.14:13
bitgluei don't understand how that works, but i'll try it14:13
abentleybitglue: What happens is r10 becomes the BASE revision in your final merge.14:14
bitglueso after i merge, revert, commit the revision from trunk that reverted the merge of the branch into trunk, i can merge the head of trunk, to also get other things that changed in trunk, right?14:15
abentleybitglue: Right.14:16
abentleybitglue: but you don't have to.  Your choice.14:16
bitglueunderstood. Well, it seems to work. A bit odd, but I can't argue with the result.14:16
abentleybitglue: the first merge ensures that you've got everything merged except the revert, so that in your next merge, it's safe to completely revert.14:18
abentleybitglue: The complete revert makes it as if you make your changes from scratch, based on -r10.14:19
bitgluei guess that makes sense14:19
bitgluethe mental trap seems to be in merging r10, but committing something other than r10. ie, committing nothing.14:20
bitglueit's like the branch says, "yeah, I know about r10. Except it doesn't exist."14:20
bitgluewhich i guess...is really what i wanted all along.14:20
abentleybitglue: I think of it as saying "I'm overriding what the results of this merge should be.  My changes should survive this merge".14:21
abentleybitglue: It's not really saying r10 doesn't exist.14:22
abentleymgz: http://pastebin.ubuntu.com/1106630/15:55
abentleymgz: What is it about the case where both branches have uncommitted changes that you find interesting?16:21
abentleymgz: Is it the fact that it errors?  Because that happens regardless of whether the target branch has uncommitted changes.16:21
mgzabentley: I think it's interesting because it's what I'd end up with if shelves were tied to branches16:31
mgzI'd be switching from feature_a to feature_b both of which could have pending uncommitted changes16:31
mgzthat doc page looks really good.16:32
mgznit, paragraph starting 'switch --store', I'd put a 'Using ' in front of.16:33
mgzand maybe wants some ``markup`` round inline commands?16:33
abentleymgz: It's pretty rare that feature_a will already be storing uncommitted changes when you switch to feature b, but if you do, it doesn't matter whether feature_b has uncommitted changes.16:33
mgznothing else jumps out.16:33
mgzabentley: so, what I'd expect is to start with a branch with one set of changes, then switch, and have a different set of changes, which as I understand it will work find if --store is passed and the switched to branch has 'stored-transform'16:35
abentleymgz: You're sure you mean "branch with one set of changes", not "working tree with one set of changes"?16:36
mgzwell, a store is attached to the branch, rather than the tree16:37
mgzbut yeah, the tree gives one diff, you switch, and get a different diff16:37
=== zyga is now known as zyga-brb
abentleymgz: But why would the changes be stored in the first branch already?  That happens as part of the switch.16:39
mgzright, that's not really the common case, the current branch would be creating its 'stored-transform' and the target branch would be applying its one16:44
abentleymgz: Right.16:45
=== zyga-brb is now known as zyga-afk
abentleymgz: So if I tweak test_store_and_restore_uncommitted so that we have uncommitted changes when we switch to "orig", that tests what you wanted to test?16:51
mgzI'd add it as a new varient and probably switch back again but yup16:52
abentleymgz: I wouldn't, because then it's trying to unit tests instead of integration tests.16:55
mgzblackbox tests end up being a bit of both16:57
mgzyou've already got good coverage for the lower level bits with more unit-y tests16:57
abentleymgz: What will having two variants tell us that having one variant does not?17:09
mgzprobably nothing, my thinking is just that a regression with say, ordering of operations, might make one tes fail and not the other17:13
mgzyour pick17:13
mgzthe other potentially interesting integration test case is switch --store -b fresh with changes in the tree17:14
mgzdo what ever feels right for you.17:15
=== deryck is now known as deryck[lunch]
=== zyga-afk is now known as zyga
=== deryck[lunch] is now known as deryck
ccxCZis there tool that would open conflicts in vimdiff, tab per conflict, similarly to diffuse?20:36
glyphHello bizarros21:26
glyphI have hit the dreaded 'BzrCheckError: Internal check failed: Cannot add revision(s) to repository: missing referenced chk root keys' yet again21:26
glyphand I am looking for a way to save my ~300-revision branch without writing a giant shell script21:26
glyphis there a way to do rewrite which works exclusively on patches and won't try to do common-ancestor reconciliation or whatever the heck triggers that error?21:27
wgzis this involving bzr-svn again?21:34
glyphwgz: Yes.  We're not going to switch off SVN until we've had at least a month with bzr not emitting a catastrophic, data-losing traceback ;-)22:41
glyphI am currently trying really hard to avoid coming to the conclusion that this isn't worth the trouble and we should just switch to git because git-svn doesn't seem to have these issues.22:41
glyphSo, here's a question.  It looks like I am going to have to write the shell script, but I'd like to automate this workaround since it seems like I'm going to have to do it a couple dozen more times before all the repos which are infected with this bug have been cleaned up.22:47
glyphIn order to automate it, the question "what is the most recent revision which has an svn revision associated with it in this branch" is interesting.22:47
jelmerhi glyph23:03
jelmerglyph: "bzr log" and grepping for "svn revno:" should tell you, or alternatively "bzr log --show-ids" and grepping for "revision-id: svn-"23:03
glyphhi jelmer23:12
glyphsorry to always be such a downer :(23:12
glyphjelmer: I know how to look for it manually, I was just hoping there would be a convenient command, or maybe a revisionspec, that would give it to me23:13
glyphlike, svn:-123:14
glyphshow-ids might get me close enough though23:14
jelmerglyph: there is no revisionspec for anything like that23:22
jelmerI'm afraid scanning is the only thing you can do (either from the bzr python API or in a script that parses the "bzr log" output)23:22
glyphI am probably just going to write something in python with plumbum, because I already know what bzr's output looks like but I have no idea what its API looks like :)23:28
glyphLooks like --xml doesn't work with --show-ids or -p?  That's unfortunate.23:53

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