Mercurial > hg
comparison tests/test-convert-clonebranches @ 5934:e495f3f35b2d
convert: hg.clonebranches must pull missing parents (issue941)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 26 Jan 2008 19:55:04 +0100 |
parents | |
children | 1fe6f365df2e |
comparison
equal
deleted
inserted
replaced
5920:5df7cb799baf | 5934:e495f3f35b2d |
---|---|
1 #!/bin/sh | |
2 | |
3 echo "[extensions]" >> $HGRCPATH | |
4 echo "hgext.convert = " >> $HGRCPATH | |
5 echo "[convert]" >> $HGRCPATH | |
6 echo "hg.tagsbranch=0" >> $HGRCPATH | |
7 | |
8 hg init source | |
9 cd source | |
10 echo a > a | |
11 hg ci -qAm adda | |
12 # Add a merge with one parent in the same branch | |
13 echo a >> a | |
14 hg ci -qAm changea | |
15 hg up -qC 0 | |
16 hg branch branch0 | |
17 echo b > b | |
18 hg ci -qAm addb | |
19 hg up -qC | |
20 hg merge | |
21 hg ci -qm mergeab | |
22 hg tag -ql mergeab | |
23 cd .. | |
24 | |
25 # Miss perl... sometimes | |
26 cat > filter.py <<EOF | |
27 import sys, re | |
28 | |
29 r = re.compile(r'^(?:\d+|pulling from)') | |
30 sys.stdout.writelines([l for l in sys.stdin if r.search(l)]) | |
31 EOF | |
32 | |
33 echo % convert | |
34 hg convert -v --config convert.hg.clonebranches=1 source dest | | |
35 python filter.py | |
36 | |
37 # Add a merge with both parents and child in different branches | |
38 cd source | |
39 hg branch branch1 | |
40 echo a > file1 | |
41 hg ci -qAm c1 | |
42 hg up -qC mergeab | |
43 hg branch branch2 | |
44 echo a > file2 | |
45 hg ci -qAm c2 | |
46 hg merge branch1 | |
47 hg branch branch3 | |
48 hg ci -qAm c3 | |
49 cd .. | |
50 | |
51 echo % incremental conversion | |
52 hg convert -v --config convert.hg.clonebranches=1 source dest | | |
53 python filter.py | |
54 |