bzr-svn: informing bzr about old svn merges.

Jelmer Vernooij jelmer at vernstok.nl
Tue Feb 9 13:37:48 GMT 2010


Hi Óscar,

On Mon, 2010-02-01 at 15:45 +0100, Óscar Fuentes wrote:
> Jelmer Vernooij <jelmer at samba.org> writes:
> 
> >> Is there a recommended way of making bzr aware of the last merged
> >> revision, so the next `bzr merge' considers only the subsequent
> >> revisions?
> > Just do a merge once, resolve the conflicts (perhaps just revert all of
> > the changes but not the merge revision information?) and push that
> > revision into svn - bzr-svn will set the required properties.

> For the record, this is what works here:
> 
> * If branch and trunk diverged, `svn merge' trunk into branch. This is
>   necessary because otherwise when we do `bzr merge' it is more
>   difficult to discriminate the changes introduced by revisions that
>   were merged on the past with svn from new changes not merged by
>   bzr. Resolve conflicts and `svn commit'.
> 
> * Update our bzr mirror branches of svn.
> 
> * `bzr merge' trunk into the branch.
> 
> * Thanks to the first step, we know that all modifications to the
>   working tree introduced by the merge are bogus, hence...
> 
> * `bzr resolve --all'.
> 
> * `bzr revert *'  (Not `bzr revert' as this will remove the pending
>   merge tips!)
> 
> * `bzr st' and check that only the pending merge tip is listed. Watch
>   for versioned files that start with a dot (i.e. .bzrignore) as those
>   are ignored by `bzr revert *'. If needed, explicitly revert the file:
>   `bzr revert .bzrignore'.
> 
> * `bzr commit'
> 
> * `bzr push' to the svn repo.
> 
> Please Jelmer confirm this: after that operation, do not rely on svn
> merge track system for merging with svn again. If you ever want to merge
> with svn again, use explicit revision ranges. (I say this because the
> property svn:mergeinfo was changed by the commit of the bzr merge)
You should be able to use "svn merge" without revision ranges just fine
after doing this - that's the whole reason bzr updates svn:mergeinfo.

Cheers,

Jelmer



More information about the bazaar mailing list