]> thyrsus.com Git - src.git/commitdiff
More fast-export repair, annd a tighter regression test.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 2014 03:33:31 +0000 (22:33 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 2014 03:33:31 +0000 (22:33 -0500)
TODO
src
srctest

diff --git a/TODO b/TODO
index f62e367e0ae447beb1f89be78b5880cd7b113052..e4420353c320cdf28be483b63283bd5acabd1a09 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,7 +8,7 @@
 
 * get rid of add
 
-* Should branch_delete really obsolese branched or just mark them dead?
+* Should branch_delete really obsolesce branched or just mark them dead?
 
                        BUGS
 
diff --git a/src b/src
index 257f9e19a34241de0eceb279eddac5f384001c96..831ababb35fc7b5e27a36fc6f065a8beed168a74 100755 (executable)
--- a/src
+++ b/src
@@ -853,7 +853,8 @@ def fast_export_method(*args):
                 # FIXME: Sanitize branch names.
                 # FIXME: Make this canonical even with tags
                 branch = arg + "master"
-            for item in metadata:
+            for i in range(ctx.start, ctx.end+1):
+                item = metadata.by_revno(i)
                 scratchfile = "/tmp/src%dtmp" % os.getpid()
                 backend.cat(arg, item.revision, scratchfile)
                 size = os.path.getsize(scratchfile)
diff --git a/srctest b/srctest
index 9c127f14b86493eecac8c662282d52039da707ff..e0e943edb5aa26acf25d6b2f0326b800cd041bcb 100755 (executable)
--- a/srctest
+++ b/srctest
@@ -168,7 +168,7 @@ diff testfile12 testfile13
 check "tag list check after deletion"
 
 # Alas, we have to do this or the fast-export regression will fail.
-# We don't know how to be perfectly canonical about tags let.
+# We don't know how to be perfectly canonical about tags yet.
 src $TESTOPTS tag delete basetag
 check "tag deletion: basetag"
 
@@ -180,6 +180,12 @@ diff -u testfile14 testfile15
 check "fast-export"
 rm -fr $SANDBOX/foo
 
+# There was a point at which fast-export was broken,
+# but the test was passing because an empty file
+# produced a repo that git dumped as an emoty file!  
+grep jrh testfile15 >/dev/null
+check "fast-export content check"
+
 src $TESTOPTS rename testfile1 newname1
 check "move command"
 if [ -e newname1 -a -e $SANDBOX/newname1,v ]