##// END OF EJS Templates
tests: unify test-convert-bzr-treeroot
Matt Mackall -
r12517:cc8f1083 default
parent child Browse files
Show More
@@ -1,26 +1,33 b''
1 #!/bin/sh
2
3 . "$TESTDIR/bzr-definitions"
4 1
5 cat > treeset.py <<EOF
6 import sys
7 from bzrlib import workingtree
8 wt = workingtree.WorkingTree.open('.')
2 $ . "$TESTDIR/bzr-definitions"
3 $ cat > treeset.py <<EOF
4 > import sys
5 > from bzrlib import workingtree
6 > wt = workingtree.WorkingTree.open('.')
7 >
8 > message, rootid = sys.argv[1:]
9 > wt.set_root_id('tree_root-%s' % rootid)
10 > wt.commit(message)
11 > EOF
12
13 change the id of the tree root
9 14
10 message, rootid = sys.argv[1:]
11 wt.set_root_id('tree_root-%s' % rootid)
12 wt.commit(message)
13 EOF
14
15 echo % change the id of the tree root
16 mkdir test-change-treeroot-id
17 cd test-change-treeroot-id
18 bzr init -q source
19 cd source
20 echo content > file
21 bzr add -q file
22 bzr commit -q -m 'Initial add'
23 python ../../treeset.py 'Changed root' new
24 cd ..
25 hg convert source source-hg
26 manifest source-hg tip
15 $ mkdir test-change-treeroot-id
16 $ cd test-change-treeroot-id
17 $ bzr init -q source
18 $ cd source
19 $ echo content > file
20 $ bzr add -q file
21 $ bzr commit -q -m 'Initial add'
22 $ python ../../treeset.py 'Changed root' new
23 $ cd ..
24 $ hg convert source source-hg
25 initializing destination source-hg repository
26 scanning source...
27 sorting...
28 converting...
29 1 Initial add
30 0 Changed root
31 $ manifest source-hg tip
32 % manifest of tip
33 644 file
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now