tests/test-convert-bzr-ghosts
changeset 7053 209ef5f3534c
child 7058 9e6d6568bf7a
equal deleted inserted replaced
7052:0ca4f42daed7 7053:209ef5f3534c
       
     1 #!/bin/sh
       
     2 
       
     3 source "$TESTDIR/bzr-definitions"
       
     4 
       
     5 cat > ghostcreator.py <<EOF
       
     6 import sys
       
     7 from bzrlib import workingtree
       
     8 wt = workingtree.WorkingTree.open('.')
       
     9 
       
    10 message, ghostrev = sys.argv[1:]
       
    11 wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
       
    12 wt.commit(message)
       
    13 EOF
       
    14 
       
    15 echo % ghost revisions
       
    16 mkdir test-ghost-revisions
       
    17 cd test-ghost-revisions
       
    18 bzr init -q source
       
    19 cd source
       
    20 echo content > somefile
       
    21 bzr add -q somefile
       
    22 bzr commit -q -m 'Initial layout setup'
       
    23 echo morecontent >> somefile
       
    24 python ../../ghostcreator.py 'Commit with ghost revision' ghostrev
       
    25 cd ..
       
    26 hg convert source source-hg
       
    27 glog -R source-hg