Broken branch from svn

John Szakmeister john at szakmeister.net
Sun Nov 1 14:06:38 GMT 2009


On Sun, Nov 1, 2009 at 8:21 AM, Jelmer Vernooij <jelmer at samba.org> wrote:
[snip]
>> On the Subversion side, something different definitely transpired:
>>
>> ------------------------------------------------------------------------
>> r7 | jszakmeister | 2009-11-01 06:06:52 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    M /trunk/A.txt
>>    A /trunk/B.txt
>>
>> Merge my-feature2
>> ------------------------------------------------------------------------
>> r6 | jszakmeister | 2009-11-01 06:06:52 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    R /branches/my-feature2 (from /trunk:4)
>>    M /branches/my-feature2/A.txt
>>
>> Add even more to A.txt
>> ------------------------------------------------------------------------
>> r5 | jszakmeister | 2009-11-01 06:06:52 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    A /branches/my-feature2 (from /trunk:4)
>>
>> Create new branch.
>> ------------------------------------------------------------------------
>> r4 | jszakmeister | 2009-11-01 06:06:48 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    M /trunk/A.txt
>>
>> Merge my-feature1
>> ------------------------------------------------------------------------
>> r3 | jszakmeister | 2009-11-01 06:06:48 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    A /branches/my-feature1 (from /trunk:2)
>>
>> Create new branch.
>> ------------------------------------------------------------------------
>> r2 | jszakmeister | 2009-11-01 06:06:44 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    A /trunk/A.txt
>>
>> Add A.txt
>> ------------------------------------------------------------------------
>> r1 | jszakmeister | 2009-11-01 06:06:42 -0500 (Sun, 01 Nov 2009) | 1 line
>> Changed paths:
>>    A /branches
>>    A /tags
>>    A /trunk
>>
>> Initial layout
>> ------------------------------------------------------------------------
> This looks correct. Have you tried running "svn log" against trunk?
> You'll find that it gives similar results as "bzr log" on the bzr
> branch.

Really?  Then maybe I'm not understanding what the intention of
push_merged_revisions is.  I assumed, from the conversation, that it
was to allow the merged revisions to be seen from 'bzr log -n0'.
That's not what I see.  However, if I create a feature branch, push it
into branches, and then merge it to trunk.  I see the revisions...
even if I create a totally new trunk branch (bzr-svn seems to be
recording the fact that those revisions where pushed into the
repository).  That's what is confusing me.

>> The one thing that is different here, is that when I manually push up
>> the revisions, you see the last commit in the branch versus new stuff
>> appearing between the branch and merge (r7 would have been adding a
>> new file, and r8 would have been the merge).
> Can you rephrase this perhaps? I don't understand what you mean.

If I do:

bzr branch trunk my-feature
cd my-feature
(hack, commit, hack, commit)
bzr push svn://svn.example.org/repos/my-project/my-feature

cd ../trunk
bzr merge ../my-feature
bzr commit

And then on a separate machine, do:

bzr branch svn://svn.example.org/repos/my-project/trunk
cd trunk
bzr log -n0

I see the logs of the merged revisions.  However, if I do:

(set push_merged_revisions = True for my svn repo)
bzr branch trunk my-feature
(hack, commit, hack, commit)

cd ../trunk
bzr merge ../my-feature
bzr commit

and then on a separate machine, do:

bzr branch svn://svn.example.org/repos/my-project/trunk
cd trunk
bzr log -n0

I don't see the merged revisions.  So in short: if I push the branch
up myself, I see them.  If I don't and try to use
push_merged_revisions=True, I don't see the merged revisions.  I see
that they were committed to SVN as a separate branch.  But I'm not
sure it solving the ghost revision problem.

Hope that helps.  I've got scripts to demonstrate the problem, if that helps.

-John



More information about the bazaar mailing list