Show More
@@ -1,54 +1,84 b'' | |||
|
1 | #!/bin/sh | |
|
2 | 1 | |
|
3 | echo "[extensions]" >> $HGRCPATH | |
|
4 | echo "convert = " >> $HGRCPATH | |
|
5 | echo "[convert]" >> $HGRCPATH | |
|
6 | echo "hg.tagsbranch=0" >> $HGRCPATH | |
|
2 | $ echo "[extensions]" >> $HGRCPATH | |
|
3 | $ echo "convert = " >> $HGRCPATH | |
|
4 | $ echo "[convert]" >> $HGRCPATH | |
|
5 | $ echo "hg.tagsbranch=0" >> $HGRCPATH | |
|
6 | $ hg init source | |
|
7 | $ cd source | |
|
8 | $ echo a > a | |
|
9 | $ hg ci -qAm adda | |
|
10 | ||
|
11 | Add a merge with one parent in the same branch | |
|
7 | 12 | |
|
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 |
|
|
|
14 |
hg ci -qAm |
|
|
15 |
hg up -qC |
|
|
16 | hg branch branch0 | |
|
17 | echo b > b | |
|
18 | hg ci -qAm addb | |
|
19 | hg up -qC | |
|
20 | hg merge default | |
|
21 | hg ci -qm mergeab | |
|
22 | hg tag -ql mergeab | |
|
23 | cd .. | |
|
13 | $ echo a >> a | |
|
14 | $ hg ci -qAm changea | |
|
15 | $ hg up -qC 0 | |
|
16 | $ hg branch branch0 | |
|
17 | marked working directory as branch branch0 | |
|
18 | $ echo b > b | |
|
19 | $ hg ci -qAm addb | |
|
20 | $ hg up -qC | |
|
21 | $ hg merge default | |
|
22 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
23 | (branch merge, don't forget to commit) | |
|
24 | $ hg ci -qm mergeab | |
|
25 | $ hg tag -ql mergeab | |
|
26 | $ cd .. | |
|
27 | ||
|
28 | Miss perl... sometimes | |
|
29 | ||
|
30 | $ cat > filter.py <<EOF | |
|
31 | > import sys, re | |
|
32 | > | |
|
33 | > r = re.compile(r'^(?:\d+|pulling from)') | |
|
34 | > sys.stdout.writelines([l for l in sys.stdin if r.search(l)]) | |
|
35 | > EOF | |
|
36 | ||
|
37 | convert | |
|
24 | 38 | |
|
25 | # Miss perl... sometimes | |
|
26 | cat > filter.py <<EOF | |
|
27 | import sys, re | |
|
39 | $ hg convert -v --config convert.hg.clonebranches=1 source dest | | |
|
40 | > python filter.py | |
|
41 | 3 adda | |
|
42 | 2 changea | |
|
43 | 1 addb | |
|
44 | pulling from default into branch0 | |
|
45 | 1 changesets found | |
|
46 | 0 mergeab | |
|
47 | pulling from default into branch0 | |
|
48 | 1 changesets found | |
|
28 | 49 | |
|
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 | |
|
50 | Add a merge with both parents and child in different branches | |
|
36 | 51 | |
|
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 .. | |
|
52 | $ cd source | |
|
53 | $ hg branch branch1 | |
|
54 | marked working directory as branch branch1 | |
|
55 | $ echo a > file1 | |
|
56 | $ hg ci -qAm c1 | |
|
57 | $ hg up -qC mergeab | |
|
58 | $ hg branch branch2 | |
|
59 | marked working directory as branch branch2 | |
|
60 | $ echo a > file2 | |
|
61 | $ hg ci -qAm c2 | |
|
62 | $ hg merge branch1 | |
|
63 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
64 | (branch merge, don't forget to commit) | |
|
65 | $ hg branch branch3 | |
|
66 | marked working directory as branch branch3 | |
|
67 | $ hg ci -qAm c3 | |
|
68 | $ cd .. | |
|
50 | 69 | |
|
51 |
|
|
|
52 | hg convert -v --config convert.hg.clonebranches=1 source dest | | |
|
53 | python filter.py | |
|
70 | incremental conversion | |
|
54 | 71 | |
|
72 | $ hg convert -v --config convert.hg.clonebranches=1 source dest | | |
|
73 | > python filter.py | |
|
74 | 2 c1 | |
|
75 | pulling from branch0 into branch1 | |
|
76 | 4 changesets found | |
|
77 | 1 c2 | |
|
78 | pulling from branch0 into branch2 | |
|
79 | 4 changesets found | |
|
80 | 0 c3 | |
|
81 | pulling from branch2 into branch3 | |
|
82 | 5 changesets found | |
|
83 | pulling from branch1 into branch3 | |
|
84 | 1 changesets found |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now