darcs test fails

Gilles Moris gilles.moris at free.fr
Thu Aug 6 02:28:54 CDT 2009


Hello,

First, let me say I have no knowledge of convert and darcs. I am mainly
interested in a clean test suite.

I run a FC8 which embeds darcs 1.0.9 and test-convert-darcs was just running
without problems. But since 6fd3f795e908 [1], this test fails because convert
now requires darcs version >= 2.1.
I first thought to a trivial patch, but test-convert-darcs starts by requiring
darcs version < 2.x [2]. And if I remove this limitation, the test fails
with darcs 2.2.0 [3].

So there is an inconsistency here. Not sure what should be done.

Regards.
Gilles.


[1]
diff --git a/hgext/convert/darcs.py b/hgext/convert/darcs.py
--- a/hgext/convert/darcs.py
+++ b/hgext/convert/darcs.py
@@ -36,6 +36,10 @@
             raise NoRepo("%s does not look like a darcs repo" % path)

         checktool('darcs')
+        version = self.run0('--version').splitlines()[0].strip()
+        if version < '2.1':
+            raise util.Abort(_('darcs version 2.1 or newer needed (found %r)') %
+                             version)

         if ElementTree is None:
             raise util.Abort(_("Python ElementTree module is not available"))

[2]
diff --git a/tests/test-convert-darcs b/tests/test-convert-darcs
--- a/tests/test-convert-darcs
+++ b/tests/test-convert-darcs
@@ -1,6 +1,12 @@
 #!/bin/sh

 "$TESTDIR/hghave" darcs || exit 80
+if darcs --version 2>&1 | grep '^2\.' > /dev/null; then
+    # FIXME: darcs 2 will fail with
+    ### Abort: timeout after 180 seconds.
+    echo 'skipped: test currently disabled for darcs 2'
+    exit 80
+fi

[3]
ERROR: test-convert-darcs output changed
--- Expected output
+++ Test output
@@ -5,8 +5,10 @@
 % update source
 Finished recording patch 'p1.2'
 % merge branch
+Backing up ./a(-darcs-backup0)
 We have conflicts in the following files:
 ./a
+Backing up ./do_not_use_HOME_darcs(-darcs-backup0)
 Finished pulling and applying.
 Finished recording patch 'p2'
 initializing destination darcs-repo-hg repository
@@ -17,13 +19,16 @@
 2 p1.2
 1 p1.1
 0 p2
-o  3 "p2" files: a
+o  3 "p2" files:
 |
-o  2 "p1.1" files:
+o  2 "p1.1" files: do_not_use_HOME_darcs/.darcs/cache/patches/0000000111-779deaaea408f673ba520edaff1412118055ad0f8ac97703b7685b99196591c3 do_not_use_HOME_darcs/.darcs/cache/pristine.hashed/0000000002-87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7 do_not_use_HOME_darcs/.darcs/cache/pristine.hashed/0000000084-0c9c62270373555a1e67b474d6c9dd33cfd5ad95067f01b9da6fd18809bd8810
 |
 o  1 "p1.2" files: a b
 |
 o  0 "p0" files: a

-7225b30cdf38257d5cc7780772c051b6f33e6d6b 644   a
+b6d7ec209a65c0afe68d5b7b14b68848981fd7fa 644   a
 1e88685f5ddec574a34c70af492f95b6debc8741 644   b
+0b6b5fdf470f9cb8c6c51b5a61023a02479fbc3f 644   do_not_use_HOME_darcs/.darcs/cache/patches/0000000111-779deaaea408f673ba520edaff1412118055ad0f8ac97703b7685b99196591c3
+e64817f79247ca63ff508eba14c8c21348cf6768 644   do_not_use_HOME_darcs/.darcs/cache/pristine.hashed/0000000002-87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7
+d8dcae502ed51d0d608e68f939834356bb7b32ad 644   do_not_use_HOME_darcs/.darcs/cache/pristine.hashed/0000000084-0c9c62270373555a1e67b474d6c9dd33cfd5ad95067f01b9da6fd18809bd8810
!
Failed test-convert-darcs: output changed


More information about the Mercurial-devel mailing list