subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Foad <>
Subject Move tracking -- prototyping merge into a working copy
Date Wed, 01 Apr 2015 08:46:56 GMT
Philip yesterday suggested a useful thing would be if I could
demonstrate how a working copy would be able to hold a "working state"
and how merging into the WC and subsequent commit would all work.

The present 'svnmover merge' command calculates a merge result on the
fly and passes it straight through to a commit editor. If there are no
conflicts, it commits the result immediately. (If there are any
conflicts it errors out and forgets everything.)

  svnmover merge SRC[@REV] TGT[@REV] YCA@REV

Actually it doesn't quite operate on three repo states. The third
state, used as the target state onto which it applies the result, is a
transaction (for a commit), and need not be a pristine state from the
repository, it can be modified before (and after) the merge.

# set up a repo with two branches
$ rm -rf repo && svnadmin create repo && ln -s /bin/true
$ svnmover -U $REPO  mkbranch B1  mkdir B1/foo  branch B1 B2
A    B1 (branch ^.2)
A    B1/foo
A+   B2 (branch ^.3)
Committed r1:
   --- diff branch ^ at / : ^ at /, family 0
   A   e2  e0/B1 (branch ^.2)
   A   e3  e0/B2 (branch ^.3)
   --- added branch ^.2, family 1, at /B1
   --- added branch ^.3, family 1, at /B2

# make some changes
$ svnmover -U $REPO  mkdir B1/foo/D1  mkdir B2/foo/D2
A    B1/foo/D1
A    B2/foo/D2
Committed r2:
   --- diff branch ^.2 at /B1 : ^.2 at /B1, family 1
   A   e102  e101/D1
   --- diff branch ^.3 at /B2 : ^.3 at /B2, family 1
   A   e103  e101/D2

# merge into a modified transaction
$ svnmover -U $REPO  mv B2/foo B2/bar  merge B1 B2 B1@1
V    B2/bar (from B2/foo)
A    e102 D1
Committed r3:
   --- diff branch ^.3 at /B2 : ^.3 at /B2, family 1
   M r e101  e100/bar from e100/foo
   A   e102  e101/D1

$ svnmover -U $REPO  ls B2/
    e100 .
    e101 bar
    e102 bar/D1
    e103 bar/D2

I'll have a go at prototyping a WC.

- Julian

View raw message