| 1 |
#require bzr |
| 2 |
|
| 3 |
$ . "$TESTDIR/bzr-definitions" |
| 4 |
$ cat > treeset.py <<EOF |
| 5 |
> import sys |
| 6 |
> from breezy import workingtree |
| 7 |
> import breezy.bzr.bzrdir |
| 8 |
> wt = workingtree.WorkingTree.open('.') |
| 9 |
> |
| 10 |
> message, rootid = sys.argv[1:] |
| 11 |
> wt.set_root_id(b'tree_root-%s' % rootid.encode()) |
| 12 |
> wt.commit(message) |
| 13 |
> EOF |
| 14 |
|
| 15 |
change the id of the tree root |
| 16 |
|
| 17 |
$ mkdir test-change-treeroot-id |
| 18 |
$ cd test-change-treeroot-id |
| 19 |
$ brz init -q source |
| 20 |
$ cd source |
| 21 |
$ echo content > file |
| 22 |
$ brz add -q file |
| 23 |
$ brz commit -q -m 'Initial add' |
| 24 |
$ "$PYTHON" ../../treeset.py 'Changed root' new |
| 25 |
$ cd .. |
| 26 |
$ hg convert source source-hg |
| 27 |
initializing destination source-hg repository |
| 28 |
scanning source... |
| 29 |
sorting... |
| 30 |
converting... |
| 31 |
1 Initial add |
| 32 |
0 Changed root |
| 33 |
$ manifest source-hg tip |
| 34 |
% manifest of tip |
| 35 |
644 file |
| 36 |
|
| 37 |
$ cd .. |