tests/test-convert-hg-sink
changeset 12525 81bf25ddd76a
parent 12524 8773cac3a455
child 12526 9892949bd969
equal deleted inserted replaced
12524:8773cac3a455 12525:81bf25ddd76a
     1 #!/bin/sh
       
     2 
       
     3 cat >> $HGRCPATH <<EOF
       
     4 [extensions]
       
     5 convert=
       
     6 [convert]
       
     7 hg.saverev=False
       
     8 EOF
       
     9 
       
    10 hg init orig
       
    11 cd orig
       
    12 echo foo > foo
       
    13 echo bar > bar
       
    14 hg ci -qAm 'add foo and bar'
       
    15 
       
    16 hg rm foo
       
    17 hg ci -m 'remove foo'
       
    18 
       
    19 mkdir foo
       
    20 echo file > foo/file
       
    21 hg ci -qAm 'add foo/file'
       
    22 
       
    23 hg tag some-tag
       
    24 
       
    25 hg log
       
    26 cd ..
       
    27 
       
    28 hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
       
    29 cd new
       
    30 hg out ../orig
       
    31 
       
    32 echo '% dirstate should be empty:'
       
    33 hg debugstate
       
    34 hg parents -q
       
    35 
       
    36 hg up -C
       
    37 hg copy bar baz
       
    38 echo '% put something in the dirstate:'
       
    39 hg debugstate > debugstate
       
    40 grep baz debugstate
       
    41 
       
    42 echo '% add a new revision in the original repo'
       
    43 cd ../orig
       
    44 echo baz > baz
       
    45 hg ci -qAm 'add baz'
       
    46 
       
    47 cd ..
       
    48 hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
       
    49 cd new
       
    50 hg out ../orig
       
    51 echo '% dirstate should be the same (no output below):'
       
    52 hg debugstate > new-debugstate
       
    53 diff debugstate new-debugstate
       
    54 
       
    55 echo '% no copies'
       
    56 hg up -C
       
    57 hg debugrename baz
       
    58 cd ..
       
    59 
       
    60 echo '% test tag rewriting'
       
    61 cat > filemap <<EOF
       
    62 exclude foo
       
    63 EOF
       
    64 hg convert --filemap filemap orig new-filemap 2>&1 | grep -v 'subversion python bindings could not be loaded'
       
    65 cd new-filemap
       
    66 hg tags
       
    67 cd ..