rebase says "No revisions to rebase" but I think that there are some
francis at devrx.org
Thu Dec 10 11:52:51 GMT 2009
On 9 Dec 2009, at 19:31, John Arbash Meinel wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> Francis Devereux wrote:
>> I have been working on a bazaar branch of a subversion for a while
>> and I
>> now want to push my changes into the subversion trunk.
>> When I try "bzr push ../svn-trunk/", I get "bzr: ERROR: Operation
>> because it would change the mainline history." which is as I would
>> expect. However, when I then do "bzr rebase ../svn-trunk/" I get "No
>> revisions to rebase.", which is not what I would expect. Can anyone
>> explain why this is happening or help me to get my changes into svn
>> without rewriting history in the svn repository (which I fear might
>> cause problems, although maybe I just need to understand some more
>> what it would do).
>> P.S. here's a transcript of the commands I've used:
Hi John, thanks for your useful reply.
> You might consider using "bzr replay" rather than "bzr rebase". I'm
> sure whether "bzr rebase ../trunk" is trying to put my patches on
> or trunks patches on self.
I had a look at bzr replay but I couldn't figure out what it does from
"bzr help replay" and couldn't find any other docs.
> Also, you may need to update your svn trunk. (cd ../svn_trunk; bzr
My svn trunk was up to date.
> The error about not letting you 'bzr push' is because:
> 1) You did bzr merge ../trunk; bzr commit rather than
> 2) cd trunk; bzr merge ../my-branch; bzr commit
I did (2) in the end and that worked to get my changes into the svn
trunk. However, they appear in the svn history as one giant commit -
I would have preferred that my individual commit messages were copied
across into svn.
> Looking at an ancestry graph, one is:
> B C
> B C
> One could argue that those are equivalent, but order-of-parents
> in bzr. It matters even more in bzr-svn. svn only mirrors the
> commits. So in SVN, you would either get:
> C ?
> B ?
> Since B is already in the svn repo, we can't freely change it to C.
> ? is a link that bzr-svn writes which bzr understands, but which svn
> does not.)
Thanks for that explanation.
What I was hoping is that 'cd my-branch; bzr rebase ../trunk' would re-
order the revisions in my branch to the following:
I would then be able to do 'cd my-branch; bzr push ../trunk" which
would push revisions C and D into the svn trunk, with full history. I
have done this before with other shorter-lived bzr branches from the
same svn trunk, and each commit that I had made in the bzr branch
ended up as a separate commit in the svn trunk. I actually suspect
that the "No revisions to rebase" response from "bzr rebase" is a bug
because I think that the revisions shown by "bzr missing" are all
revisions to be rebased. I admit that I may be confused though ;-)
More information about the bazaar