##// END OF EJS Templates
tests: unify test-convert-bzr-ghosts
Matt Mackall -
r12515:b6a784e3 default
parent child Browse files
Show More
@@ -1,27 +1,36 b''
1 #!/bin/sh
2
3 . "$TESTDIR/bzr-definitions"
4
1
5 cat > ghostcreator.py <<EOF
2 $ . "$TESTDIR/bzr-definitions"
6 import sys
3 $ cat > ghostcreator.py <<EOF
7 from bzrlib import workingtree
4 > import sys
8 wt = workingtree.WorkingTree.open('.')
5 > from bzrlib import workingtree
6 > wt = workingtree.WorkingTree.open('.')
7 >
8 > message, ghostrev = sys.argv[1:]
9 > wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
10 > wt.commit(message)
11 > EOF
9
12
10 message, ghostrev = sys.argv[1:]
13 ghost revisions
11 wt.set_parent_ids(wt.get_parent_ids() + [ghostrev])
12 wt.commit(message)
13 EOF
14
14
15 echo % ghost revisions
15 $ mkdir test-ghost-revisions
16 mkdir test-ghost-revisions
16 $ cd test-ghost-revisions
17 cd test-ghost-revisions
17 $ bzr init -q source
18 bzr init -q source
18 $ cd source
19 cd source
19 $ echo content > somefile
20 echo content > somefile
20 $ bzr add -q somefile
21 bzr add -q somefile
21 $ bzr commit -q -m 'Initial layout setup'
22 bzr commit -q -m 'Initial layout setup'
22 $ echo morecontent >> somefile
23 echo morecontent >> somefile
23 $ python ../../ghostcreator.py 'Commit with ghost revision' ghostrev
24 python ../../ghostcreator.py 'Commit with ghost revision' ghostrev
24 $ cd ..
25 cd ..
25 $ hg convert source source-hg
26 hg convert source source-hg
26 initializing destination source-hg repository
27 glog -R source-hg
27 scanning source...
28 sorting...
29 converting...
30 1 Initial layout setup
31 0 Commit with ghost revision
32 $ glog -R source-hg
33 o 1 "Commit with ghost revision" files: somefile
34 |
35 o 0 "Initial layout setup" files: somefile
36
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now