Branches created in svn don't seem related in bzr

Bug #197356 reported by James Westby
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned
Debian
Confirmed
Unknown

Bug Description

Hi jelmer,

Sorry if this is already reported or fixed, I forgot to forward it at the time.

When an existing svn repo that already contains branches is used
through bzr, these branches seem unrelated in bzr. Branches created
with bzr svn-push are fine.

  In my test case, I first used only SVN. Created an SVN repo, then
committed three dirs (trunk/tags/branches) to it. Made a few commits
on trunk, then branched branch1 with svn cp. One more commit on
trunk, then one more commit on branch1. Then I went bzr, with "bzr
branch file:///.../svnrepo/trunk trunk+bzr" and "...branches/branch1
branch1+bzr". I then tried to see how these branches differed from
bzr's point of view:

,----
| guest@mirexpress:~/branch1+bzr$ bzr missing --line ../trunk+bzr/
| You have 2 extra revision(s):
| 3: guest 2008-01-12 commit on branch1 (after branching)
| 2: guest 2008-01-12 started branch1
|
| You are missing 4 revision(s):
| 5: guest 2008-01-12 commit 4 on trunk (after branching)
| 4: guest 2008-01-12 commit 3 on trunk
| 3: guest 2008-01-12 commit 2 on trunk
| 2: guest 2008-01-12 commit 1 on trunk
| guest@mirexpress:~/branch1+bzr$
`----

  As you can see, bzr doesn't seem to "remember" there's some common
history (apart from rev 1).

  So I tried branching from within bzr, with "bzr svn-push
file:///.../branches/branch2". Made one more commit on trunk, and one
on branch2. This one seems to work:

,----
| guest@mirexpress:~/branch2+bzr$ bzr missing --line ../trunk+bzr/
| You have 1 extra revision(s):
| 6: guest 2008-01-12 commit on branch2
|
| You are missing 1 revision(s):
| 6: guest 2008-01-12 commit 5 on trunk
`----

  For reference, here's the full history of the SVN repo:

,----
| guest@mirexpress:~/svncheckout$ LANG=C svn log -v
| ------------------------------------------------------------------------
| r10 | guest | 2008-01-12 20:51:56 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /branches/branch2/foo
|
| commit on branch2
| ------------------------------------------------------------------------
| r9 | guest | 2008-01-12 20:51:33 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /trunk/foo
|
| commit 5 on trunk
| ------------------------------------------------------------------------
| r8 | guest | 2008-01-12 20:46:49 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| A /branches/branch2 (from /trunk:4)
| M /branches/branch2/foo
|
| commit 4 on trunk (after branching)
| ------------------------------------------------------------------------
| r7 | guest | 2008-01-12 20:41:43 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /branches/branch1/foo
|
| commit on branch1 (after branching)
| ------------------------------------------------------------------------
| r6 | guest | 2008-01-12 20:41:23 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /trunk/foo
|
| commit 4 on trunk (after branching)
| ------------------------------------------------------------------------
| r5 | guest | 2008-01-12 20:41:01 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| A /branches/branch1 (from /trunk:1)
| A /branches/branch1/foo (from /trunk/foo:4)
|
| started branch1
| ------------------------------------------------------------------------
| r4 | guest | 2008-01-12 20:40:33 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /trunk/foo
|
| commit 3 on trunk
| ------------------------------------------------------------------------
| r3 | guest | 2008-01-12 20:40:28 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| M /trunk/foo
|
| commit 2 on trunk
| ------------------------------------------------------------------------
| r2 | guest | 2008-01-12 20:40:20 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| A /trunk/foo
|
| commit 1 on trunk
| ------------------------------------------------------------------------
| r1 | guest | 2008-01-12 20:39:56 +0100 (Sat, 12 Jan 2008) | 1 line
| Changed paths:
| A /branches
| A /tags
| A /trunk
|
| trunk/tags/branches
| ------------------------------------------------------------------------
| guest@mirexpress:~/svncheckout$
`----

  And the output of bzr log, in trunk and in both branches:

,----
| guest@mirexpress:~/trunk+bzr$ bzr log --line
| 6: guest 2008-01-12 commit 5 on trunk
| 5: guest 2008-01-12 commit 4 on trunk (after branching)
| 4: guest 2008-01-12 commit 3 on trunk
| 3: guest 2008-01-12 commit 2 on trunk
| 2: guest 2008-01-12 commit 1 on trunk
| 1: guest 2008-01-12 trunk/tags/branches
| guest@mirexpress:~/trunk+bzr$ cd ../branch1+bzr/
| guest@mirexpress:~/branch1+bzr$ bzr log --line
| 3: guest 2008-01-12 commit on branch1 (after branching)
| 2: guest 2008-01-12 started branch1
| 1: guest 2008-01-12 trunk/tags/branches
| guest@mirexpress:~/branch1+bzr$ cd ../branch2+bzr/
| guest@mirexpress:~/branch2+bzr$ bzr log --line
| 6: guest 2008-01-12 commit on branch2
| 5: guest 2008-01-12 commit 4 on trunk (after branching)
| 4: guest 2008-01-12 commit 3 on trunk
| 3: guest 2008-01-12 commit 2 on trunk
| 2: guest 2008-01-12 commit 1 on trunk
| 1: guest 2008-01-12 trunk/tags/branches
| guest@mirexpress:~/branch2+bzr$
`----

Roland.

Let me know if you need any more information requesting
or testing.

Thanks,

James

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.