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

merge-tracking -- getting my feet wet

From: Ben Collins-Sussman <sussman_at_red-bean.com>
Date: 2007-05-09 22:44:52 CEST

Hi guys, I'm trying to figger out what our merge-tracking code is and
isn't capable of. I'm also starting to work on making our
notification system deal with 'multiple notifications' of subsequently
merged ranges of revisions.

Just to get my feet wet, I wrote a short shell script. The script
does a bunch of commits to a branch. It cherrypicks one change and
ports it from branch to trunk, then tries to just 'merge everything
else' by magic (svn merge BRANCHURL trunk-wc).

My expectation is that the magic-merge should do merge two distinct
ranges of changes -- those before my cherrypicked change, and those
after. However, my output is bizarre... lots of additions, conflicts,
and so on. I need a sanity check, or a does of expectation
management. :-)

Script and output are attached below.

--------

#!/bin/sh

TRUNKURL=file://`pwd`/mergerepos/trunk
BRANCHURL=file://`pwd`/mergerepos/trunk

# Create populated repos
rm -rf mergerepos
svnadmin create mergerepos
svn mkdir $TRUNKURL -m "make trunk" # r1
svn import zvm-test-data $TRUNKURL -m "import code" # r2

# Branch the trunk
svn cp $TRUNKURL $BRANCHURL -m "make branch" # r3

# Grab a WC of branch and trunk each
rm -rf trunk-wc branch-wc
svn co $TRUNKURL trunk-wc
svn co $BRANCHURL branch-wc

# Make some commits to branch
echo "blah" >> branch-wc/zcpu.py
svn commit branch-wc -m "change zcpu." # r4

echo "glorb" >> branch-wc/zmachine.py
svn commit branch-wc -m "change zmachine." # r5

echo "narf" >> branch-wc/zstring.py
svn commit branch-wc -m "change zstring." # r6

# Merge just one cherrypicked change to the trunk
svn up trunk-wc
svn merge -c5 $BRANCHURL trunk-wc
svn commit trunk-wc -m "port one change to trunk". # r7

# Now merge 'the rest' of the branch changes to the trunk.
# Merge tracking should magically know to merge the two ranges (r4 and r6)
svn up trunk-wc
svn merge $BRANCHURL trunk-wc

--------

Committed revision 1.
Adding zvm-test-data/zlexer.py
Adding zvm-test-data/zstackmanager.py
Adding zvm-test-data/ziomanager.py
Adding zvm-test-data/zobjectparser.py
Adding zvm-test-data/glk.py
Adding zvm-test-data/zopdecoder.py
Adding zvm-test-data/zmachine.py
Adding zvm-test-data/__init__.py
Adding zvm-test-data/zstring.py
Adding zvm-test-data/zcpu.py
Adding zvm-test-data/bitfield.py
Adding zvm-test-data/zmemory.py
Adding zvm-test-data/quetzal.py
Adding zvm-test-data/zui.py

Committed revision 2.

Committed revision 3.
A trunk-wc/zlexer.py
A trunk-wc/zstackmanager.py
A trunk-wc/trunk
A trunk-wc/trunk/zlexer.py
A trunk-wc/trunk/zstackmanager.py
A trunk-wc/trunk/ziomanager.py
A trunk-wc/trunk/glk.py
A trunk-wc/trunk/zobjectparser.py
A trunk-wc/trunk/zmachine.py
A trunk-wc/trunk/zopdecoder.py
A trunk-wc/trunk/__init__.py
A trunk-wc/trunk/zstring.py
A trunk-wc/trunk/zcpu.py
A trunk-wc/trunk/bitfield.py
A trunk-wc/trunk/zmemory.py
A trunk-wc/trunk/quetzal.py
A trunk-wc/trunk/zui.py
A trunk-wc/ziomanager.py
A trunk-wc/glk.py
A trunk-wc/zobjectparser.py
A trunk-wc/zmachine.py
A trunk-wc/zopdecoder.py
A trunk-wc/__init__.py
A trunk-wc/zstring.py
A trunk-wc/zcpu.py
A trunk-wc/bitfield.py
A trunk-wc/zmemory.py
A trunk-wc/quetzal.py
A trunk-wc/zui.py
Checked out revision 3.
A branch-wc/zlexer.py
A branch-wc/zstackmanager.py
A branch-wc/trunk
A branch-wc/trunk/zlexer.py
A branch-wc/trunk/zstackmanager.py
A branch-wc/trunk/ziomanager.py
A branch-wc/trunk/glk.py
A branch-wc/trunk/zobjectparser.py
A branch-wc/trunk/zmachine.py
A branch-wc/trunk/zopdecoder.py
A branch-wc/trunk/__init__.py
A branch-wc/trunk/zstring.py
A branch-wc/trunk/zcpu.py
A branch-wc/trunk/bitfield.py
A branch-wc/trunk/zmemory.py
A branch-wc/trunk/quetzal.py
A branch-wc/trunk/zui.py
A branch-wc/ziomanager.py
A branch-wc/glk.py
A branch-wc/zobjectparser.py
A branch-wc/zmachine.py
A branch-wc/zopdecoder.py
A branch-wc/__init__.py
A branch-wc/zstring.py
A branch-wc/zcpu.py
A branch-wc/bitfield.py
A branch-wc/zmemory.py
A branch-wc/quetzal.py
A branch-wc/zui.py
Checked out revision 3.
Sending branch-wc/zcpu.py
Transmitting file data .
Committed revision 4.
Sending branch-wc/zmachine.py
Transmitting file data .
Committed revision 5.
Sending branch-wc/zstring.py
Transmitting file data .
Committed revision 6.
U trunk-wc/zmachine.py
U trunk-wc/zstring.py
U trunk-wc/zcpu.py
Updated to revision 6.
Sending trunk-wc
Sending trunk-wc/trunk

Committed revision 7.
At revision 7.
 G trunk-wc/trunk
A trunk-wc/zlexer.py
A trunk-wc/zstackmanager.py
A trunk-wc/ziomanager.py
A trunk-wc/glk.py
A trunk-wc/zobjectparser.py
C trunk-wc/zmachine.py
A trunk-wc/zopdecoder.py
A trunk-wc/__init__.py
C trunk-wc/zstring.py
A trunk-wc/zcpu.py
A trunk-wc/bitfield.py
A trunk-wc/zmemory.py
A trunk-wc/quetzal.py
A trunk-wc/zui.py
C trunk-wc/zstring.py
 G trunk-wc

$ svn st trunk-wc/
 M trunk-wc
? trunk-wc/zmachine.py.merge-right.r4
? trunk-wc/zstring.py.merge-right.r4
? trunk-wc/zstring.py.merge-right.r7
? trunk-wc/zmachine.py.merge-left.r0
? trunk-wc/zstring.py.merge-left.r0
? trunk-wc/zstring.py.merge-left.r5
? trunk-wc/zmachine.py.working
? trunk-wc/zstring.py.working
? trunk-wc/zstring.py.2.working
C trunk-wc/zmachine.py
C trunk-wc/zstring.py
 M trunk-wc/trunk

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 9 22:45:03 2007

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.