summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/comprehensive/test_custom_layout.py1
-rw-r--r--tests/comprehensive/test_rebuildmeta.py29
-rw-r--r--tests/comprehensive/test_stupid_pull.py1
-rw-r--r--tests/comprehensive/test_verify_and_startrev.py1
-rwxr-xr-xtests/fixtures/copyafterclose.sh60
-rw-r--r--tests/fixtures/copyafterclose.svndump285
-rwxr-xr-xtests/fixtures/renames.sh46
-rw-r--r--tests/fixtures/renames.svndump711
-rwxr-xr-xtests/fixtures/renames_with_prefix.sh142
-rw-r--r--tests/fixtures/renames_with_prefix.svndump1189
-rw-r--r--tests/test_fetch_branches.py13
-rw-r--r--tests/test_fetch_mappings.py24
-rw-r--r--tests/test_fetch_renames.py29
-rw-r--r--tests/test_push_command.py23
-rw-r--r--tests/test_tags.py2
-rw-r--r--tests/test_util.py31
16 files changed, 2380 insertions, 207 deletions
diff --git a/tests/comprehensive/test_custom_layout.py b/tests/comprehensive/test_custom_layout.py
index 4633904..7f6d573 100644
--- a/tests/comprehensive/test_custom_layout.py
+++ b/tests/comprehensive/test_custom_layout.py
@@ -1,5 +1,4 @@
import os
-import pickle
import sys
import unittest
diff --git a/tests/comprehensive/test_rebuildmeta.py b/tests/comprehensive/test_rebuildmeta.py
index c25889f..5f56836 100644
--- a/tests/comprehensive/test_rebuildmeta.py
+++ b/tests/comprehensive/test_rebuildmeta.py
@@ -1,5 +1,4 @@
import os
-import pickle
import unittest
import sys
@@ -14,11 +13,14 @@ except ImportError:
from mercurial import context
from mercurial import extensions
from mercurial import hg
+from mercurial import localrepo
from mercurial import ui
+from mercurial import util as hgutil
from hgsubversion import compathacks
from hgsubversion import svncommands
from hgsubversion import svnmeta
+from hgsubversion import util
# These test repositories have harmless skew in rebuildmeta for the
# last-pulled-rev because the last rev in svn causes absolutely no
@@ -85,7 +87,12 @@ def _do_case(self, name, layout):
# remove the wrapper
context.changectx.children = origchildren
- dest.pull(src)
+ if hgutil.safehasattr(localrepo.localrepository, 'pull'):
+ dest.pull(src)
+ else:
+ # Mercurial >= 3.2
+ from mercurial import exchange
+ exchange.pull(dest, src)
# insert a wrapper that prevents calling changectx.children()
extensions.wrapfunction(context.changectx, 'children', failfn)
@@ -110,23 +117,29 @@ def _run_assertions(self, name, single, src, dest, u):
for tf in ('lastpulled', 'rev_map', 'uuid', 'tagmap', 'layout', 'subdir',):
stf = os.path.join(src.path, 'svn', tf)
- self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf)
+ # the generation of tagmap is lazy so it doesn't strictly need to exist
+ # if it's not being used
+ if not stf.endswith('tagmap'):
+ self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf)
dtf = os.path.join(dest.path, 'svn', tf)
- self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf)
- old, new = open(stf).read(), open(dtf).read()
+ old, new = None, None
+ if not dtf.endswith('tagmap'):
+ self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf)
+ if os.path.isfile(stf) and os.path.isfile(dtf):
+ old, new = util.load(stf, resave=False), util.load(dtf, resave=False)
if tf == 'lastpulled' and (name,
self.stupid, single) in expect_youngest_skew:
self.assertNotEqual(old, new,
'rebuildmeta unexpected match on youngest rev!')
continue
- self.assertMultiLineEqual(old, new, tf + ' differs')
+ self.assertEqual(old, new, tf + ' differs')
try:
self.assertEqual(src.branchmap(), dest.branchmap())
except AttributeError:
# hg 2.8 and earlier
self.assertEqual(src.branchtags(), dest.branchtags())
- srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info')))
- destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info')))
+ srcbi = util.load(os.path.join(src.path, 'svn', 'branch_info'))
+ destbi = util.load(os.path.join(dest.path, 'svn', 'branch_info'))
self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys()))
revkeys = svnmeta.SVNMeta(dest).revmap.keys()
for branch in destbi:
diff --git a/tests/comprehensive/test_stupid_pull.py b/tests/comprehensive/test_stupid_pull.py
index 1586e7d..4abbe29 100644
--- a/tests/comprehensive/test_stupid_pull.py
+++ b/tests/comprehensive/test_stupid_pull.py
@@ -1,5 +1,4 @@
import os
-import pickle
import sys
import unittest
diff --git a/tests/comprehensive/test_verify_and_startrev.py b/tests/comprehensive/test_verify_and_startrev.py
index f5dd554..4d24f05 100644
--- a/tests/comprehensive/test_verify_and_startrev.py
+++ b/tests/comprehensive/test_verify_and_startrev.py
@@ -1,5 +1,4 @@
import os
-import pickle
import sys
import unittest
diff --git a/tests/fixtures/copyafterclose.sh b/tests/fixtures/copyafterclose.sh
new file mode 100755
index 0000000..e8ab84a
--- /dev/null
+++ b/tests/fixtures/copyafterclose.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+rm -rf temp
+mkdir temp
+cd temp
+svnadmin create repo
+repo=file://`pwd`/repo
+svn co $repo wc
+cd wc
+mkdir branches trunk tags
+svn add *
+svn ci -m 'btt'
+
+cd trunk
+echo trunk1 > file
+mkdir dir
+echo trunk1 > dir/file
+svn add file dir
+svn ci -m 'Add file and dir.'
+cd ..
+svn up
+
+svn cp trunk branches/test
+svn ci -m 'Branch.'
+svn up
+
+cd branches/test/
+echo branch1 > file
+echo branch1 > dir/file
+svn ci -m 'edit on branch.'
+cd ../../
+svn up
+
+cd trunk
+echo trunk2 > file
+echo trunk2 > dir/file
+svn ci -m 'edit on trunk'
+cd ..
+svn up
+
+svn rm trunk
+svn ci -m 'Close trunk.'
+svn up
+
+cd branches/test
+svn rm file
+svn cp $repo/trunk/file@5 file
+svn rm dir
+svn cp $repo/trunk/dir@5 dir
+svn ci -m 'copy from trunk before close'
+cd ../..
+svn up
+
+cd ../..
+svnadmin dump temp/repo > copyafterclose.svndump
+echo
+echo 'Complete.'
+echo 'You probably want to clean up temp now.'
+echo 'Dump in copyafterclose.svndump'
+exit 0
diff --git a/tests/fixtures/copyafterclose.svndump b/tests/fixtures/copyafterclose.svndump
new file mode 100644
index 0000000..e9bf292
--- /dev/null
+++ b/tests/fixtures/copyafterclose.svndump
@@ -0,0 +1,285 @@
+SVN-fs-dump-format-version: 2
+
+UUID: 288797d9-b527-4683-aa49-2eb9e084ffad
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.334418Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 108
+Content-length: 108
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.393547Z
+K 7
+svn:log
+V 3
+btt
+PROPS-END
+
+Node-path: branches
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: tags
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 2
+Prop-content-length: 123
+Content-length: 123
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.442353Z
+K 7
+svn:log
+V 17
+Add file and dir.
+PROPS-END
+
+Node-path: trunk/dir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/dir/file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 7
+Text-content-md5: 5f2a436c7d4aa15dfbdca7b303fcae35
+Text-content-sha1: 391157987cb6fefff86fd89353356611ea621906
+Content-length: 17
+
+PROPS-END
+trunk1
+
+
+Node-path: trunk/file
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 7
+Text-content-md5: 5f2a436c7d4aa15dfbdca7b303fcae35
+Text-content-sha1: 391157987cb6fefff86fd89353356611ea621906
+Content-length: 17
+
+PROPS-END
+trunk1
+
+
+Revision-number: 3
+Prop-content-length: 112
+Content-length: 112
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.504478Z
+K 7
+svn:log
+V 7
+Branch.
+PROPS-END
+
+Node-path: branches/test
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk
+
+
+Revision-number: 4
+Prop-content-length: 121
+Content-length: 121
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.549176Z
+K 7
+svn:log
+V 15
+edit on branch.
+PROPS-END
+
+Node-path: branches/test/dir/file
+Node-kind: file
+Node-action: change
+Text-content-length: 8
+Text-content-md5: ed787ace107676c1dfcced2ae527df92
+Text-content-sha1: b8486c4feca589a4237a1ee428322d7109ede12e
+Content-length: 8
+
+branch1
+
+
+Node-path: branches/test/file
+Node-kind: file
+Node-action: change
+Text-content-length: 8
+Text-content-md5: ed787ace107676c1dfcced2ae527df92
+Text-content-sha1: b8486c4feca589a4237a1ee428322d7109ede12e
+Content-length: 8
+
+branch1
+
+
+Revision-number: 5
+Prop-content-length: 119
+Content-length: 119
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.600193Z
+K 7
+svn:log
+V 13
+edit on trunk
+PROPS-END
+
+Node-path: trunk/dir/file
+Node-kind: file
+Node-action: change
+Text-content-length: 7
+Text-content-md5: 28d0a7e7ef2864416b7a9398623e4d09
+Text-content-sha1: 91454e2d3487f712490f17481157e389c11a6fe0
+Content-length: 7
+
+trunk2
+
+
+Node-path: trunk/file
+Node-kind: file
+Node-action: change
+Text-content-length: 7
+Text-content-md5: 28d0a7e7ef2864416b7a9398623e4d09
+Text-content-sha1: 91454e2d3487f712490f17481157e389c11a6fe0
+Content-length: 7
+
+trunk2
+
+
+Revision-number: 6
+Prop-content-length: 118
+Content-length: 118
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.650888Z
+K 7
+svn:log
+V 12
+Close trunk.
+PROPS-END
+
+Node-path: trunk
+Node-action: delete
+
+
+Revision-number: 7
+Prop-content-length: 134
+Content-length: 134
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-03T22:42:41.757761Z
+K 7
+svn:log
+V 28
+copy from trunk before close
+PROPS-END
+
+Node-path: branches/test/dir
+Node-kind: dir
+Node-action: delete
+
+Node-path: branches/test/dir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: trunk/dir
+
+
+
+
+Node-path: branches/test/file
+Node-kind: file
+Node-action: delete
+
+Node-path: branches/test/file
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: trunk/file
+Text-copy-source-md5: 28d0a7e7ef2864416b7a9398623e4d09
+Text-copy-source-sha1: 91454e2d3487f712490f17481157e389c11a6fe0
+
+
+
+
diff --git a/tests/fixtures/renames.sh b/tests/fixtures/renames.sh
index 6b3df07..9510b5b 100755
--- a/tests/fixtures/renames.sh
+++ b/tests/fixtures/renames.sh
@@ -3,6 +3,10 @@
# Generate renames.svndump
#
+set -e
+
+rm -rf temp
+
mkdir temp
cd temp
@@ -21,82 +25,112 @@ cd project/trunk
# Entries for regular tests
echo a > a
echo b > b
+ln -s a linka
+ln -s b linkb
mkdir -p da/db
echo c > da/daf
+ln -s daf da/dalink
echo d > da/db/dbf
+ln -s ../daf da/db/dblink
# Entries to test delete + copy
echo deleted > deletedfile
+ln -s b deletedlink
mkdir deleteddir
echo deleteddir > deleteddir/f
+ln -s f deleteddir/link
# Entries to test copy before change
echo changed > changed
+ln -s changed changedlink
mkdir changeddir
echo changed2 > changeddir/f
+ln -s f changeddir/link
# Entries unchanged in the rest of history
echo unchanged > unchanged
+ln -s unchanged unchangedlink
mkdir unchangeddir
echo unchanged2 > unchangeddir/f
+ln -s f unchangeddir/link
# One of the files will be changed afterwards, to test
# group copies detection
mkdir groupdir
echo a > groupdir/a
echo b > groupdir/b
-svn add a b da deletedfile deleteddir changed changeddir unchanged unchangeddir groupdir
-svn ci -m "add a and b"
+ln -s a groupdir/linka
+ln -s b groupdir/linkb
+svn add a b linka linkb da deleted* changed* unchanged* groupdir
+svn ci -m "add everything"
# Remove files to be copied later
svn rm deletedfile
svn rm deleteddir
+svn rm deletedlink
# Update files to be copied before this change
echo changed >> changed
echo changed2 >> changeddir/f
+ln -sfn changeddir/f changedlink
+ln -sfn ../changed changeddir/link
# Update one of the groupdir files
echo a >> groupdir/a
+ln -sfn ../a groupdir/linka
svn ci -m "delete files and dirs"
cd ../branches
svn cp ../trunk branch1
svn ci -m "create branch1"
cd branch1
echo c > c
-svn add c
-svn ci -m "add c"
+ln -s c linkc
+svn add c linkc
+svn ci -m "add c and linkc"
cd ../../trunk
# Regular copy and rename
svn cp a a1
+svn cp linka linka1
svn mv a a2
+svn mv linka linka2
# Copy and update of source and dest
svn cp b b1
+svn cp linkb linkb1
echo b >> b
echo c >> b1
+ln -sfn bb linkb
+ln -sfn bc linkb1
# Directory copy and renaming
svn cp da da1
svn mv da da2
# Test one copy operation in branch
cd ../branches/branch1
svn cp c c1
+svn cp linkc linkc1
echo c >> c1
+ln -sfn cc linkc1
cd ../..
-svn ci -m "rename and copy a, b and da"
+svn ci -m "rename and copy a, b, c and da, plus their links"
cd trunk
# Copy across branch
svn cp ../branches/branch1/c c
-svn ci -m "copy b from branch1"
+svn cp ../branches/branch1/linkc linkc
+svn ci -m "copy c from branch1"
# Copy deleted stuff from the past
svn cp $svnurl/trunk/deletedfile@2 deletedfile
svn cp $svnurl/trunk/deleteddir@2 deleteddir
+svn cp $svnurl/trunk/deletedlink@2 deletedlink
svn ci -m "copy stuff from the past"
# Copy data from the past before it was changed
svn cp $svnurl/trunk/changed@2 changed2
svn cp $svnurl/trunk/changeddir@2 changeddir2
+svn cp $svnurl/trunk/changedlink@2 changedlink2
# Harder, copy from the past before change and change it again
# This confused the stupid diff path
svn cp $svnurl/trunk/changed@2 changed3
+svn cp $svnurl/trunk/changedlink@2 changedlink3
echo changed3 >> changed3
+ln -sfn changed3 changedlink3
svn ci -m "copy stuff from the past before change"
# Copy unchanged stuff from the past. Since no changed occured in these files
# between the source and parent revision, we record them as copy from parent
# instead of source rev.
svn cp $svnurl/trunk/unchanged@2 unchanged2
svn cp $svnurl/trunk/unchangeddir@2 unchangeddir2
+svn cp $svnurl/trunk/unchangedlink@2 unchangedlink2
svn ci -m "copy unchanged stuff from the past"
# Copy groupdir, unfortunately one file was changed after r2 so the
# copy should not be recorded at all
diff --git a/tests/fixtures/renames.svndump b/tests/fixtures/renames.svndump
index 22dd735..3d258e8 100644
--- a/tests/fixtures/renames.svndump
+++ b/tests/fixtures/renames.svndump
@@ -1,6 +1,6 @@
SVN-fs-dump-format-version: 2
-UUID: 113560bd-ec36-42a6-acef-e4688a33b129
+UUID: e86bec6c-370f-405d-b639-abb48bba3962
Revision-number: 0
Prop-content-length: 56
@@ -9,25 +9,25 @@ Content-length: 56
K 8
svn:date
V 27
-2008-12-05T22:48:38.139917Z
+2014-04-07T22:34:17.074854Z
PROPS-END
Revision-number: 1
-Prop-content-length: 114
-Content-length: 114
+Prop-content-length: 118
+Content-length: 118
-K 7
-svn:log
-V 12
-init project
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:38.525864Z
+2014-04-07T22:34:17.214759Z
+K 7
+svn:log
+V 12
+init project
PROPS-END
Node-path: branches
@@ -49,21 +49,21 @@ PROPS-END
Revision-number: 2
-Prop-content-length: 113
-Content-length: 113
+Prop-content-length: 120
+Content-length: 120
-K 7
-svn:log
-V 11
-add a and b
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:39.313010Z
+2014-04-07T22:34:17.391940Z
+K 7
+svn:log
+V 14
+add everything
PROPS-END
Node-path: trunk/a
@@ -72,6 +72,7 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
Content-length: 12
PROPS-END
@@ -84,6 +85,7 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 3b5d5c3712955042212316173ccf37be
+Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
Content-length: 12
PROPS-END
@@ -96,6 +98,7 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 8
Text-content-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-content-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
Content-length: 18
PROPS-END
@@ -117,12 +120,45 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 9
Text-content-md5: 2dfdfd8492a2c558ec838d69f73f5f6b
+Text-content-sha1: fc7acf217b976525893922a9ed1bb3c3ab24f3a9
Content-length: 19
PROPS-END
changed2
+Node-path: trunk/changeddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
+Node-path: trunk/changedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 12
+Text-content-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-content-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+Content-length: 45
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link changed
+
Node-path: trunk/da
Node-kind: dir
Node-action: add
@@ -138,12 +174,29 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
Content-length: 12
PROPS-END
c
+Node-path: trunk/da/dalink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 8
+Text-content-md5: 21af4beda4f4d197c0b1cecbf11543dc
+Text-content-sha1: 52f2276428bcb4cf45fefaf293521b5b3a26aa5f
+Content-length: 41
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link daf
+
Node-path: trunk/da/db
Node-kind: dir
Node-action: add
@@ -159,12 +212,29 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
+Text-content-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
Content-length: 12
PROPS-END
d
+Node-path: trunk/da/db/dblink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 11
+Text-content-md5: 301198daf87f24796a8be0746389da42
+Text-content-sha1: af5485e6ea78867c36f7993542cbaadb570b79c8
+Content-length: 44
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link ../daf
+
Node-path: trunk/deleteddir
Node-kind: dir
Node-action: add
@@ -180,24 +250,58 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 11
Text-content-md5: 49b72b575e26ecddb296dd59b24c3e67
+Text-content-sha1: 02801293a2cd7e4c105239d34a3cfa4a4eb9c921
Content-length: 21
PROPS-END
deleteddir
+Node-path: trunk/deleteddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
Node-path: trunk/deletedfile
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 8
Text-content-md5: 4d742b2f247bec99b41a60acbebc149a
+Text-content-sha1: 1ef5922542033869106719d682a87ed706af4ddd
Content-length: 18
PROPS-END
deleted
+Node-path: trunk/deletedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
Node-path: trunk/groupdir
Node-kind: dir
Node-action: add
@@ -213,6 +317,7 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
Content-length: 12
PROPS-END
@@ -225,18 +330,84 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 3b5d5c3712955042212316173ccf37be
+Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
Content-length: 12
PROPS-END
b
+Node-path: trunk/groupdir/linka
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: c118dba188202a1efc975bef6064180b
+Text-content-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link a
+
+Node-path: trunk/groupdir/linkb
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
+Node-path: trunk/linka
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: c118dba188202a1efc975bef6064180b
+Text-content-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link a
+
+Node-path: trunk/linkb
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
Node-path: trunk/unchanged
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 10
Text-content-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-content-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
Content-length: 20
PROPS-END
@@ -258,28 +429,61 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 11
Text-content-md5: a11092875079a002afb9ecef07f510e7
+Text-content-sha1: c18ebadf1cffd6a79e4b74c50474b3cf8d5cb32b
Content-length: 21
PROPS-END
unchanged2
+Node-path: trunk/unchangeddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
+Node-path: trunk/unchangedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 14
+Text-content-md5: 1aa9c01278c74a273e3117dc42426153
+Text-content-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+Content-length: 47
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link unchanged
+
Revision-number: 3
-Prop-content-length: 123
-Content-length: 123
+Prop-content-length: 127
+Content-length: 127
-K 7
-svn:log
-V 21
-delete files and dirs
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:40.224632Z
+2014-04-07T22:34:17.496578Z
+K 7
+svn:log
+V 21
+delete files and dirs
PROPS-END
Node-path: trunk/changed
@@ -287,6 +491,7 @@ Node-kind: file
Node-action: change
Text-content-length: 16
Text-content-md5: 1725f40a29aad369a39b0f96c82d50f9
+Text-content-sha1: bd7078ed7302005a46b0f32b08cb81406df5d5cf
Content-length: 16
changed
@@ -298,23 +503,55 @@ Node-kind: file
Node-action: change
Text-content-length: 18
Text-content-md5: 984b8c4ab9193b7659b9f914897a949c
+Text-content-sha1: df588cfa0799c1d4447646645ff2799e23e59f57
Content-length: 18
changed2
changed2
+Node-path: trunk/changeddir/link
+Node-kind: file
+Node-action: change
+Text-content-length: 15
+Text-content-md5: 19b47078b08789b4af5bc8d78b09f051
+Text-content-sha1: 697d35a9a0857889666f1cae1baa9e294b4cf36f
+Content-length: 15
+
+link ../changed
+
+Node-path: trunk/changedlink
+Node-kind: file
+Node-action: change
+Text-content-length: 17
+Text-content-md5: 78d7d7c917f0f0355f01f23508cc0a0a
+Text-content-sha1: 6d7057bfb5ba8dffc0184f491e4fa43ec1904cdd
+Content-length: 17
+
+link changeddir/f
+
Node-path: trunk/groupdir/a
Node-kind: file
Node-action: change
Text-content-length: 4
Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
+Text-content-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
Content-length: 4
a
a
+Node-path: trunk/groupdir/linka
+Node-kind: file
+Node-action: change
+Text-content-length: 9
+Text-content-md5: 37f1cfbed04f4354d8e706a1f1f626b6
+Text-content-sha1: 7e368116b09c906ec1b989cefe328fd6dec4f759
+Content-length: 9
+
+link ../a
+
Node-path: trunk/deleteddir
Node-action: delete
@@ -323,22 +560,26 @@ Node-path: trunk/deletedfile
Node-action: delete
+Node-path: trunk/deletedlink
+Node-action: delete
+
+
Revision-number: 4
-Prop-content-length: 116
-Content-length: 116
+Prop-content-length: 120
+Content-length: 120
-K 7
-svn:log
-V 14
-create branch1
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:42.184704Z
+2014-04-07T22:34:17.595148Z
+K 7
+svn:log
+V 14
+create branch1
PROPS-END
Node-path: branches/branch1
@@ -346,14 +587,6 @@ Node-kind: dir
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: trunk
-Prop-content-length: 34
-Content-length: 34
-
-K 13
-svn:mergeinfo
-V 0
-
-PROPS-END
Node-path: branches/branch1/a
@@ -362,6 +595,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/a
Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
Node-path: branches/branch1/b
@@ -370,6 +604,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/b
Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
+Text-copy-source-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
Node-path: branches/branch1/changed
@@ -378,6 +613,7 @@ Node-action: add
Node-copyfrom-rev: 3
Node-copyfrom-path: trunk/changed
Text-copy-source-md5: 1725f40a29aad369a39b0f96c82d50f9
+Text-copy-source-sha1: bd7078ed7302005a46b0f32b08cb81406df5d5cf
Node-path: branches/branch1/changeddir
@@ -397,8 +633,33 @@ Node-action: add
Node-copyfrom-rev: 3
Node-copyfrom-path: trunk/changeddir/f
Text-copy-source-md5: 984b8c4ab9193b7659b9f914897a949c
+Text-copy-source-sha1: df588cfa0799c1d4447646645ff2799e23e59f57
+
+
+Node-path: branches/branch1/changeddir/link
+Node-kind: file
+Node-action: delete
+
+Node-path: branches/branch1/changeddir/link
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: trunk/changeddir/link
+Text-copy-source-md5: 19b47078b08789b4af5bc8d78b09f051
+Text-copy-source-sha1: 697d35a9a0857889666f1cae1baa9e294b4cf36f
+
+
+
+
+Node-path: branches/branch1/changedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: trunk/changedlink
+Text-copy-source-md5: 78d7d7c917f0f0355f01f23508cc0a0a
+Text-copy-source-sha1: 6d7057bfb5ba8dffc0184f491e4fa43ec1904cdd
Node-path: branches/branch1/da
@@ -425,8 +686,42 @@ Node-action: add
Node-copyfrom-rev: 3
Node-copyfrom-path: trunk/groupdir/a
Text-copy-source-md5: 0d227f1abf8c2932d342e9b99cc957eb
+Text-copy-source-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
+
+
+
+
+Node-path: branches/branch1/groupdir/linka
+Node-kind: file
+Node-action: delete
+
+Node-path: branches/branch1/groupdir/linka
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: trunk/groupdir/linka
+Text-copy-source-md5: 37f1cfbed04f4354d8e706a1f1f626b6
+Text-copy-source-sha1: 7e368116b09c906ec1b989cefe328fd6dec4f759
+
+
+
+
+Node-path: branches/branch1/linka
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Node-path: branches/branch1/linkb
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/linkb
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
Node-path: branches/branch1/unchanged
@@ -435,6 +730,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/unchanged
Text-copy-source-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-copy-source-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
Node-path: branches/branch1/unchangeddir
@@ -444,22 +740,31 @@ Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/unchangeddir
+Node-path: branches/branch1/unchangedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/unchangedlink
+Text-copy-source-md5: 1aa9c01278c74a273e3117dc42426153
+Text-copy-source-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+
+
Revision-number: 5
-Prop-content-length: 106
-Content-length: 106
+Prop-content-length: 121
+Content-length: 121
-K 7
-svn:log
-V 5
-add c
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:43.175723Z
+2014-04-07T22:34:17.655921Z
+K 7
+svn:log
+V 15
+add c and linkc
PROPS-END
Node-path: branches/branch1/c
@@ -468,28 +773,45 @@ Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
Content-length: 12
PROPS-END
c
+Node-path: branches/branch1/linkc
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: aaa83258c434079cc82a5b4868340dc0
+Text-content-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link c
+
Revision-number: 6
-Prop-content-length: 129
-Content-length: 129
+Prop-content-length: 154
+Content-length: 154
-K 7
-svn:log
-V 27
-rename and copy a, b and da
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:50.200094Z
+2014-04-07T22:34:17.901507Z
+K 7
+svn:log
+V 48
+rename and copy a, b, c and da, plus their links
PROPS-END
Node-path: branches/branch1/c1
@@ -498,34 +820,37 @@ Node-action: add
Node-copyfrom-rev: 5
Node-copyfrom-path: branches/branch1/c
Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
-Prop-content-length: 34
+Text-copy-source-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
Text-content-length: 4
Text-content-md5: 63fad9092ad37713ebe26b3193f89c41
-Content-length: 38
-
-K 13
-svn:mergeinfo
-V 0
+Text-content-sha1: ccfb93b7bac6f1520f0adc0eebc2cafe9da80f42
+Content-length: 4
-PROPS-END
c
c
+Node-path: branches/branch1/linkc1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: branches/branch1/linkc
+Text-copy-source-md5: aaa83258c434079cc82a5b4868340dc0
+Text-copy-source-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
+Text-content-length: 7
+Text-content-md5: ea7a177c3c3af680cf62010efe71275f
+Text-content-sha1: d780ef86a4c5016931861dc32373a1155755e404
+Content-length: 7
+
+link cc
+
Node-path: trunk/a1
Node-kind: file
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/a
Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
-Prop-content-length: 34
-Content-length: 34
-
-K 13
-svn:mergeinfo
-V 0
-
-PROPS-END
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
Node-path: trunk/a2
@@ -534,14 +859,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/a
Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
-Prop-content-length: 34
-Content-length: 34
-
-K 13
-svn:mergeinfo
-V 0
-
-PROPS-END
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
Node-path: trunk/b
@@ -549,6 +867,7 @@ Node-kind: file
Node-action: change
Text-content-length: 4
Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
+Text-content-sha1: f6980469e74f7125178e88ec571e06fe6ce86e95
Content-length: 4
b
@@ -561,16 +880,12 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/b
Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
-Prop-content-length: 34
+Text-copy-source-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
Text-content-length: 4
Text-content-md5: 33cb6785d50937d8d307ebb66d6259a7
-Content-length: 38
-
-K 13
-svn:mergeinfo
-V 0
+Text-content-sha1: 7a6478264aa11a0f4befef356c03e83f2b1f6eba
+Content-length: 4
-PROPS-END
b
c
@@ -580,14 +895,6 @@ Node-kind: dir
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/da
-Prop-content-length: 34
-Content-length: 34
-
-K 13
-svn:mergeinfo
-V 0
-
-PROPS-END
Node-path: trunk/da2
@@ -595,16 +902,50 @@ Node-kind: dir
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/da
-Prop-content-length: 34
-Content-length: 34
-K 13
-svn:mergeinfo
-V 0
-PROPS-END
+Node-path: trunk/linka1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Node-path: trunk/linka2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+
+
+Node-path: trunk/linkb
+Node-kind: file
+Node-action: change
+Text-content-length: 7
+Text-content-md5: 00b18251bf95a42453612a62619254c0
+Text-content-sha1: 8d00f006e36676f00d40c3935b6992cbb8349c2b
+Content-length: 7
+
+link bb
+
+Node-path: trunk/linkb1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/linkb
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
+Text-content-length: 7
+Text-content-md5: 1c9f17365658cf9ea7904568eff11f27
+Text-content-sha1: 163de098ef857862584154ca26e3d028fb34ba45
+Content-length: 7
+
+link bc
+
Node-path: trunk/a
Node-action: delete
@@ -613,22 +954,26 @@ Node-path: trunk/da
Node-action: delete
+Node-path: trunk/linka
+Node-action: delete
+
+
Revision-number: 7
-Prop-content-length: 121
-Content-length: 121
+Prop-content-length: 125
+Content-length: 125
-K 7
-svn:log
-V 19
-copy b from branch1
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:52.154125Z
+2014-04-07T22:34:17.969842Z
+K 7
+svn:log
+V 19
+copy c from branch1
PROPS-END
Node-path: trunk/c
@@ -637,32 +982,34 @@ Node-action: add
Node-copyfrom-rev: 5
Node-copyfrom-path: branches/branch1/c
Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
-Prop-content-length: 34
-Content-length: 34
+Text-copy-source-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
-K 13
-svn:mergeinfo
-V 0
-PROPS-END
+Node-path: trunk/linkc
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: branches/branch1/linkc
+Text-copy-source-md5: aaa83258c434079cc82a5b4868340dc0
+Text-copy-source-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
Revision-number: 8
-Prop-content-length: 126
-Content-length: 126
+Prop-content-length: 130
+Content-length: 130
-K 7
-svn:log
-V 24
-copy stuff from the past
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:55.160439Z
+2014-04-07T22:34:18.068356Z
+K 7
+svn:log
+V 24
+copy stuff from the past
PROPS-END
Node-path: trunk/deleteddir
@@ -678,24 +1025,34 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/deletedfile
Text-copy-source-md5: 4d742b2f247bec99b41a60acbebc149a
+Text-copy-source-sha1: 1ef5922542033869106719d682a87ed706af4ddd
+
+
+Node-path: trunk/deletedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/deletedlink
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
Revision-number: 9
-Prop-content-length: 140
-Content-length: 140
+Prop-content-length: 144
+Content-length: 144
-K 7
-svn:log
-V 38
-copy stuff from the past before change
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:48:59.163460Z
+2014-04-07T22:34:18.201489Z
+K 7
+svn:log
+V 38
+copy stuff from the past before change
PROPS-END
Node-path: trunk/changed2
@@ -704,6 +1061,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/changed
Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-copy-source-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
Node-path: trunk/changed3
@@ -712,8 +1070,10 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/changed
Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-copy-source-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
Text-content-length: 17
Text-content-md5: 7d93e8c4d61c2a7b05c20b7d8bf11f83
+Text-content-sha1: d78c3e7f04c44b599787ec534a3193357df1fa37
Content-length: 17
changed
@@ -727,22 +1087,45 @@ Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/changeddir
+Node-path: trunk/changedlink2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/changedlink
+Text-copy-source-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-copy-source-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+
+
+Node-path: trunk/changedlink3
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/changedlink
+Text-copy-source-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-copy-source-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+Text-content-length: 13
+Text-content-md5: 0ad81e7d7fc35e744e0ad3dea0f158fe
+Text-content-sha1: bae4618ecddda5e6ab6e5fa3b116f5d14dc3464b
+Content-length: 13
+
+link changed3
+
Revision-number: 10
-Prop-content-length: 136
-Content-length: 136
+Prop-content-length: 140
+Content-length: 140
-K 7
-svn:log
-V 34
-copy unchanged stuff from the past
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:49:02.160163Z
+2014-04-07T22:34:18.298821Z
+K 7
+svn:log
+V 34
+copy unchanged stuff from the past
PROPS-END
Node-path: trunk/unchanged2
@@ -751,6 +1134,7 @@ Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/unchanged
Text-copy-source-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-copy-source-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
Node-path: trunk/unchangeddir2
@@ -760,22 +1144,31 @@ Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/unchangeddir
+Node-path: trunk/unchangedlink2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/unchangedlink
+Text-copy-source-md5: 1aa9c01278c74a273e3117dc42426153
+Text-copy-source-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+
+
Revision-number: 11
-Prop-content-length: 129
-Content-length: 129
+Prop-content-length: 133
+Content-length: 133
-K 7
-svn:log
-V 27
-copy groupdir from the past
K 10
svn:author
-V 7
-pmezard
+V 10
+dschleimer
K 8
svn:date
V 27
-2008-12-05T22:49:04.157303Z
+2014-04-07T22:34:18.370254Z
+K 7
+svn:log
+V 27
+copy groupdir from the past
PROPS-END
Node-path: trunk/groupdir2
diff --git a/tests/fixtures/renames_with_prefix.sh b/tests/fixtures/renames_with_prefix.sh
new file mode 100755
index 0000000..23b0d85
--- /dev/null
+++ b/tests/fixtures/renames_with_prefix.sh
@@ -0,0 +1,142 @@
+#!/bin/sh
+#
+# Generate renames_with_prefix.svndump
+#
+
+set -e
+
+rm -rf temp
+
+mkdir temp
+cd temp
+
+mkdir -p project-orig/prefix
+cd project-orig/prefix
+mkdir trunk
+mkdir branches
+cd ../..
+
+svnadmin create testrepo
+svnurl=file://`pwd`/testrepo
+svn import project-orig $svnurl -m "init project"
+svnurl=$svnurl/prefix
+
+svn co $svnurl project
+cd project/trunk
+# Entries for regular tests
+echo a > a
+echo b > b
+ln -s a linka
+ln -s b linkb
+mkdir -p da/db
+echo c > da/daf
+ln -s daf da/dalink
+echo d > da/db/dbf
+ln -s ../daf da/db/dblink
+# Entries to test delete + copy
+echo deleted > deletedfile
+ln -s b deletedlink
+mkdir deleteddir
+echo deleteddir > deleteddir/f
+ln -s f deleteddir/link
+# Entries to test copy before change
+echo changed > changed
+ln -s changed changedlink
+mkdir changeddir
+echo changed2 > changeddir/f
+ln -s f changeddir/link
+# Entries unchanged in the rest of history
+echo unchanged > unchanged
+ln -s unchanged unchangedlink
+mkdir unchangeddir
+echo unchanged2 > unchangeddir/f
+ln -s f unchangeddir/link
+# One of the files will be changed afterwards, to test
+# group copies detection
+mkdir groupdir
+echo a > groupdir/a
+echo b > groupdir/b
+ln -s a groupdir/linka
+ln -s b groupdir/linkb
+svn add a b linka linkb da deleted* changed* unchanged* groupdir
+svn ci -m "add everything"
+# Remove files to be copied later
+svn rm deletedfile
+svn rm deleteddir
+svn rm deletedlink
+# Update files to be copied before this change
+echo changed >> changed
+echo changed2 >> changeddir/f
+ln -sfn changeddir/f changedlink
+ln -sfn ../changed changeddir/link
+# Update one of the groupdir files
+echo a >> groupdir/a
+ln -sfn ../a groupdir/linka
+svn ci -m "delete files and dirs"
+cd ../branches
+svn cp ../trunk branch1
+svn ci -m "create branch1"
+cd branch1
+echo c > c
+ln -s c linkc
+svn add c linkc
+svn ci -m "add c and linkc"
+cd ../../trunk
+# Regular copy and rename
+svn cp a a1
+svn cp linka linka1
+svn mv a a2
+svn mv linka linka2
+# Copy and update of source and dest
+svn cp b b1
+svn cp linkb linkb1
+echo b >> b
+echo c >> b1
+ln -sfn bb linkb
+ln -sfn bc linkb1
+# Directory copy and renaming
+svn cp da da1
+svn mv da da2
+# Test one copy operation in branch
+cd ../branches/branch1
+svn cp c c1
+svn cp linkc linkc1
+echo c >> c1
+ln -sfn cc linkc1
+cd ../..
+svn ci -m "rename and copy a, b, c and da, plus their links"
+cd trunk
+# Copy across branch
+svn cp ../branches/branch1/c c
+svn cp ../branches/branch1/linkc linkc
+svn ci -m "copy c from branch1"
+# Copy deleted stuff from the past
+svn cp $svnurl/trunk/deletedfile@2 deletedfile
+svn cp $svnurl/trunk/deleteddir@2 deleteddir
+svn cp $svnurl/trunk/deletedlink@2 deletedlink
+svn ci -m "copy stuff from the past"
+# Copy data from the past before it was changed
+svn cp $svnurl/trunk/changed@2 changed2
+svn cp $svnurl/trunk/changeddir@2 changeddir2
+svn cp $svnurl/trunk/changedlink@2 changedlink2
+# Harder, copy from the past before change and change it again
+# This confused the stupid diff path
+svn cp $svnurl/trunk/changed@2 changed3
+svn cp $svnurl/trunk/changedlink@2 changedlink3
+echo changed3 >> changed3
+ln -sfn changed3 changedlink3
+svn ci -m "copy stuff from the past before change"
+# Copy unchanged stuff from the past. Since no changed occured in these files
+# between the source and parent revision, we record them as copy from parent
+# instead of source rev.
+svn cp $svnurl/trunk/unchanged@2 unchanged2
+svn cp $svnurl/trunk/unchangeddir@2 unchangeddir2
+svn cp $svnurl/trunk/unchangedlink@2 unchangedlink2
+svn ci -m "copy unchanged stuff from the past"
+# Copy groupdir, unfortunately one file was changed after r2 so the
+# copy should not be recorded at all
+svn cp $svnurl/trunk/groupdir@2 groupdir2
+svn ci -m "copy groupdir from the past"
+cd ../..
+
+svnadmin dump testrepo > ../renames_with_prefix.svndump
diff --git a/tests/fixtures/renames_with_prefix.svndump b/tests/fixtures/renames_with_prefix.svndump
new file mode 100644
index 0000000..419046d
--- /dev/null
+++ b/tests/fixtures/renames_with_prefix.svndump
@@ -0,0 +1,1189 @@
+SVN-fs-dump-format-version: 2
+
+UUID: ae30a990-0fd3-493e-b5d7-883bdd606745
+
+Revision-number: 0
+Prop-content-length: 56
+Content-length: 56
+
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.118401Z
+PROPS-END
+
+Revision-number: 1
+Prop-content-length: 118
+Content-length: 118
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.138394Z
+K 7
+svn:log
+V 12
+init project
+PROPS-END
+
+Node-path: prefix
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/branches
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 2
+Prop-content-length: 120
+Content-length: 120
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.304127Z
+K 7
+svn:log
+V 14
+add everything
+PROPS-END
+
+Node-path: prefix/trunk/a
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
+Content-length: 12
+
+PROPS-END
+a
+
+
+Node-path: prefix/trunk/b
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 3b5d5c3712955042212316173ccf37be
+Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
+Content-length: 12
+
+PROPS-END
+b
+
+
+Node-path: prefix/trunk/changed
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 8
+Text-content-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-content-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
+Content-length: 18
+
+PROPS-END
+changed
+
+
+Node-path: prefix/trunk/changeddir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/changeddir/f
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 9
+Text-content-md5: 2dfdfd8492a2c558ec838d69f73f5f6b
+Text-content-sha1: fc7acf217b976525893922a9ed1bb3c3ab24f3a9
+Content-length: 19
+
+PROPS-END
+changed2
+
+
+Node-path: prefix/trunk/changeddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
+Node-path: prefix/trunk/changedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 12
+Text-content-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-content-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+Content-length: 45
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link changed
+
+Node-path: prefix/trunk/da
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/da/daf
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
+Content-length: 12
+
+PROPS-END
+c
+
+
+Node-path: prefix/trunk/da/dalink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 8
+Text-content-md5: 21af4beda4f4d197c0b1cecbf11543dc
+Text-content-sha1: 52f2276428bcb4cf45fefaf293521b5b3a26aa5f
+Content-length: 41
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link daf
+
+Node-path: prefix/trunk/da/db
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/da/db/dbf
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: e29311f6f1bf1af907f9ef9f44b8328b
+Text-content-sha1: e983f374794de9c64e3d1c1de1d490c0756eeeff
+Content-length: 12
+
+PROPS-END
+d
+
+
+Node-path: prefix/trunk/da/db/dblink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 11
+Text-content-md5: 301198daf87f24796a8be0746389da42
+Text-content-sha1: af5485e6ea78867c36f7993542cbaadb570b79c8
+Content-length: 44
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link ../daf
+
+Node-path: prefix/trunk/deleteddir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/deleteddir/f
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 11
+Text-content-md5: 49b72b575e26ecddb296dd59b24c3e67
+Text-content-sha1: 02801293a2cd7e4c105239d34a3cfa4a4eb9c921
+Content-length: 21
+
+PROPS-END
+deleteddir
+
+
+Node-path: prefix/trunk/deleteddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
+Node-path: prefix/trunk/deletedfile
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 8
+Text-content-md5: 4d742b2f247bec99b41a60acbebc149a
+Text-content-sha1: 1ef5922542033869106719d682a87ed706af4ddd
+Content-length: 18
+
+PROPS-END
+deleted
+
+
+Node-path: prefix/trunk/deletedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
+Node-path: prefix/trunk/groupdir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/groupdir/a
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-content-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
+Content-length: 12
+
+PROPS-END
+a
+
+
+Node-path: prefix/trunk/groupdir/b
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 3b5d5c3712955042212316173ccf37be
+Text-content-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
+Content-length: 12
+
+PROPS-END
+b
+
+
+Node-path: prefix/trunk/groupdir/linka
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: c118dba188202a1efc975bef6064180b
+Text-content-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link a
+
+Node-path: prefix/trunk/groupdir/linkb
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
+Node-path: prefix/trunk/linka
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: c118dba188202a1efc975bef6064180b
+Text-content-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link a
+
+Node-path: prefix/trunk/linkb
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-content-sha1: 7325442a5f7383205e66db563025d51535883784
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link b
+
+Node-path: prefix/trunk/unchanged
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 10
+Text-content-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-content-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
+Content-length: 20
+
+PROPS-END
+unchanged
+
+
+Node-path: prefix/trunk/unchangeddir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: prefix/trunk/unchangeddir/f
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 11
+Text-content-md5: a11092875079a002afb9ecef07f510e7
+Text-content-sha1: c18ebadf1cffd6a79e4b74c50474b3cf8d5cb32b
+Content-length: 21
+
+PROPS-END
+unchanged2
+
+
+Node-path: prefix/trunk/unchangeddir/link
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: af3f1e8f8fa51f08e4985bda241ee7b8
+Text-content-sha1: f11a0ea0293755a1ec59d29628130cf3fcd3ec1c
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link f
+
+Node-path: prefix/trunk/unchangedlink
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 14
+Text-content-md5: 1aa9c01278c74a273e3117dc42426153
+Text-content-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+Content-length: 47
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link unchanged
+
+Revision-number: 3
+Prop-content-length: 127
+Content-length: 127
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.400275Z
+K 7
+svn:log
+V 21
+delete files and dirs
+PROPS-END
+
+Node-path: prefix/trunk/changed
+Node-kind: file
+Node-action: change
+Text-content-length: 16
+Text-content-md5: 1725f40a29aad369a39b0f96c82d50f9
+Text-content-sha1: bd7078ed7302005a46b0f32b08cb81406df5d5cf
+Content-length: 16
+
+changed
+changed
+
+
+Node-path: prefix/trunk/changeddir/f
+Node-kind: file
+Node-action: change
+Text-content-length: 18
+Text-content-md5: 984b8c4ab9193b7659b9f914897a949c
+Text-content-sha1: df588cfa0799c1d4447646645ff2799e23e59f57
+Content-length: 18
+
+changed2
+changed2
+
+
+Node-path: prefix/trunk/changeddir/link
+Node-kind: file
+Node-action: change
+Text-content-length: 15
+Text-content-md5: 19b47078b08789b4af5bc8d78b09f051
+Text-content-sha1: 697d35a9a0857889666f1cae1baa9e294b4cf36f
+Content-length: 15
+
+link ../changed
+
+Node-path: prefix/trunk/changedlink
+Node-kind: file
+Node-action: change
+Text-content-length: 17
+Text-content-md5: 78d7d7c917f0f0355f01f23508cc0a0a
+Text-content-sha1: 6d7057bfb5ba8dffc0184f491e4fa43ec1904cdd
+Content-length: 17
+
+link changeddir/f
+
+Node-path: prefix/trunk/groupdir/a
+Node-kind: file
+Node-action: change
+Text-content-length: 4
+Text-content-md5: 0d227f1abf8c2932d342e9b99cc957eb
+Text-content-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
+Content-length: 4
+
+a
+a
+
+
+Node-path: prefix/trunk/groupdir/linka
+Node-kind: file
+Node-action: change
+Text-content-length: 9
+Text-content-md5: 37f1cfbed04f4354d8e706a1f1f626b6
+Text-content-sha1: 7e368116b09c906ec1b989cefe328fd6dec4f759
+Content-length: 9
+
+link ../a
+
+Node-path: prefix/trunk/deleteddir
+Node-action: delete
+
+
+Node-path: prefix/trunk/deletedfile
+Node-action: delete
+
+
+Node-path: prefix/trunk/deletedlink
+Node-action: delete
+
+
+Revision-number: 4
+Prop-content-length: 120
+Content-length: 120
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.494631Z
+K 7
+svn:log
+V 14
+create branch1
+PROPS-END
+
+Node-path: prefix/branches/branch1
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 1
+Node-copyfrom-path: prefix/trunk
+
+
+Node-path: prefix/branches/branch1/a
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/a
+Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
+
+
+Node-path: prefix/branches/branch1/b
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/b
+Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
+Text-copy-source-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
+
+
+Node-path: prefix/branches/branch1/changed
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/changed
+Text-copy-source-md5: 1725f40a29aad369a39b0f96c82d50f9
+Text-copy-source-sha1: bd7078ed7302005a46b0f32b08cb81406df5d5cf
+
+
+Node-path: prefix/branches/branch1/changeddir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changeddir
+
+
+Node-path: prefix/branches/branch1/changeddir/f
+Node-kind: file
+Node-action: delete
+
+Node-path: prefix/branches/branch1/changeddir/f
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/changeddir/f
+Text-copy-source-md5: 984b8c4ab9193b7659b9f914897a949c
+Text-copy-source-sha1: df588cfa0799c1d4447646645ff2799e23e59f57
+
+
+
+
+Node-path: prefix/branches/branch1/changeddir/link
+Node-kind: file
+Node-action: delete
+
+Node-path: prefix/branches/branch1/changeddir/link
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/changeddir/link
+Text-copy-source-md5: 19b47078b08789b4af5bc8d78b09f051
+Text-copy-source-sha1: 697d35a9a0857889666f1cae1baa9e294b4cf36f
+
+
+
+
+Node-path: prefix/branches/branch1/changedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/changedlink
+Text-copy-source-md5: 78d7d7c917f0f0355f01f23508cc0a0a
+Text-copy-source-sha1: 6d7057bfb5ba8dffc0184f491e4fa43ec1904cdd
+
+
+Node-path: prefix/branches/branch1/da
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/da
+
+
+Node-path: prefix/branches/branch1/groupdir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/groupdir
+
+
+Node-path: prefix/branches/branch1/groupdir/a
+Node-kind: file
+Node-action: delete
+
+Node-path: prefix/branches/branch1/groupdir/a
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/groupdir/a
+Text-copy-source-md5: 0d227f1abf8c2932d342e9b99cc957eb
+Text-copy-source-sha1: d7c8127a20a396cff08af086a1c695b0636f0c29
+
+
+
+
+Node-path: prefix/branches/branch1/groupdir/linka
+Node-kind: file
+Node-action: delete
+
+Node-path: prefix/branches/branch1/groupdir/linka
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 3
+Node-copyfrom-path: prefix/trunk/groupdir/linka
+Text-copy-source-md5: 37f1cfbed04f4354d8e706a1f1f626b6
+Text-copy-source-sha1: 7e368116b09c906ec1b989cefe328fd6dec4f759
+
+
+
+
+Node-path: prefix/branches/branch1/linka
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+
+
+Node-path: prefix/branches/branch1/linkb
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/linkb
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
+
+
+Node-path: prefix/branches/branch1/unchanged
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchanged
+Text-copy-source-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-copy-source-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
+
+
+Node-path: prefix/branches/branch1/unchangeddir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchangeddir
+
+
+Node-path: prefix/branches/branch1/unchangedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchangedlink
+Text-copy-source-md5: 1aa9c01278c74a273e3117dc42426153
+Text-copy-source-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+
+
+Revision-number: 5
+Prop-content-length: 121
+Content-length: 121
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.558149Z
+K 7
+svn:log
+V 15
+add c and linkc
+PROPS-END
+
+Node-path: prefix/branches/branch1/c
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-content-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
+Content-length: 12
+
+PROPS-END
+c
+
+
+Node-path: prefix/branches/branch1/linkc
+Node-kind: file
+Node-action: add
+Prop-content-length: 33
+Text-content-length: 6
+Text-content-md5: aaa83258c434079cc82a5b4868340dc0
+Text-content-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
+Content-length: 39
+
+K 11
+svn:special
+V 1
+*
+PROPS-END
+link c
+
+Revision-number: 6
+Prop-content-length: 154
+Content-length: 154
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.742494Z
+K 7
+svn:log
+V 48
+rename and copy a, b, c and da, plus their links
+PROPS-END
+
+Node-path: prefix/branches/branch1/c1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: prefix/branches/branch1/c
+Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-copy-source-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
+Text-content-length: 4
+Text-content-md5: 63fad9092ad37713ebe26b3193f89c41
+Text-content-sha1: ccfb93b7bac6f1520f0adc0eebc2cafe9da80f42
+Content-length: 4
+
+c
+c
+
+
+Node-path: prefix/branches/branch1/linkc1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: prefix/branches/branch1/linkc
+Text-copy-source-md5: aaa83258c434079cc82a5b4868340dc0
+Text-copy-source-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
+Text-content-length: 7
+Text-content-md5: ea7a177c3c3af680cf62010efe71275f
+Text-content-sha1: d780ef86a4c5016931861dc32373a1155755e404
+Content-length: 7
+
+link cc
+
+Node-path: prefix/trunk/a1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/a
+Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
+
+
+Node-path: prefix/trunk/a2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/a
+Text-copy-source-md5: 60b725f10c9c85c70d97880dfe8191b3
+Text-copy-source-sha1: 3f786850e387550fdab836ed7e6dc881de23001b
+
+
+Node-path: prefix/trunk/b
+Node-kind: file
+Node-action: change
+Text-content-length: 4
+Text-content-md5: 06ac26ed8b614fc0b141e4542aa067c2
+Text-content-sha1: f6980469e74f7125178e88ec571e06fe6ce86e95
+Content-length: 4
+
+b
+b
+
+
+Node-path: prefix/trunk/b1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/b
+Text-copy-source-md5: 3b5d5c3712955042212316173ccf37be
+Text-copy-source-sha1: 89e6c98d92887913cadf06b2adb97f26cde4849b
+Text-content-length: 4
+Text-content-md5: 33cb6785d50937d8d307ebb66d6259a7
+Text-content-sha1: 7a6478264aa11a0f4befef356c03e83f2b1f6eba
+Content-length: 4
+
+b
+c
+
+
+Node-path: prefix/trunk/da1
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/da
+
+
+Node-path: prefix/trunk/da2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/da
+
+
+Node-path: prefix/trunk/linka1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+
+
+Node-path: prefix/trunk/linka2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/linka
+Text-copy-source-md5: c118dba188202a1efc975bef6064180b
+Text-copy-source-sha1: 41f94e4692313bf7f7c92aa600002f1dff93d6bf
+
+
+Node-path: prefix/trunk/linkb
+Node-kind: file
+Node-action: change
+Text-content-length: 7
+Text-content-md5: 00b18251bf95a42453612a62619254c0
+Text-content-sha1: 8d00f006e36676f00d40c3935b6992cbb8349c2b
+Content-length: 7
+
+link bb
+
+Node-path: prefix/trunk/linkb1
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/linkb
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
+Text-content-length: 7
+Text-content-md5: 1c9f17365658cf9ea7904568eff11f27
+Text-content-sha1: 163de098ef857862584154ca26e3d028fb34ba45
+Content-length: 7
+
+link bc
+
+Node-path: prefix/trunk/a
+Node-action: delete
+
+
+Node-path: prefix/trunk/da
+Node-action: delete
+
+
+Node-path: prefix/trunk/linka
+Node-action: delete
+
+
+Revision-number: 7
+Prop-content-length: 125
+Content-length: 125
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.807910Z
+K 7
+svn:log
+V 19
+copy c from branch1
+PROPS-END
+
+Node-path: prefix/trunk/c
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: prefix/branches/branch1/c
+Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
+Text-copy-source-sha1: 2b66fd261ee5c6cfc8de7fa466bab600bcfe4f69
+
+
+Node-path: prefix/trunk/linkc
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: prefix/branches/branch1/linkc
+Text-copy-source-md5: aaa83258c434079cc82a5b4868340dc0
+Text-copy-source-sha1: d347f561790aa523b963fc1714c64e1d158cc5d7
+
+
+Revision-number: 8
+Prop-content-length: 130
+Content-length: 130
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:22.895608Z
+K 7
+svn:log
+V 24
+copy stuff from the past
+PROPS-END
+
+Node-path: prefix/trunk/deleteddir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/deleteddir
+
+
+Node-path: prefix/trunk/deletedfile
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/deletedfile
+Text-copy-source-md5: 4d742b2f247bec99b41a60acbebc149a
+Text-copy-source-sha1: 1ef5922542033869106719d682a87ed706af4ddd
+
+
+Node-path: prefix/trunk/deletedlink
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/deletedlink
+Text-copy-source-md5: e9292b8c4fca95ac8c70b4ae040d0b79
+Text-copy-source-sha1: 7325442a5f7383205e66db563025d51535883784
+
+
+Revision-number: 9
+Prop-content-length: 144
+Content-length: 144
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:23.017668Z
+K 7
+svn:log
+V 38
+copy stuff from the past before change
+PROPS-END
+
+Node-path: prefix/trunk/changed2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changed
+Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-copy-source-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
+
+
+Node-path: prefix/trunk/changed3
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changed
+Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-copy-source-sha1: 2f6933b5ee0f5fdd823d9717d8729f3c2523811b
+Text-content-length: 17
+Text-content-md5: 7d93e8c4d61c2a7b05c20b7d8bf11f83
+Text-content-sha1: d78c3e7f04c44b599787ec534a3193357df1fa37
+Content-length: 17
+
+changed
+changed3
+
+
+Node-path: prefix/trunk/changeddir2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changeddir
+
+
+Node-path: prefix/trunk/changedlink2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changedlink
+Text-copy-source-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-copy-source-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+
+
+Node-path: prefix/trunk/changedlink3
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/changedlink
+Text-copy-source-md5: d91fb1e1062e62a17f97b44932d454c4
+Text-copy-source-sha1: 8c147187742f58ed0cd8707ddd0c0942fe8b2616
+Text-content-length: 13
+Text-content-md5: 0ad81e7d7fc35e744e0ad3dea0f158fe
+Text-content-sha1: bae4618ecddda5e6ab6e5fa3b116f5d14dc3464b
+Content-length: 13
+
+link changed3
+
+Revision-number: 10
+Prop-content-length: 140
+Content-length: 140
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:23.111440Z
+K 7
+svn:log
+V 34
+copy unchanged stuff from the past
+PROPS-END
+
+Node-path: prefix/trunk/unchanged2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchanged
+Text-copy-source-md5: 85ae5b04dd0a666efad8633d142a4635
+Text-copy-source-sha1: c654a5435f170cfad37e136fee9672ecc40afd4a
+
+
+Node-path: prefix/trunk/unchangeddir2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchangeddir
+
+
+Node-path: prefix/trunk/unchangedlink2
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/unchangedlink
+Text-copy-source-md5: 1aa9c01278c74a273e3117dc42426153
+Text-copy-source-sha1: 3f1a6ab03b820f0baab56c083f77bd9279db2486
+
+
+Revision-number: 11
+Prop-content-length: 133
+Content-length: 133
+
+K 10
+svn:author
+V 10
+dschleimer
+K 8
+svn:date
+V 27
+2014-04-08T01:02:23.179096Z
+K 7
+svn:log
+V 27
+copy groupdir from the past
+PROPS-END
+
+Node-path: prefix/trunk/groupdir2
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: prefix/trunk/groupdir
+
+
diff --git a/tests/test_fetch_branches.py b/tests/test_fetch_branches.py
index ff8e2f1..e9acdfa 100644
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -50,9 +50,7 @@ class TestFetchBranches(test_util.TestBase):
self.assertEqual(['a', 'c', 'z'], sorted(r.manifest()))
def test_renamed_branch_to_trunk(self):
- config = {'hgsubversion.failonmissing': 'true'}
- repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump',
- config=config)
+ repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump')
self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch')
self.assert_('iota' in repo['default'])
self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default')
@@ -73,6 +71,15 @@ class TestFetchBranches(test_util.TestBase):
self.assertEqual(repo['test'].extra().get('close'), '1')
self.assertEqual(repo['test']['b'].data(), 'a\n')
+ def test_copyafterclose(self):
+ repo = self._load_fixture_and_fetch('copyafterclose.svndump')
+ self.assertEqual(repo['tip'].branch(), 'test')
+ self.assert_('file' in repo['test'])
+ self.assertEqual(repo['test']['file'].data(), 'trunk2\n')
+ self.assert_('dir/file' in repo['test'])
+ self.assertEqual(repo['test']['dir/file'].data(), 'trunk2\n')
+
+
def test_branch_create_with_dir_delete_works(self):
repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump')
self.assertEqual(repo['tip'].manifest().keys(),
diff --git a/tests/test_fetch_mappings.py b/tests/test_fetch_mappings.py
index 219b1a4..f022c6f 100644
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -84,10 +84,15 @@ class MapTests(test_util.TestBase):
def test_author_map_no_overwrite(self):
cwd = os.path.dirname(__file__)
orig = os.path.join(cwd, 'fixtures', 'author-map-test.txt')
- new = open(self.authors, 'w')
+ # create a fake hgsubversion repo
+ repopath = os.path.join(self.wc_path, '.hg')
+ repopath = os.path.join(repopath, 'svn')
+ if not os.path.isdir(repopath):
+ os.makedirs(repopath)
+ new = open(os.path.join(repopath, 'authors'), 'w')
new.write(open(orig).read())
new.close()
- test = maps.AuthorMap(self.ui(), self.authors)
+ test = maps.AuthorMap(self.repo.svnmeta(skiperrorcheck=True))
fromself = set(test)
test.load(orig)
all_tests = set(test)
@@ -285,21 +290,6 @@ class MapTests(test_util.TestBase):
for r in repo:
self.assertEquals(verify.verify(ui, repo, rev=r), 0)
- def test_branchmap_no_replacement(self):
- '''
- test that empty mappings are rejected
-
- Empty mappings are lines like 'this ='. The most sensible thing to do
- is to not convert the 'this' branches. Until we can do that, we settle
- with aborting.
- '''
- repo_path = self.load_svndump('propset-branch.svndump')
- branchmap = open(self.branchmap, 'w')
- branchmap.write("closeme =\n")
- branchmap.close()
- self.assertRaises(hgutil.Abort,
- maps.BranchMap, self.ui(), self.branchmap)
-
def test_tagmap(self):
repo_path = self.load_svndump('basic_tag_tests.svndump')
tagmap = open(self.tagmap, 'w')
diff --git a/tests/test_fetch_renames.py b/tests/test_fetch_renames.py
index e879ba6..fad681d 100644
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -18,29 +18,56 @@ class TestFetchRenames(test_util.TestBase):
def test_rename(self):
config = {
'hgsubversion.filestoresize': '0',
+ # we set this because we expect all of the copies to be
+ # handled via replay, and we want to notice if that
+ # changes.
+ 'hgsubversion.failonmissing': 'yes',
}
repo = self._load_fixture_and_fetch('renames.svndump', config=config)
+ self._run_assertions(repo)
+ def test_rename_with_prefix(self):
+ config = {
+ 'hgsubversion.filestoresize': '0',
+ 'hgsubversion.failonmissing': 'yes',
+ }
+ repo = self._load_fixture_and_fetch('renames_with_prefix.svndump',
+ subdir='prefix',
+ config=config)
+ self._run_assertions(repo)
+
+ def _run_assertions(self, repo):
# Map revnum to mappings of dest name to (source name, dest content)
copies = {
4: {
'a1': ('a', 'a\n'),
+ 'linka1': ('linka', 'a'),
'a2': ('a', 'a\n'),
+ 'linka2': ('linka', 'a'),
'b1': ('b', 'b\nc\n'),
+ 'linkb1': ('linkb', 'bc'),
'da1/daf': ('da/daf', 'c\n'),
+ 'da1/dalink': ('da/dalink', 'daf'),
'da1/db/dbf': ('da/db/dbf', 'd\n'),
+ 'da1/db/dblink': ('da/db/dblink', '../daf'),
'da2/daf': ('da/daf', 'c\n'),
+ 'da2/dalink': ('da/dalink', 'daf'),
'da2/db/dbf': ('da/db/dbf', 'd\n'),
+ 'da2/db/dblink': ('da/db/dblink', '../daf'),
},
5: {
'c1': ('c', 'c\nc\n'),
+ 'linkc1': ('linkc', 'cc'),
},
9: {
'unchanged2': ('unchanged', 'unchanged\n'),
+ 'unchangedlink2': ('unchangedlink', 'unchanged'),
'unchangeddir2/f': ('unchangeddir/f', 'unchanged2\n'),
+ 'unchangeddir2/link': ('unchangeddir/link', 'f'),
},
10: {
- 'groupdir2/b': ('groupdir/b', 'b\n')
+ 'groupdir2/b': ('groupdir/b', 'b\n'),
+ 'groupdir2/linkb': ('groupdir/linkb', 'b'),
},
}
for rev in repo:
diff --git a/tests/test_push_command.py b/tests/test_push_command.py
index 47ecb24..a554639 100644
--- a/tests/test_push_command.py
+++ b/tests/test_push_command.py
@@ -373,7 +373,7 @@ class PushTests(test_util.TestBase):
def test_delete_file(self):
repo = self.repo
def file_callback(repo, memctx, path):
- raise IOError(errno.ENOENT, '%s is deleted' % path)
+ return compathacks.filectxfn_deleted(memctx, path)
old_files = set(repo['default'].manifest().keys())
ctx = context.memctx(repo,
(repo['default'].node(), node.nullid),
@@ -552,7 +552,7 @@ class PushTests(test_util.TestBase):
copied=False)
ctx = context.memctx(repo,
(repo['default'].node(), node.nullid),
- 'message',
+ 'mutate already-special file alpha',
['alpha', ],
file_callback2,
'author',
@@ -577,7 +577,7 @@ class PushTests(test_util.TestBase):
copied=False)
ctx = context.memctx(repo,
(repo['default'].node(), node.nullid),
- 'message',
+ 'convert alpha back to regular file',
['alpha', ],
file_callback3,
'author',
@@ -754,3 +754,20 @@ class PushTests(test_util.TestBase):
self.assertEqual(tip['adding_file'].data(), 'fooFirstFile')
self.assertEqual(tip['newdir/new_file'].data(), 'fooNewFile')
self.assertEqual(tip.branch(), 'default')
+
+ def test_update_after_push(self):
+ repo = self.repo
+ ui = repo.ui
+
+ ui.setconfig('hooks',
+ 'debug-hgsubversion-between-push-and-pull-for-tests',
+ lambda ui, repo, hooktype: self.add_svn_rev(
+ self.repo_path,
+ {'trunk/racey_file': 'race conditions suck'}))
+
+ self.test_push_to_branch(push=False)
+ commands.push(ui, repo)
+ newctx = self.repo['.']
+ self.assertNotEqual(newctx.node(), self.repo['tip'].node())
+ self.assertEqual(newctx['adding_file'].data(), 'foo')
+ self.assertEqual(newctx.branch(), 'the_branch')
diff --git a/tests/test_tags.py b/tests/test_tags.py
index c879a90..d4ca003 100644
--- a/tests/test_tags.py
+++ b/tests/test_tags.py
@@ -175,6 +175,8 @@ rename a tag
repo = self._load_fixture_and_fetch('tag_name_same_as_branch.svndump')
tm = os.path.join(repo.path, 'svn', 'tagmap')
open(tm, 'w').write('1\n')
+ # force tags to load since it is lazily loaded when needed
+ repo.svnmeta().tags
commands.pull(repo.ui, repo)
self.assertEqual(open(tm).read().splitlines()[0], '2')
diff --git a/tests/test_util.py b/tests/test_util.py
index c2aae42..7ad8833 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -24,7 +24,7 @@ from mercurial import i18n
from mercurial import node
from mercurial import scmutil
from mercurial import ui
-from mercurial import util
+from mercurial import util as hgutil
from mercurial import extensions
from hgsubversion import compathacks
@@ -108,6 +108,7 @@ subdir = {'truncatedhistory.svndump': '/project2',
'non_ascii_path_1.svndump': '/b\xC3\xB8b',
'non_ascii_path_2.svndump': '/b%C3%B8b',
'subdir_is_file_prefix.svndump': '/flaf',
+ 'renames_with_prefix.svndump': '/prefix',
}
# map defining the layouts of the fixtures we can use with custom layout
# these are really popular layouts, so I gave them names
@@ -138,6 +139,10 @@ custom = {
'old_trunk': 'branches/old_trunk',
},
'copies.svndump': trunk_only,
+ 'copyafterclose.svndump': {
+ 'default': 'trunk',
+ 'test': 'branches/test'
+ },
'copybeforeclose.svndump': {
'default': 'trunk',
'test': 'branches/test'
@@ -159,6 +164,10 @@ custom = {
'default': 'trunk',
'branch1': 'branches/branch1',
},
+ 'renames_with_prefix.svndump': {
+ 'default': 'trunk',
+ 'branch1': 'branches/branch1',
+ },
'replace_branch_with_branch.svndump': {
'default': 'trunk',
'branch1': 'branches/branch1',
@@ -445,9 +454,15 @@ class TestBase(unittest.TestCase):
self.oldenv = dict([(k, os.environ.get(k, None),) for k in
('LANG', 'LC_ALL', 'HGRCPATH',)])
- self.oldt = i18n.t
- os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
- i18n.t = gettext.translation('hg', i18n.localedir, fallback=True)
+ try:
+ self.oldugettext = i18n._ugettext # Mercurial >= 3.2
+ except AttributeError:
+ self.oldt = i18n.t
+ os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
+ i18n.t = gettext.translation('hg', i18n.localedir, fallback=True)
+ else:
+ os.environ['LANG'] = os.environ['LC_ALL'] = 'C'
+ i18n.setdatapath(hgutil.datapath)
self.oldwd = os.getcwd()
self.tmpdir = tempfile.mkdtemp(
@@ -494,7 +509,10 @@ class TestBase(unittest.TestCase):
del os.environ[var]
else:
os.environ[var] = val
- i18n.t = self.oldt
+ try:
+ i18n._ugettext = self.oldugettext # Mercurial >= 3.2
+ except AttributeError:
+ i18n.t = self.oldt
rmtree(self.tmpdir)
os.chdir(self.oldwd)
setattr(ui.ui, self.patch[0].func_name, self.patch[0])
@@ -658,8 +676,7 @@ class TestBase(unittest.TestCase):
def filectxfn(repo, memctx, path):
if path in removed:
- raise IOError(errno.ENOENT,
- "File \"%s\" no longer exists" % path)
+ return compathacks.filectxfn_deleted(memctx, path)
entry = [e for e in changes if path == e[1]][0]
source, dest, newdata = entry
if newdata is None: