Branch copies from non-branches don't work

Bug #67010 reported by Jelmer Vernooij
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

when a new branch gets created from a non-branch, bzr-svn currently bails out. For example, if /trunk/dir gets copied to /branches/somebranch.

logwalker.py:151 has a FIXME about this:
# FIXME: What if copyfrom_path is not a branch path?

There are a couple of things we can do here:

* inherit the original parents revision history and have the revision be a move from dir -> . and a bunch of removes
* don't traverse history further and simply take the revision in which the copy happened as the first one on the branch
* use nested branches and make every subversion directory a branch.

Related branches

Revision history for this message
Todd Berman (tberman) wrote :

I attempted to add a return underneath line 151, and got the same issue.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

After talking to Robert, it seems option 1 (inherit the original parents revision history and have the revision be a move from dir -> . and a bunch of removes) is the sanest.

This way history is kept.

Changed in bzr-svn:
assignee: nobody → jelmer
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Todd Berman (tberman) wrote :

So, I managed to hack together a one-off patch that allowed me to do a pull/branch of the repo, but when I go to push back into the remote repo, I get an error that says I must merge before I do that regardless of when it was last merged. I am relatively sure my patch is wrong and is what is causing the issue. Attached is the patch.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Actually, 1 and 3 from the options I mentioned above can be combined. If a branch is created by copying from a non-branch, this be handled as if the 'split' command was run.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Proposed solution depends on #66380

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Confirmed → In Progress
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Fixed in trunk. History is cut off when branch copies occur from non-branches now. When unique root id support gets in, branch history will no longer be cut off.

Changed in bzr-svn:
status: In Progress → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
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.