changeset 130:c2a84d436202

test_fetch_rename: test content of files coming from the past
author Patrick Mezard <pmezard@gmail.com>
date Wed, 10 Dec 2008 11:03:22 -0600
parents 59f8603a6641
children 4d42dbbb5127
files tests/fixtures/renames.sh tests/fixtures/renames.svndump tests/test_fetch_renames.py
diffstat 3 files changed, 33 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/tests/fixtures/renames.sh
+++ b/tests/fixtures/renames.sh
@@ -87,6 +87,10 @@ 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
+# Harder, copy from the past before change and change it again
+# This confused the stupid diff path
+svn cp $svnurl/trunk/changed@2 changed3
+echo changed3 >> changed3
 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
--- a/tests/fixtures/renames.svndump
+++ b/tests/fixtures/renames.svndump
@@ -1,6 +1,6 @@
 SVN-fs-dump-format-version: 2
 
-UUID: 5bdf7fc6-44b3-4b30-aeea-f6314d371318
+UUID: 113560bd-ec36-42a6-acef-e4688a33b129
 
 Revision-number: 0
 Prop-content-length: 56
@@ -9,7 +9,7 @@ Content-length: 56
 K 8
 svn:date
 V 27
-2008-11-04T12:22:31.270639Z
+2008-12-05T22:48:38.139917Z
 PROPS-END
 
 Revision-number: 1
@@ -27,7 +27,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:31.366894Z
+2008-12-05T22:48:38.525864Z
 PROPS-END
 
 Node-path: branches
@@ -63,7 +63,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:32.285042Z
+2008-12-05T22:48:39.313010Z
 PROPS-END
 
 Node-path: trunk/a
@@ -279,7 +279,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:33.209059Z
+2008-12-05T22:48:40.224632Z
 PROPS-END
 
 Node-path: trunk/changed
@@ -338,7 +338,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:35.187557Z
+2008-12-05T22:48:42.184704Z
 PROPS-END
 
 Node-path: branches/branch1
@@ -459,7 +459,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:36.173340Z
+2008-12-05T22:48:43.175723Z
 PROPS-END
 
 Node-path: branches/branch1/c
@@ -489,7 +489,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:43.200262Z
+2008-12-05T22:48:50.200094Z
 PROPS-END
 
 Node-path: branches/branch1/c1
@@ -628,7 +628,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:45.148291Z
+2008-12-05T22:48:52.154125Z
 PROPS-END
 
 Node-path: trunk/c
@@ -662,7 +662,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:48.155393Z
+2008-12-05T22:48:55.160439Z
 PROPS-END
 
 Node-path: trunk/deleteddir
@@ -695,7 +695,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:51.155926Z
+2008-12-05T22:48:59.163460Z
 PROPS-END
 
 Node-path: trunk/changed2
@@ -706,6 +706,20 @@ Node-copyfrom-path: trunk/changed
 Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
 
 
+Node-path: trunk/changed3
+Node-kind: file
+Node-action: add
+Node-copyfrom-rev: 2
+Node-copyfrom-path: trunk/changed
+Text-copy-source-md5: ec1bebaea2c042beb68f7679ddd106a4
+Text-content-length: 17
+Text-content-md5: 7d93e8c4d61c2a7b05c20b7d8bf11f83
+Content-length: 17
+
+changed
+changed3
+
+
 Node-path: trunk/changeddir2
 Node-kind: dir
 Node-action: add
@@ -728,7 +742,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:54.156623Z
+2008-12-05T22:49:02.160163Z
 PROPS-END
 
 Node-path: trunk/unchanged2
@@ -761,7 +775,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-11-04T12:22:56.152302Z
+2008-12-05T22:49:04.157303Z
 PROPS-END
 
 Node-path: trunk/groupdir2
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -53,6 +53,8 @@ class TestFetchRenames(test_util.TestBas
                 self.assertEqual(cp[0], copymap[f][0])
                 self.assertEqual(ctx[f].data(), copymap[f][1])
 
+        self.assertEqual(repo['tip']['changed3'].data(), 'changed\nchanged3\n')
+
     def test_rename(self):
         self._test_rename(False)