tests/test-convert-darcs
changeset 9525 2299c421a98e
parent 8523 5b7da468531b
child 9526 457a30ed8ffb
equal deleted inserted replaced
9495:b2d65ee49a72 9525:2299c421a98e
     1 #!/bin/sh
     1 #!/bin/sh
     2 
     2 
     3 "$TESTDIR/hghave" darcs || exit 80
     3 "$TESTDIR/hghave" darcs || exit 80
     4 if darcs --version 2>&1 | grep '^2\.' > /dev/null; then
       
     5     # FIXME: darcs 2 will fail with
       
     6     ### Abort: timeout after 180 seconds.
       
     7     echo 'skipped: test currently disabled for darcs 2'
       
     8     exit 80
       
     9 fi
       
    10 
     4 
    11 echo "[extensions]" >> $HGRCPATH
     5 echo "[extensions]" >> $HGRCPATH
    12 echo "convert=" >> $HGRCPATH
     6 echo "convert=" >> $HGRCPATH
    13 echo 'hgext.graphlog =' >> $HGRCPATH
     7 echo 'hgext.graphlog =' >> $HGRCPATH
    14 
     8 
    15 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
     9 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
    16 HOME=do_not_use_HOME_darcs; export HOME
    10 HOME=`pwd`/do_not_use_HOME_darcs; export HOME
    17 
    11 
    18 # skip if we can't import elementtree
    12 # skip if we can't import elementtree
    19 mkdir dummy
    13 mkdir dummy
    20 mkdir dummy/_darcs
    14 mkdir dummy/_darcs
    21 if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
    15 if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then
    45 echo b > b
    39 echo b > b
    46 darcs record -a -l -m p1.2
    40 darcs record -a -l -m p1.2
    47 
    41 
    48 echo % merge branch
    42 echo % merge branch
    49 darcs pull -a ../darcs-clone
    43 darcs pull -a ../darcs-clone
       
    44 sleep 1
    50 echo e > a
    45 echo e > a
    51 darcs record -a -l -m p2
    46 darcs record -a -l -m p2
    52 cd ..
    47 cd ..
    53 
    48 
    54 glog()
    49 glog()
    55 {
    50 {
    56     hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
    51     hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
    57 }
    52 }
    58 
    53 
    59 hg convert darcs-repo darcs-repo-hg 2>&1 | grep -v hGetLine | grep -v '^$'
    54 hg convert darcs-repo darcs-repo-hg
    60 # The converter does not currently handle patch conflicts very well.
    55 # The converter does not currently handle patch conflicts very well.
    61 # When they occur, it reverts *all* changes and moves forward,
    56 # When they occur, it reverts *all* changes and moves forward,
    62 # letting the conflict resolving patch fix collisions.
    57 # letting the conflict resolving patch fix collisions.
    63 # Unfortunately, non-conflicting changes, like the addition of the
    58 # Unfortunately, non-conflicting changes, like the addition of the
    64 # "c" file in p1.1 patch are reverted too.
    59 # "c" file in p1.1 patch are reverted too.