[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Support for reverse merges?

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 30 Aug 2011 18:00:28 +0100

Paul Burba <ptburba_at_gmail.com> writes:

> Could you provide some examples of when 'things start to go wrong when
> you next try to use "automatic" merges between the branches'? Was
> there a particular use-case (or cases) you had in mind, or just a
> general sense that maybe this is/could be a problem?

Here's one (shorter recipes are possible):

#!/bin/sh -e

svn=svn ; svnadmin=svnadmin ; svnlook=svnlook ; svnmucc=svnmucc
repo=repo ; wc=wc ; url=file:///`pwd`/$repo
rm -rf $repo $wc
$svnadmin create $repo

# Create first branch
$svn mkdir -mm $url/A
$svn co $url/A $wc

# Create second branch from first
$svn cp -mm $url/A $url/X
$svn sw $url/X $wc
$svn merge ^/A $wc
$svn ci -mm $wc

# Change on second branch
$svn mkdir -mm $url/X/x
R1=`svnlook youngest $repo`

# Catchup merge first-to-second
$svn sw $url/X $wc
$svn merge ^/A $wc
$svn ci -mm $wc

# Reintegrate merge second-to-first
$svn sw $url/A $wc
$svn merge --reintegrate ^/X $wc
$svn ci -mm $wc

# Keep-alive merge first-to-second
R=`svnlook youngest $repo`
$svn sw $url/X $wc
$svn merge --record-only -cr$R ^/A $wc
$svn ci -mm $wc

# Reverse merge change on second NOT RECORDED
$svn sw $url/X $wc
$svn merge -c-$R1 ^/X $wc
$svn ci -mm $wc

# Reverse merge change on first RECORDED
$svn sw $url/A $wc
$svn merge -c-$R1 ^/X $wc
$svn ci -mm $wc

# Catchup merge CONFLICT
$svn sw $url/X $wc
$svn merge ^/A $wc

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-08-30 19:07:04 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.