svn-push a branch with no new history makes surprising commit to SVN repo

Bug #203368 reported by Andrew Bennetts on 2008-03-17
18
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Wishlist
Jelmer Vernooij

Bug Description

Something bizarre happens with a command sequence like this:

bzr branch svn://.../repo/trunk new-branch
cd new-branch
bzr svn-push svn://.../repo/branches/new-branch

It produces a bizarre commit in the SVN repository. It looks like maybe it is replaying the last commit made on trunk?

Ideally I think it'd behave more like "svn cp $REPO/trunk $REPO/branches/new-branch", and simply make a new branch with no changes from trunk, with a commit message like "Create branches/new-branch." This is the sort of behaviour SVN users expect when creating branches in their SVN repository.

Jelmer Vernooij (jelmer) wrote :

As we discussed on IRC, this is not really trivial to fix:

01:09 < jelmer> spiv: if there is a branch A with tip revision 42 and you're
                trying to push a branch B that also has tip 42 it has to do a
                copy of r41 -> /B that replays the changes in r42
01:09 < jelmer> otherwise the two branches actually have a different revision
                history
01:10 < jelmer> A has tip 42 and B has tip 42+1 where rev 1 is en empty commit
                that changes the branch nick from A to B
01:12 < spiv> jelmer: hmm, because you can't easily figure out that the tip 42
              in B happens to be the same as 42 elsewhere in the repo?
01:13 < jelmer> spiv: I can figure that out, but the problem is that B has more
                revisions than A
01:14 < jelmer> the commit that contains the "svn cp" will show up as well
01:14 < spiv> Ah, the impedence mismatch, because making a branch in bzr
              doesn't make a revision.
01:14 < spiv> But in svn it does.

Jelmer Vernooij (jelmer) wrote :

One way around this is to flag revisions that only create a new branch and ignore them when generating history. We would have to investigate what sort of effect this would have on performance though.

Jelmer Vernooij (jelmer) on 2008-03-21
Changed in bzr-svn:
importance: Undecided → Wishlist
status: New → Confirmed
Jelmer Vernooij (jelmer) on 2008-07-28
Changed in bzr-svn:
milestone: none → 0.5.0
Jelmer Vernooij (jelmer) on 2008-09-06
Changed in bzr-svn:
assignee: nobody → jelmer
status: Confirmed → Triaged
Jelmer Vernooij (jelmer) on 2008-09-08
Changed in bzr-svn:
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer) on 2008-12-08
Changed in bzr-svn:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers