changeset 68:e0c86ebe05e3

test_fetch_renames: test copy of deleted stuff from the past
author Patrick Mezard <pmezard@gmail.com>
date Wed, 05 Nov 2008 13:37:08 +0100
parents e319c9168910
children 63ece4ea25c9
files tests/fixtures/renames.sh tests/fixtures/renames.svndump tests/test_fetch_renames.py
diffstat 3 files changed, 118 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/tests/fixtures/renames.sh
+++ b/tests/fixtures/renames.sh
@@ -23,8 +23,14 @@ echo b > b
 mkdir -p da/db
 echo c > da/daf
 echo d > da/db/dbf
-svn add a b da
+echo deleted > deletedfile
+mkdir deleteddir
+echo deleteddir > deleteddir/f
+svn add a b da deletedfile deleteddir
 svn ci -m "add a and b"
+svn rm deletedfile
+svn rm deleteddir
+svn ci -m "delete files and dirs"
 cd ../branches
 svn cp ../trunk branch1
 svn ci -m "create branch1"
@@ -53,6 +59,10 @@ cd trunk
 # Copy across branch
 svn cp ../branches/branch1/c c
 svn ci -m "copy b from branch1"
+# Copy deleted stuff from the past
+svn cp $svnurl/trunk/deletedfile@2 deletedfile
+svn cp $svnurl/trunk/deleteddir@2 deleteddir
+svn ci -m "copy stuff from the past"
 cd ../..
 
 svnadmin dump testrepo > ../renames.svndump
--- a/tests/fixtures/renames.svndump
+++ b/tests/fixtures/renames.svndump
@@ -1,6 +1,6 @@
 SVN-fs-dump-format-version: 2
 
-UUID: 40be4ed3-2bdc-4296-b679-58ef9c475a1c
+UUID: 6ebabe06-44c1-4542-ad93-bd59fbe3743b
 
 Revision-number: 0
 Prop-content-length: 56
@@ -9,7 +9,7 @@ Content-length: 56
 K 8
 svn:date
 V 27
-2008-11-01T23:06:00.527827Z
+2008-11-02T10:33:21.311566Z
 PROPS-END
 
 Revision-number: 1
@@ -27,7 +27,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:00.567419Z
+2008-11-02T10:33:21.376729Z
 PROPS-END
 
 Node-path: branches
@@ -63,7 +63,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:01.198878Z
+2008-11-02T10:33:22.217406Z
 PROPS-END
 
 Node-path: trunk/a
@@ -132,7 +132,66 @@ PROPS-END
 d
 
 
+Node-path: trunk/deleteddir
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: trunk/deleteddir/f
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 11
+Text-content-md5: 49b72b575e26ecddb296dd59b24c3e67
+Content-length: 21
+
+PROPS-END
+deleteddir
+
+
+Node-path: trunk/deletedfile
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 8
+Text-content-md5: 4d742b2f247bec99b41a60acbebc149a
+Content-length: 18
+
+PROPS-END
+deleted
+
+
 Revision-number: 3
+Prop-content-length: 123
+Content-length: 123
+
+K 7
+svn:log
+V 21
+delete files and dirs
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2008-11-02T10:33:23.197795Z
+PROPS-END
+
+Node-path: trunk/deleteddir
+Node-action: delete
+
+
+Node-path: trunk/deletedfile
+Node-action: delete
+
+
+Revision-number: 4
 Prop-content-length: 116
 Content-length: 116
 
@@ -147,7 +206,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:03.155920Z
+2008-11-02T10:33:25.160163Z
 PROPS-END
 
 Node-path: branches/branch1
@@ -188,7 +247,7 @@ Node-copyfrom-rev: 2
 Node-copyfrom-path: trunk/da
 
 
-Revision-number: 4
+Revision-number: 5
 Prop-content-length: 106
 Content-length: 106
 
@@ -203,7 +262,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:04.170007Z
+2008-11-02T10:33:26.173058Z
 PROPS-END
 
 Node-path: branches/branch1/c
@@ -218,7 +277,7 @@ PROPS-END
 c
 
 
-Revision-number: 5
+Revision-number: 6
 Prop-content-length: 129
 Content-length: 129
 
@@ -233,13 +292,13 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:11.193779Z
+2008-11-02T10:33:33.195961Z
 PROPS-END
 
 Node-path: branches/branch1/c1
 Node-kind: file
 Node-action: add
-Node-copyfrom-rev: 4
+Node-copyfrom-rev: 5
 Node-copyfrom-path: branches/branch1/c
 Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
 Prop-content-length: 34
@@ -357,7 +416,7 @@ Node-path: trunk/da
 Node-action: delete
 
 
-Revision-number: 6
+Revision-number: 7
 Prop-content-length: 121
 Content-length: 121
 
@@ -372,13 +431,13 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-01T23:06:13.146723Z
+2008-11-02T10:33:35.147012Z
 PROPS-END
 
 Node-path: trunk/c
 Node-kind: file
 Node-action: add
-Node-copyfrom-rev: 4
+Node-copyfrom-rev: 5
 Node-copyfrom-path: branches/branch1/c
 Text-copy-source-md5: 2cd6ee2c70b0bde53fbe6cac3c8b8bb1
 Prop-content-length: 34
@@ -391,3 +450,36 @@ V 0
 PROPS-END
 
 
+Revision-number: 8
+Prop-content-length: 126
+Content-length: 126
+
+K 7
+svn:log
+V 24
+copy stuff from the past
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2008-11-02T10:33:38.154817Z
+PROPS-END
+
+Node-path: trunk/deleteddir
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/deleteddir
+
+
+Node-path: trunk/deletedfile
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/deletedfile
+Text-copy-source-md5: 4d742b2f247bec99b41a60acbebc149a
+
+
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -42,7 +42,7 @@ class TestFetchRenames(unittest.TestCase
 
         # Map revnum to mappings of dest name to (source name, dest content)
         copies = {
-            3: {
+            4: {
                 'a1': ('a', 'a\n'), 
                 'a2': ('a', 'a\n'),
                 'b1': ('b', 'b\nc\n'),
@@ -51,7 +51,7 @@ class TestFetchRenames(unittest.TestCase
                 'da2/daf': ('da/daf', 'c\n'),
                 'da2/db/dbf': ('da/db/dbf', 'd\n'),
                 },
-            4: {
+            5: {
                 'c1': ('c', 'c\nc\n'),
                 }
             }