Resolving diverged branches in Subversion repository

Ben Finney bignose+hates-spam at benfinney.id.au
Mon Jun 23 00:53:19 BST 2008


Thanks for taking the time to address my concerns.

John Arbash Meinel <john at arbash-meinel.com> writes:

> So, if you weren't using bzr-svn, you could "co-locate" a bzr branch
> and a Subversion checkout. I've used that method before with CVS,
> and other systems. Basically, on the bzr side, you tell it to ignore
> all ".svn" directories, and you do a "bzr init" in the same
> directory you did "svn co".

Okay. How can I help the Subversion users to ignore any Bazaar
directories?

> In this case, you already have a branch that you probably want to
> start with.

Yes, I have a Bazaar checkout of the Subversion trunk, and numerous
Bazaar branches from that checkout.

> So you could do something like:
> 
> bzr branch my_current_checkout other_location
> cd my_current_checkout
> mv ../other_location/.bzr .

This is, I presume, to convert the Bazaar checkout of the Subversion
trunk to a Bazaar branch. Do I not need to move aside the existing
'.bzr' directory before replacing it?

> At this point, you probably need to uninstall 'bzr-svn'.

That's a pity; I'm using it in other contexts as well.

> From here on, you will basically manually sync your "trunk" copy and
> your svn copy. So you would do stuff like:
> 
> cd trunk
> svn up
> bzr commit -m "sync from svn"

How is this 'trunk' directory different from the 'my_current_checkout'
you reference above?

Recall that all I have at the moment is a Bazaar checkout of the
Subversion trunk. I've checked it, and it doesn't have a '.svn'
control directory.

Do I need to maintain a Bazaar checkout? Do I need to maintain a
Subversion checkout? Both? Neither?

> What you lose:
> [...]

Thanks for thinking about this.


> Another possibility comes to mind. You could continue to use bzr-svn
> as you are, except when it comes time to integrate your feature
> changes back into trunk.
> 
> cd trunk
> bzr merge ../feature_A
> bzr revert --forget-merges
> svn commit -m "feature A"
> bzr up
> 
> I'm not 100% sure how the svn/bzr stuff works in an SVN checkout. I'm
> told it *does* work.

That looks more attractive.

The 'trunk' directory I have is a Bazaar checkout, and has no '.svn'
directory. What would I need to do to get it working with the above
workflow?

> What I've never really understood is why the list of revision ids
> has to grow each time. (You could store just the tip each time.)

For this use case, it would help greatly if only one "property change"
entry occurred in the changeset every commit. Not as ideal as "no
property changes in the changeset", but much better than the current
situation of an ever-growing list of property changes every commit.

Thanks again for continuing this discussion with helpful suggestions.

-- 
 \         "Pinky, are you pondering what I'm pondering?" "I think so, |
  `\     Brain, but if they called them 'Sad Meals', kids wouldn't buy |
_o__)                                 them!"  -- _Pinky and The Brain_ |
Ben Finney




More information about the bazaar mailing list