changeset 183:1c46ad3f56aa

test_externals: test branch copy, use absolute externals
author Patrick Mezard <pmezard@gmail.com>
date Wed, 14 Jan 2009 23:17:12 -0600
parents 47d25d61abfa
children d3ea6c98a086
files tests/fixtures/externals.sh tests/fixtures/externals.svndump tests/test_externals.py
diffstat 3 files changed, 109 insertions(+), 47 deletions(-) [+]
line wrap: on
line diff
--- a/tests/fixtures/externals.sh
+++ b/tests/fixtures/externals.sh
@@ -31,32 +31,39 @@ cd ../trunk
 echo a > a
 svn add a
 cat > externals <<EOF
-../externals/project1 deps/project1
+^/externals/project1 deps/project1
 EOF
 svn propset -F externals svn:externals .
 svn ci -m "set externals on ."
 # Add another one
 cat > externals <<EOF
-../externals/project1 deps/project1
-../externals/project2 deps/project2
+^/externals/project1 deps/project1
+^/externals/project2 deps/project2
 EOF
 svn propset -F externals svn:externals .
 svn ci -m "update externals on ."
 # Suppress an external and add one on a subdir
 cat > externals <<EOF
-../externals/project2 deps/project2
+^/externals/project2 deps/project2
 EOF
 svn propset -F externals svn:externals .
 mkdir subdir
 mkdir subdir2
 svn add subdir subdir2
 cat > externals <<EOF
-../externals/project1 deps/project1
+^/externals/project1 deps/project1
 EOF
 svn propset -F externals svn:externals subdir subdir2
 svn ci -m "add on subdir"
+# Test branch with externals
+svn up
+cd ../branches
+svn copy ../trunk branch1
+svn propdel svn:externals branch1/subdir2
+svn ci -m 'externals in subtree'
+cd ../trunk
 # Suppress the subdirectory
-svn rm subdir
+svn rm --force subdir
 svn ci -m 'remove externals subdir'
 # Remove the property on subdir2
 svn propdel svn:externals subdir2
--- a/tests/fixtures/externals.svndump
+++ b/tests/fixtures/externals.svndump
@@ -1,6 +1,6 @@
 SVN-fs-dump-format-version: 2
 
-UUID: a5e66397-f826-4e1c-bc26-5123bb064477
+UUID: b0dd1dbb-3e41-4ee0-8194-38c44cae026b
 
 Revision-number: 0
 Prop-content-length: 56
@@ -9,7 +9,7 @@ Content-length: 56
 K 8
 svn:date
 V 27
-2008-12-27T12:49:06.601814Z
+2009-01-12T22:58:18.300869Z
 PROPS-END
 
 Revision-number: 1
@@ -27,7 +27,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:06.652695Z
+2009-01-12T22:58:18.364893Z
 PROPS-END
 
 Node-path: branches
@@ -72,7 +72,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:07.236694Z
+2009-01-12T22:58:19.228564Z
 PROPS-END
 
 Node-path: externals/project1
@@ -132,19 +132,19 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:08.250996Z
+2009-01-12T22:58:20.213824Z
 PROPS-END
 
 Node-path: trunk
 Node-kind: dir
 Node-action: change
-Prop-content-length: 71
-Content-length: 71
+Prop-content-length: 70
+Content-length: 70
 
 K 13
 svn:externals
-V 36
-../externals/project1 deps/project1
+V 35
+^/externals/project1 deps/project1
 
 PROPS-END
 
@@ -176,20 +176,20 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:09.190834Z
+2009-01-12T22:58:21.179341Z
 PROPS-END
 
 Node-path: trunk
 Node-kind: dir
 Node-action: change
-Prop-content-length: 107
-Content-length: 107
+Prop-content-length: 105
+Content-length: 105
 
 K 13
 svn:externals
-V 72
-../externals/project1 deps/project1
-../externals/project2 deps/project2
+V 70
+^/externals/project1 deps/project1
+^/externals/project2 deps/project2
 
 PROPS-END
 
@@ -209,19 +209,19 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:10.289216Z
+2009-01-12T22:58:22.266419Z
 PROPS-END
 
 Node-path: trunk
 Node-kind: dir
 Node-action: change
