##// 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
2 $ . "$TESTDIR/bzr-definitions"
6 import sys
3 $ cat > treeset.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, 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:]
15 $ mkdir test-change-treeroot-id
11 wt.set_root_id('tree_root-%s' % rootid)
16 $ cd test-change-treeroot-id
12 wt.commit(message)
17 $ bzr init -q source
13 EOF
18 $ cd source
14
19 $ echo content > file
15 echo % change the id of the tree root
20 $ bzr add -q file
16 mkdir test-change-treeroot-id
21 $ bzr commit -q -m 'Initial add'
17 cd test-change-treeroot-id
22 $ python ../../treeset.py 'Changed root' new
18 bzr init -q source
23 $ cd ..
19 cd source
24 $ hg convert source source-hg
20 echo content > file
25 initializing destination source-hg repository
21 bzr add -q file
26 scanning source...
22 bzr commit -q -m 'Initial add'
27 sorting...
23 python ../../treeset.py 'Changed root' new
28 converting...
24 cd ..
29 1 Initial add
25 hg convert source source-hg
30 0 Changed root
26 manifest source-hg tip
31 $ manifest source-hg tip
32 % manifest of tip
33 644 file
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