Mercurial > hg
comparison tests/test-convert-hg-startrev @ 6885:6e253aa04ff7
convert: implement startrev for hg source
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Wed, 13 Aug 2008 23:31:10 +0200 |
parents | |
children | 5b7da468531b |
comparison
equal
deleted
inserted
replaced
6884:11229144aa01 | 6885:6e253aa04ff7 |
---|---|
1 #!/bin/sh | |
2 | |
3 echo '[extensions]' >> $HGRCPATH | |
4 echo 'hgext.graphlog =' >> $HGRCPATH | |
5 echo 'hgext.convert =' >> $HGRCPATH | |
6 | |
7 glog() | |
8 { | |
9 hg -R "$1" glog --template '#rev# "#desc#" files: #files#\n' | |
10 } | |
11 | |
12 hg init source | |
13 cd source | |
14 | |
15 echo a > a | |
16 echo b > b | |
17 hg ci -d '0 0' -qAm '0: add a b' | |
18 echo c > c | |
19 hg ci -d '1 0' -qAm '1: add c' | |
20 hg copy a e | |
21 echo b >> b | |
22 hg ci -d '2 0' -qAm '2: copy e from a, change b' | |
23 hg up -C 0 | |
24 echo a >> a | |
25 hg ci -d '3 0' -qAm '3: change a' | |
26 hg merge | |
27 hg copy b d | |
28 hg ci -d '4 0' -qAm '4: merge 2 and 3, copy d from b' | |
29 echo a >> a | |
30 hg ci -d '5 0' -qAm '5: change a' | |
31 cd .. | |
32 | |
33 echo % convert from null revision | |
34 hg convert --config convert.hg.startrev=null source empty | |
35 glog empty | |
36 | |
37 echo % convert from zero revision | |
38 hg convert --config convert.hg.startrev=0 source full | |
39 glog full | |
40 | |
41 echo % convert from merge parent | |
42 hg convert --config convert.hg.startrev=1 source conv1 | |
43 glog conv1 | |
44 cd conv1 | |
45 echo % check copy preservation | |
46 hg log --follow --copies e | |
47 echo % check copy removal on missing parent | |
48 hg log --follow --copies d | |
49 hg cat -r tip a b | |
50 hg -q verify | |
51 cd .. | |
52 | |
53 echo % convert from merge | |
54 hg convert --config convert.hg.startrev=4 source conv4 | |
55 glog conv4 | |
56 cd conv4 | |
57 hg up -C | |
58 hg cat -r tip a b | |
59 hg -q verify | |
60 cd .. | |
61 |