-Prop-content-length: 71
-Content-length: 71
+Prop-content-length: 70
+Content-length: 70
 
 K 13
 svn:externals
-V 36
-../externals/project2 deps/project2
+V 35
+^/externals/project2 deps/project2
 
 PROPS-END
 
@@ -229,13 +229,13 @@ PROPS-END
 Node-path: trunk/subdir
 Node-kind: dir
 Node-action: add
-Prop-content-length: 71
-Content-length: 71
+Prop-content-length: 70
+Content-length: 70
 
 K 13
 svn:externals
-V 36
-../externals/project1 deps/project1
+V 35
+^/externals/project1 deps/project1
 
 PROPS-END
 
@@ -243,18 +243,65 @@ PROPS-END
 Node-path: trunk/subdir2
 Node-kind: dir
 Node-action: add
-Prop-content-length: 71
-Content-length: 71
+Prop-content-length: 70
+Content-length: 70
 
 K 13
 svn:externals
-V 36
-../externals/project1 deps/project1
+V 35
+^/externals/project1 deps/project1
 
 PROPS-END
 
 
 Revision-number: 6
+Prop-content-length: 122
+Content-length: 122
+
+K 7
+svn:log
+V 20
+externals in subtree
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2009-01-12T22:58:25.185874Z
+PROPS-END
+
+Node-path: branches/branch1
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 5
+Node-copyfrom-path: trunk
+Prop-content-length: 94
+Content-length: 94
+
+K 13
+svn:externals
+V 35
+^/externals/project2 deps/project2
+
+K 13
+svn:mergeinfo
+V 0
+
+PROPS-END
+
+
+Node-path: branches/branch1/subdir2
+Node-kind: dir
+Node-action: change
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Revision-number: 7
 Prop-content-length: 125
 Content-length: 125
 
@@ -269,14 +316,14 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:11.184732Z
+2009-01-12T22:58:26.188417Z
 PROPS-END
 
 Node-path: trunk/subdir
 Node-action: delete
 
 
-Revision-number: 7
+Revision-number: 8
 Prop-content-length: 126
 Content-length: 126
 
@@ -291,7 +338,7 @@ pmezard
 K 8
 svn:date
 V 27
-2008-12-27T12:49:12.194114Z
+2009-01-12T22:58:27.183612Z
 PROPS-END
 
 Node-path: trunk/subdir2
--- a/tests/test_externals.py
+++ b/tests/test_externals.py
@@ -44,40 +44,48 @@ class TestFetchExternals(test_util.TestB
 
         ref0 = """\
 [.]
- ../externals/project1 deps/project1
+ ^/externals/project1 deps/project1
 """
         self.assertEqual(ref0, repo[0]['.hgsvnexternals'].data())
         ref1 = """\
 [.]
- ../externals/project1 deps/project1
- ../externals/project2 deps/project2
+ ^/externals/project1 deps/project1
+ ^/externals/project2 deps/project2
 """
         self.assertEqual(ref1, repo[1]['.hgsvnexternals'].data())
 
         ref2 = """\
 [.]
- ../externals/project2 deps/project2
+ ^/externals/project2 deps/project2
 [subdir]
- ../externals/project1 deps/project1
+ ^/externals/project1 deps/project1
 [subdir2]
- ../externals/project1 deps/project1
+ ^/externals/project1 deps/project1
 """
         self.assertEqual(ref2, repo[2]['.hgsvnexternals'].data())
 
         ref3 = """\
 [.]
- ../externals/project2 deps/project2
-[subdir2]
- ../externals/project1 deps/project1
+ ^/externals/project2 deps/project2
+[subdir]
+ ^/externals/project1 deps/project1
 """
         self.assertEqual(ref3, repo[3]['.hgsvnexternals'].data())
 
         ref4 = """\
 [.]
- ../externals/project2 deps/project2
+ ^/externals/project2 deps/project2
+[subdir2]
+ ^/externals/project1 deps/project1
 """
         self.assertEqual(ref4, repo[4]['.hgsvnexternals'].data())
 
+        ref5 = """\
+[.]
+ ^/externals/project2 deps/project2
+"""
+        self.assertEqual(ref5, repo[5]['.hgsvnexternals'].data())
+
     def test_externals_stupid(self):
         self.test_externals(True)