changeset 11124:55abde5cba43 stable

test-convert-svn-move: test moved dirs copy records
author Patrick Mezard <pmezard@gmail.com>
date Sun, 09 May 2010 19:11:02 +0200
parents 8dd69bee71da
children 7a5a98fc38e9
files tests/svn/move.svndump tests/svn/svndump-move.sh tests/test-convert-svn-move tests/test-convert-svn-move.out
diffstat 4 files changed, 121 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/tests/svn/move.svndump	Sat May 01 16:29:27 2010 +0200
+++ b/tests/svn/move.svndump	Sun May 09 19:11:02 2010 +0200
@@ -1,6 +1,6 @@
 SVN-fs-dump-format-version: 2
 
-UUID: 9de99ecc-876b-46e5-bc59-bff9b2b58b1e
+UUID: 7d15f7c2-5863-4c16-aa2a-3418b1721d3a
 
 Revision-number: 0
 Prop-content-length: 56
@@ -9,7 +9,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:26.678698Z
+2010-05-09T13:02:37.336239Z
 PROPS-END
 
 Revision-number: 1
@@ -27,7 +27,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:27.278689Z
+2010-05-09T13:02:37.372834Z
 PROPS-END
 
 Node-path: trunk
@@ -124,7 +124,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:28.312955Z
+2010-05-09T13:02:38.049068Z
 PROPS-END
 
 Node-path: trunk/a
@@ -166,7 +166,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:29.183467Z
+2010-05-09T13:02:39.044479Z
 PROPS-END
 
 Node-path: subproject
@@ -195,7 +195,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:30.300975Z
+2010-05-09T13:02:40.057804Z
 PROPS-END
 
 Node-path: subproject/trunk
@@ -222,7 +222,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:31.354398Z
+2010-05-09T13:02:41.058871Z
 PROPS-END
 
 Node-path: subproject/branches
@@ -249,7 +249,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:32.121901Z
+2010-05-09T13:02:42.046689Z
 PROPS-END
 
 Node-path: subproject/trunk/d1
@@ -278,7 +278,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:32.317815Z
+2010-05-09T13:02:42.071413Z
 PROPS-END
 
 Node-path: subproject/trunk/d2
@@ -307,7 +307,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:33.418320Z
+2010-05-09T13:02:43.062018Z
 PROPS-END
 
 Node-path: subproject/trunk/d1/b
@@ -341,7 +341,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:34.126542Z
+2010-05-09T13:02:44.047997Z
 PROPS-END
 
 Node-path: subproject/branches/d1
@@ -370,7 +370,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:34.436015Z
+2010-05-09T13:02:44.086619Z
 PROPS-END
 
 Node-path: subproject/trunk/d
@@ -397,7 +397,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:34.803189Z
+2010-05-09T13:02:44.111550Z
 PROPS-END
 
 Node-path: subproject/trunk/d2
@@ -422,7 +422,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:36.531735Z
+2010-05-09T13:02:45.067982Z
 PROPS-END
 
 Node-path: subproject/trunk/d3
@@ -484,7 +484,7 @@
 K 8
 svn:date
 V 27
-2009-06-21T14:32:38.281829Z
+2010-05-09T13:02:47.061259Z
 PROPS-END
 
 Node-path: subproject/trunk/d3/d31
@@ -498,3 +498,72 @@
 Node-copyfrom-path: subproject/trunk/d3
 
 
+Revision-number: 14
+Prop-content-length: 110
+Content-length: 110
+
+K 7
+svn:log
+V 9
+add d4old
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2010-05-09T13:02:49.063363Z
+PROPS-END
+
+Node-path: subproject/trunk/d4old
+Node-kind: dir
+Node-action: add
+Prop-content-length: 10
+Content-length: 10
+
+PROPS-END
+
+
+Node-path: subproject/trunk/d4old/g
+Node-kind: file
+Node-action: add
+Prop-content-length: 10
+Text-content-length: 2
+Text-content-md5: f5302386464f953ed581edac03556e55
+Text-content-sha1: a5938ace3f424be1a26904781cdb06d55b614e6b
+Content-length: 12
+
+PROPS-END
+g
+
+
+Revision-number: 15
+Prop-content-length: 125
+Content-length: 125
+
+K 7
+svn:log
+V 23
+rename d4old into d4new
+K 10
+svn:author
+V 7
+pmezard
+K 8
+svn:date
+V 27
+2010-05-09T13:02:51.047304Z
+PROPS-END
+
+Node-path: subproject/trunk/d4new
+Node-kind: dir
+Node-action: add
+Node-copyfrom-rev: 14
+Node-copyfrom-path: subproject/trunk/d4old
+
+
+Node-path: subproject/trunk/d4old
+Node-action: delete
+
+
--- a/tests/svn/svndump-move.sh	Sat May 01 16:29:27 2010 +0200
+++ b/tests/svn/svndump-move.sh	Sun May 09 19:11:02 2010 +0200
@@ -68,6 +68,16 @@
 svn copy subproject/trunk/d3 subproject/trunk/d4
 svn rm subproject/trunk/d3/d31
 svn ci -m "copy dir and remove subdir"
+
+# Test directory moves
+svn up
+mkdir -p subproject/trunk/d4old
+echo g > subproject/trunk/d4old/g
+svn add subproject/trunk/d4old
+svn ci -m "add d4old"
+svn mv subproject/trunk/d4old subproject/trunk/d4new
+svn ci -m "rename d4old into d4new"
+
 cd ..
 
 svnadmin dump svn-repo > ../move.svndump
\ No newline at end of file
--- a/tests/test-convert-svn-move	Sat May 01 16:29:27 2010 +0200
+++ b/tests/test-convert-svn-move	Sun May 09 19:11:02 2010 +0200
@@ -28,5 +28,8 @@
 
 cd A-hg
 hg glog --template '{rev} {desc|firstline} files: {files}\n'
+echo '% check move copy records'
+hg st --rev 12:13 --copies
+echo '% check branches'
 hg branches | sed 's/:.*/:/'
 cd ..
--- a/tests/test-convert-svn-move.out	Sat May 01 16:29:27 2010 +0200
+++ b/tests/test-convert-svn-move.out	Sun May 09 19:11:02 2010 +0200
@@ -3,18 +3,24 @@
 scanning source...
 sorting...
 converting...
-11 createtrunk
-10 moved1
-9 moved1
-8 moved2
-7 changeb and rm d2
-6 changeb and rm d2
-5 moved1again
-4 moved1again
-3 copyfilefrompast
-2 copydirfrompast
-1 add d3
-0 copy dir and remove subdir
+13 createtrunk
+12 moved1
+11 moved1
+10 moved2
+9 changeb and rm d2
+8 changeb and rm d2
+7 moved1again
+6 moved1again
+5 copyfilefrompast
+4 copydirfrompast
+3 add d3
+2 copy dir and remove subdir
+1 add d4old
+0 rename d4old into d4new
+o  13 rename d4old into d4new files: d4new/g d4old/g
+|
+o  12 add d4old files: d4old/g
+|
 o  11 copy dir and remove subdir files: d3/d31/e d4/d31/e d4/f
 |
 o  10 add d3 files: d3/d31/e d3/f
@@ -39,5 +45,10 @@
 |
 o  0 createtrunk files:
 
-default                       11:
+% check move copy records
+A d4new/g
+  d4old/g
+R d4old/g
+% check branches
+default                       13:
 d1                             6: