dpush should save a revid map to allow rebasing of child branches
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned | ||
Breezy |
Fix Released
|
Low
|
Unassigned |
Bug Description
When using dpush to push to a central svn repository, which doesn't handle svn revision properties (svn < 1.5), after the dpush, any branch which was branched off the dpushing-branch is considered as diverged (even if their contents didn't changed).
For example,
svn repo <-> branch A <-> branch B
cd <branch B>
change in branch B
bzr push <branch A>
cd <branch A>
bzr dpush <svn repo>
cd <branch B>
bzr pull
... error about diverged branches
According to jelmer, if dpush would save a revid map with information on how the revisions were rebased, this could allow rebase to rebase branch B accordingly, and by slightly altering the workflow (doing bzr rebase instead of bzr pull), this false-diverged-
I also add the full conversation regarding this issue (IRC with jelmer on 2009-05-20).
-------
<ricardokirkner> hi. I am playing with bzr-svn and dpush. I want to have a central bzr repo from which all my developers can branch off, and from which I can pull and push to a central svn repo (upstream). I configured the upstream svn repo to support pre-revprop-change hook in order to rewrite the author, and use dpush in order not to push metadata properties (as they are not wanted in upstream). The main idea here is to use bzr but try not to interfere with upstrea
m (because normally we can't)
now, I am getting this strange behaviour:
I have repo A (from which I dpush), repo B (branch of A)
<ricardokirkner> when I dpush from A (to svn), and then (in B) pull (from A)
I get a message that the branches have diverged
<jelmer> ricardokirkner: yes, that's the disadvantage of dpush
ricardokirkner: it doesn't retain all of the metadata, and so the revisions change slightly
jelmer Jemsquash
<ricardokirkner> jelmer, is there any way around this? (as the branches aren't really different)
maybe using rebase? some option?
or, once I dpush I loose any chance to continue my branches?
<jelmer> ricardokirkner: bzr pull --overwrite in branch B should fix it, or using regular push
<ricardokirkner> jelmer, alright , I'll try using pull --overwrite
<jelmer> ricardokirkner: (--overwrite that'll remove any extra revisions you have in branch B)
<ricardokirkner> as direct push to svn is not what I want (my client has complained that a lot of properties appeared in the svn tree -- as they are using svn 1.4, its file props)
<jelmer> ricardokirkner: so, one of the things you can do is not pull from branch A until you've dpushed branch A into svn
ricardokirkner: as the revisions won't change after they have been dpushed
<ricardokirkner> jelmer, but thats what I've been doing
that's what made me wonder
I pushed from B to A , then dpushed from A to svn, then pulled from A to B
and got the error
<jelmer> ricardokirkner: yes, because the revisions you pushed from B into A have been rebased by dpush
<ricardokirkner> jelmer, and is this not fixable somehow by rebasing B as A was rebased? (without having to overwrite B entirely)
<jelmer> servilio: np :)
<jelmer> ricardokirkner: not yet, for that dpush would have to store the information of how things were rebased so rebase could pick it up
<ricardokirkner> jelmer, and the problem with pull --overwrite is that I can't do anything in branch B until branch A has been dpushed to svn (in order to avoid any diverged message), right?
so, if developer B pushes to A, and does nothing else on branch B until branch A has been dpushed, and after that pulls with overwrite from branch A , i should not have any issues, right?
it's a workflow limitation, but it may work
<jelmer> ricardokirkner: yes
ricardokirkner: please file a wishlist bug about dpush saving a revid map if that bit seems useful
<ricardokirkner> jelmer, if dpush saves a revid map (locally I guess, as I don't want to push any metadata to the svn server), that would allow bzr to rebase branch B accordingly, and prevent the branches to be interpreted as diverged?
<jelmer> ricardokirkner: yes, you'd just have to specify the revidmap to dpush (so it can store it) and rebase (so it can load it)
<ricardokirkner> jelmer, alright.. .I will try pull --overwrite to see if it works for my needs, and file a wishlist for dpush (adding the relevant information for this irc log if you agree)
-------
Related branches
- Jelmer Vernooij: Approve
-
Diff: 352 lines (+0/-308)5 files modifiedbreezy/builtins.py (+0/-1)
breezy/foreign.py (+0/-107)
breezy/tests/blackbox/__init__.py (+0/-1)
breezy/tests/blackbox/test_dpush.py (+0/-175)
breezy/tests/test_foreign.py (+0/-24)
affects: | bzr-svn → bzr |
tags: | added: dpush foreign |
Changed in bzr: | |
status: | Triaged → Confirmed |
tags: | added: check-for-breezy |
Changed in brz: | |
importance: | Undecided → Low |
status: | New → Confirmed |
status: | Confirmed → Triaged |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | Triaged → Fix Released |
btw, the contents of those revisions *did* change, it was just very slightly (bzr metadata)