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