Mercurial > hg
comparison tests/test-convert-bzr-treeroot.t @ 12517:cc8f1083e8be
tests: unify test-convert-bzr-treeroot
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Sep 2010 14:37:47 -0500 |
parents | tests/test-convert-bzr-treeroot@9e6d6568bf7a |
children | f2719b387380 |
comparison
equal
deleted
inserted
replaced
12516:90efbd1a2a56 | 12517:cc8f1083e8be |
---|---|
1 | |
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 | |
14 | |
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 |