changeset 9326:b236f34ec1e9

Fix failing darcs test
author Bryan O'Sullivan <bos@serpentine.com>
date Thu, 06 Aug 2009 21:35:25 -0700
parents 19d07553d1b2
children 9a69ab6d7cf7
files tests/hghave tests/test-convert-darcs tests/test-convert-darcs.out
diffstat 3 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/tests/hghave	Wed Aug 05 22:52:35 2009 -0700
+++ b/tests/hghave	Thu Aug 06 21:35:25 2009 -0700
@@ -51,7 +51,7 @@
     return matchoutput('cvsps -h -q 2>&1', r'cvsps version', True)
 
 def has_darcs():
-    return matchoutput('darcs', r'darcs version', True)
+    return matchoutput('darcs --version', r'2\.[2-9]', True)
 
 def has_mtn():
     return matchoutput('mtn --version', r'monotone', True) and not matchoutput(
--- a/tests/test-convert-darcs	Wed Aug 05 22:52:35 2009 -0700
+++ b/tests/test-convert-darcs	Thu Aug 06 21:35:25 2009 -0700
@@ -1,19 +1,13 @@
 #!/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
 
 echo "[extensions]" >> $HGRCPATH
 echo "convert=" >> $HGRCPATH
 echo 'hgext.graphlog =' >> $HGRCPATH
 
 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
-HOME=do_not_use_HOME_darcs; export HOME
+HOME=`pwd`/do_not_use_HOME_darcs; export HOME
 
 # skip if we can't import elementtree
 mkdir dummy
@@ -47,6 +41,7 @@
 
 echo % merge branch
 darcs pull -a ../darcs-clone
+sleep 1
 echo e > a
 darcs record -a -l -m p2
 cd ..
@@ -56,7 +51,7 @@
     hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
 }
 
-hg convert darcs-repo darcs-repo-hg 2>&1 | grep -v hGetLine | grep -v '^$'
+hg convert darcs-repo darcs-repo-hg
 # The converter does not currently handle patch conflicts very well.
 # When they occur, it reverts *all* changes and moves forward,
 # letting the conflict resolving patch fix collisions.
--- a/tests/test-convert-darcs.out	Wed Aug 05 22:52:35 2009 -0700
+++ b/tests/test-convert-darcs.out	Thu Aug 06 21:35:25 2009 -0700
@@ -5,6 +5,7 @@
 % update source
 Finished recording patch 'p1.2'
 % merge branch
+Backing up ./a(-darcs-backup0)
 We have conflicts in the following files:
 ./a
 Finished pulling and applying.