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

Move tracking -- concept demo

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 25 Nov 2014 15:54:40 +0000

Hello, fans of move tracking.

May I invite you to switch to the 'move-tracking-2' branch and run 'svnmover_tests.py --verbose'? You will see a demo of my concepts for how move tracking should behave.

Test 4 is a simple example of what I'm aiming for. It performs a merge of some edits on trunk (which include a rename) into a branch where the parent directory was moved:

$ svnmover -U $REPO \
    mkbranch trunk mkdir branches
A    (br) trunk
A    branches
r2 committed ...

$ svnmover -U $REPO/trunk \
    mkdir lib mkdir lib/foo mkdir lib/foo/x mkdir lib/foo/y
A    lib
A    lib/foo
A    lib/foo/x
A    lib/foo/y
r3 committed ...

$ svnmover -U $REPO \
    branch trunk branches/br1
A+   (br) branches/br1
r4 committed ...

$ svnmover -U $REPO/trunk \
    rm lib/foo/x mv lib/foo/y lib/foo/y2 mkdir lib/foo/z
V    lib/foo/y2 (from lib/foo/y)
A    lib/foo/z
r5 committed ...

$ svnmover -U $REPO/branches/br1 \
    mv lib/foo bar
V    bar (from lib/foo)
r6 committed ...

$ svnmover -U $REPO \
    merge trunk_at_6 branches/br1 trunk_at_3
M/V  <e102> bar
r7 committed ...

That's a merge from trunk to branch br1, using an ancestor of trunk_at_3. Notice that all the merge says it needs to do is modify/move/rename one directory.

If we look at the diff committed by that merge...

$ svnmover -U $REPO diff trunk_at_6 trunk_at_7
--- branch diff, family 1, at left '/trunk' right '/trunk'
Mvr bar (moved+renamed from lib/foo)

... the change is described as just a move.

On the other hand, the traditional 'svn log' output for r7 shows a traditional 'copy and delete', as expected:

$ svn log -vq -r7 $REPO
r7 | jrandom | 2014-11-25 14:23:05 +0000 (Tue, 25 Nov 2014)
Changed paths:
   A /trunk/bar
   A /trunk/bar/y2 (from /trunk/lib/foo/y2:6)
   A /trunk/bar/z (from /trunk/lib/foo/z:6)
   D /trunk/lib/foo

(Here we can see a bug: 'bar' should be copied from /trunk/lib/foo_at_6, but the code instead committed 'bar' as a plain add and then copied its children.)

Please have a play with it! Questions? Thoughts? (First question: "So what are these concepts and goals?")

- Julian
Received on 2014-11-25 16:56:16 CET

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