Mercurial > hg
annotate tests/test-convert-bzr-treeroot @ 9513:ae88c721f916
cmdutil: service: add an optional runargs argument to pass the command to run
This would be necessary for inotify launching its server: the initial command
is a standard 'hg st'/'hg ci'/... but the daemon to run is 'hg inserve'
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sun, 16 Aug 2009 11:30:24 +0900 |
parents | 9e6d6568bf7a |
children |
rev | line source |
---|---|
7053 | 1 #!/bin/sh |
2 | |
7058
9e6d6568bf7a
`source` doesn't work for some /bin/sh, use `.` instead
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
7053
diff
changeset
|
3 . "$TESTDIR/bzr-definitions" |
7053 | 4 |
5 cat > treeset.py <<EOF | |
6 import sys | |
7 from bzrlib import workingtree | |
8 wt = workingtree.WorkingTree.open('.') | |
9 | |
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 |