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