Show More
@@ -1,139 +1,139 b'' | |||||
1 | This emulates the effects of an hg pull --rebase in which the remote repo |
|
1 | This emulates the effects of an hg pull --rebase in which the remote repo | |
2 | already has one local mq patch |
|
2 | already has one local mq patch | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH <<EOF |
|
4 | $ cat >> $HGRCPATH <<EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > rebase= |
|
6 | > rebase= | |
7 | > mq= |
|
7 | > mq= | |
8 | > |
|
8 | > | |
9 | > [phases] |
|
9 | > [phases] | |
10 | > publish=False |
|
10 | > publish=False | |
11 | > |
|
11 | > | |
12 | > [alias] |
|
12 | > [alias] | |
13 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
13 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
14 | > EOF |
|
14 | > EOF | |
15 |
|
15 | |||
16 |
|
16 | |||
17 | $ hg init a |
|
17 | $ hg init a | |
18 | $ cd a |
|
18 | $ cd a | |
19 | $ hg qinit -c |
|
19 | $ hg qinit -c | |
20 |
|
20 | |||
21 | $ echo c1 > c1 |
|
21 | $ echo c1 > c1 | |
22 | $ hg add c1 |
|
22 | $ hg add c1 | |
23 | $ hg ci -m C1 |
|
23 | $ hg ci -m C1 | |
24 |
|
24 | |||
25 | $ echo r1 > r1 |
|
25 | $ echo r1 > r1 | |
26 | $ hg add r1 |
|
26 | $ hg add r1 | |
27 | $ hg ci -m R1 |
|
27 | $ hg ci -m R1 | |
28 |
|
28 | |||
29 | $ hg up -q 0 |
|
29 | $ hg up -q 0 | |
30 |
|
30 | |||
31 | $ hg qnew p0.patch |
|
31 | $ hg qnew p0.patch -d '1 0' | |
32 | $ echo p0 > p0 |
|
32 | $ echo p0 > p0 | |
33 | $ hg add p0 |
|
33 | $ hg add p0 | |
34 | $ hg qref -m P0 |
|
34 | $ hg qref -m P0 | |
35 |
|
35 | |||
36 | $ hg qnew p1.patch |
|
36 | $ hg qnew p1.patch -d '2 0' | |
37 | $ echo p1 > p1 |
|
37 | $ echo p1 > p1 | |
38 | $ hg add p1 |
|
38 | $ hg add p1 | |
39 | $ hg qref -m P1 |
|
39 | $ hg qref -m P1 | |
40 |
|
40 | |||
41 | $ hg export qtip > p1.patch |
|
41 | $ hg export qtip > p1.patch | |
42 |
|
42 | |||
43 | $ hg up -q -C 1 |
|
43 | $ hg up -q -C 1 | |
44 |
|
44 | |||
45 | $ hg import p1.patch |
|
45 | $ hg import p1.patch | |
46 | applying p1.patch |
|
46 | applying p1.patch | |
47 |
|
47 | |||
48 | $ rm p1.patch |
|
48 | $ rm p1.patch | |
49 |
|
49 | |||
50 | $ hg up -q -C qtip |
|
50 | $ hg up -q -C qtip | |
51 |
|
51 | |||
52 | $ hg rebase |
|
52 | $ hg rebase | |
53 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/ |
|
53 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob) | |
54 |
|
54 | |||
55 | $ hg tglog |
|
55 | $ hg tglog | |
56 | @ 3: 'P0' tags: p0.patch qbase qtip tip |
|
56 | @ 3: 'P0' tags: p0.patch qbase qtip tip | |
57 | | |
|
57 | | | |
58 | o 2: 'P1' tags: qparent |
|
58 | o 2: 'P1' tags: qparent | |
59 | | |
|
59 | | | |
60 | o 1: 'R1' tags: |
|
60 | o 1: 'R1' tags: | |
61 | | |
|
61 | | | |
62 | o 0: 'C1' tags: |
|
62 | o 0: 'C1' tags: | |
63 |
|
63 | |||
64 | $ cd .. |
|
64 | $ cd .. | |
65 |
|
65 | |||
66 |
|
66 | |||
67 | $ hg init b |
|
67 | $ hg init b | |
68 | $ cd b |
|
68 | $ cd b | |
69 | $ hg qinit -c |
|
69 | $ hg qinit -c | |
70 |
|
70 | |||
71 | $ for i in r0 r1 r2 r3 r4 r5 r6; |
|
71 | $ for i in r0 r1 r2 r3 r4 r5 r6; | |
72 | > do |
|
72 | > do | |
73 | > echo $i > $i |
|
73 | > echo $i > $i | |
74 | > hg ci -Am $i |
|
74 | > hg ci -Am $i | |
75 | > done |
|
75 | > done | |
76 | adding r0 |
|
76 | adding r0 | |
77 | adding r1 |
|
77 | adding r1 | |
78 | adding r2 |
|
78 | adding r2 | |
79 | adding r3 |
|
79 | adding r3 | |
80 | adding r4 |
|
80 | adding r4 | |
81 | adding r5 |
|
81 | adding r5 | |
82 | adding r6 |
|
82 | adding r6 | |
83 |
|
83 | |||
84 | $ hg qimport -r 1:tip |
|
84 | $ hg qimport -r 1:tip | |
85 |
|
85 | |||
86 | $ hg up -q 0 |
|
86 | $ hg up -q 0 | |
87 |
|
87 | |||
88 | $ for i in r1 r3 r7 r8; |
|
88 | $ for i in r1 r3 r7 r8; | |
89 | > do |
|
89 | > do | |
90 | > echo $i > $i |
|
90 | > echo $i > $i | |
91 | > hg ci -Am branch2-$i |
|
91 | > hg ci -Am branch2-$i | |
92 | > done |
|
92 | > done | |
93 | adding r1 |
|
93 | adding r1 | |
94 | created new head |
|
94 | created new head | |
95 | adding r3 |
|
95 | adding r3 | |
96 | adding r7 |
|
96 | adding r7 | |
97 | adding r8 |
|
97 | adding r8 | |
98 |
|
98 | |||
99 | $ echo somethingelse > r4 |
|
99 | $ echo somethingelse > r4 | |
100 | $ hg ci -Am branch2-r4 |
|
100 | $ hg ci -Am branch2-r4 | |
101 | adding r4 |
|
101 | adding r4 | |
102 |
|
102 | |||
103 | $ echo r6 > r6 |
|
103 | $ echo r6 > r6 | |
104 | $ hg ci -Am branch2-r6 |
|
104 | $ hg ci -Am branch2-r6 | |
105 | adding r6 |
|
105 | adding r6 | |
106 |
|
106 | |||
107 | $ hg up -q qtip |
|
107 | $ hg up -q qtip | |
108 |
|
108 | |||
109 | $ HGMERGE=internal:fail hg rebase |
|
109 | $ HGMERGE=internal:fail hg rebase | |
110 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
110 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
111 | [1] |
|
111 | [1] | |
112 |
|
112 | |||
113 | $ HGMERGE=internal:local hg resolve --all |
|
113 | $ HGMERGE=internal:local hg resolve --all | |
114 | (no more unresolved files) |
|
114 | (no more unresolved files) | |
115 |
|
115 | |||
116 | $ hg rebase --continue |
|
116 | $ hg rebase --continue | |
117 |
saved backup bundle to $TESTTMP/b/.hg/strip-backup/ |
|
117 | saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob) | |
118 |
|
118 | |||
119 | $ hg tglog |
|
119 | $ hg tglog | |
120 | @ 8: 'r5' tags: 5.diff qtip tip |
|
120 | @ 8: 'r5' tags: 5.diff qtip tip | |
121 | | |
|
121 | | | |
122 | o 7: 'r2' tags: 2.diff qbase |
|
122 | o 7: 'r2' tags: 2.diff qbase | |
123 | | |
|
123 | | | |
124 | o 6: 'branch2-r6' tags: qparent |
|
124 | o 6: 'branch2-r6' tags: qparent | |
125 | | |
|
125 | | | |
126 | o 5: 'branch2-r4' tags: |
|
126 | o 5: 'branch2-r4' tags: | |
127 | | |
|
127 | | | |
128 | o 4: 'branch2-r8' tags: |
|
128 | o 4: 'branch2-r8' tags: | |
129 | | |
|
129 | | | |
130 | o 3: 'branch2-r7' tags: |
|
130 | o 3: 'branch2-r7' tags: | |
131 | | |
|
131 | | | |
132 | o 2: 'branch2-r3' tags: |
|
132 | o 2: 'branch2-r3' tags: | |
133 | | |
|
133 | | | |
134 | o 1: 'branch2-r1' tags: |
|
134 | o 1: 'branch2-r1' tags: | |
135 | | |
|
135 | | | |
136 | o 0: 'r0' tags: |
|
136 | o 0: 'r0' tags: | |
137 |
|
137 | |||
138 |
|
138 | |||
139 | $ cd .. |
|
139 | $ cd .. |
@@ -1,348 +1,352 b'' | |||||
1 | $ cat >> $HGRCPATH <<EOF |
|
1 | $ cat >> $HGRCPATH <<EOF | |
2 | > [extensions] |
|
2 | > [extensions] | |
3 | > rebase= |
|
3 | > rebase= | |
4 | > mq= |
|
4 | > mq= | |
5 | > |
|
5 | > | |
6 | > [mq] |
|
6 | > [mq] | |
7 | > plain=true |
|
7 | > plain=true | |
8 | > |
|
8 | > | |
9 | > [alias] |
|
9 | > [alias] | |
10 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" |
|
10 | > tglog = log -G --template "{rev}: '{desc}' tags: {tags}\n" | |
11 | > EOF |
|
11 | > EOF | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | $ hg init a |
|
14 | $ hg init a | |
15 | $ cd a |
|
15 | $ cd a | |
16 | $ hg qinit -c |
|
16 | $ hg qinit -c | |
17 |
|
17 | |||
18 | $ echo c1 > f |
|
18 | $ echo c1 > f | |
19 | $ hg add f |
|
19 | $ hg add f | |
20 | $ hg ci -m C1 |
|
20 | $ hg ci -m C1 | |
21 |
|
21 | |||
22 | $ echo r1 > f |
|
22 | $ echo r1 > f | |
23 | $ hg ci -m R1 |
|
23 | $ hg ci -m R1 | |
24 |
|
24 | |||
25 | $ hg up -q 0 |
|
25 | $ hg up -q 0 | |
26 |
|
26 | |||
27 | $ hg qnew f.patch |
|
27 | $ hg qnew f.patch -d '1 0' | |
28 | $ echo mq1 > f |
|
28 | $ echo mq1 > f | |
29 | $ hg qref -m P0 |
|
29 | $ hg qref -m P0 | |
30 |
|
30 | |||
31 | $ hg qnew f2.patch |
|
31 | $ hg qnew f2.patch | |
32 | $ echo mq2 > f |
|
32 | $ echo mq2 > f | |
33 | $ hg qref -m P1 |
|
33 | $ hg qref -m P1 -d '2 0' | |
34 |
|
34 | |||
35 | $ hg tglog |
|
35 | $ hg tglog | |
36 | @ 3: 'P1' tags: f2.patch qtip tip |
|
36 | @ 3: 'P1' tags: f2.patch qtip tip | |
37 | | |
|
37 | | | |
38 | o 2: 'P0' tags: f.patch qbase |
|
38 | o 2: 'P0' tags: f.patch qbase | |
39 | | |
|
39 | | | |
40 | | o 1: 'R1' tags: |
|
40 | | o 1: 'R1' tags: | |
41 | |/ |
|
41 | |/ | |
42 | o 0: 'C1' tags: qparent |
|
42 | o 0: 'C1' tags: qparent | |
43 |
|
43 | |||
44 |
|
44 | |||
45 | Rebase - try to rebase on an applied mq patch: |
|
45 | Rebase - try to rebase on an applied mq patch: | |
46 |
|
46 | |||
47 | $ hg rebase -s 1 -d 3 |
|
47 | $ hg rebase -s 1 -d 3 | |
48 | abort: cannot rebase onto an applied mq patch |
|
48 | abort: cannot rebase onto an applied mq patch | |
49 | [255] |
|
49 | [255] | |
50 |
|
50 | |||
51 | Rebase - same thing, but mq patch is default dest: |
|
51 | Rebase - same thing, but mq patch is default dest: | |
52 |
|
52 | |||
53 | $ hg up -q 1 |
|
53 | $ hg up -q 1 | |
54 | $ hg rebase |
|
54 | $ hg rebase | |
55 | abort: cannot rebase onto an applied mq patch |
|
55 | abort: cannot rebase onto an applied mq patch | |
56 | [255] |
|
56 | [255] | |
57 | $ hg up -q qtip |
|
57 | $ hg up -q qtip | |
58 |
|
58 | |||
59 | Rebase - generate a conflict: |
|
59 | Rebase - generate a conflict: | |
60 |
|
60 | |||
61 | $ hg rebase -s 2 -d 1 |
|
61 | $ hg rebase -s 2 -d 1 | |
62 | merging f |
|
62 | merging f | |
63 | warning: conflicts during merge. |
|
63 | warning: conflicts during merge. | |
64 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
64 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
65 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
65 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
66 | [1] |
|
66 | [1] | |
67 |
|
67 | |||
68 | Fix the 1st conflict: |
|
68 | Fix the 1st conflict: | |
69 |
|
69 | |||
70 | $ echo mq1r1 > f |
|
70 | $ echo mq1r1 > f | |
71 | $ hg resolve -m f |
|
71 | $ hg resolve -m f | |
72 | (no more unresolved files) |
|
72 | (no more unresolved files) | |
73 | $ hg rebase -c |
|
73 | $ hg rebase -c | |
74 | merging f |
|
74 | merging f | |
75 | warning: conflicts during merge. |
|
75 | warning: conflicts during merge. | |
76 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') |
|
76 | merging f incomplete! (edit conflicts, then use 'hg resolve --mark') | |
77 | unresolved conflicts (see hg resolve, then hg rebase --continue) |
|
77 | unresolved conflicts (see hg resolve, then hg rebase --continue) | |
78 | [1] |
|
78 | [1] | |
79 |
|
79 | |||
80 | Fix the 2nd conflict: |
|
80 | Fix the 2nd conflict: | |
81 |
|
81 | |||
82 | $ echo mq1r1mq2 > f |
|
82 | $ echo mq1r1mq2 > f | |
83 | $ hg resolve -m f |
|
83 | $ hg resolve -m f | |
84 | (no more unresolved files) |
|
84 | (no more unresolved files) | |
85 | $ hg rebase -c |
|
85 | $ hg rebase -c | |
86 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/ |
|
86 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-backup.hg (glob) | |
87 |
|
87 | |||
88 | $ hg tglog |
|
88 | $ hg tglog | |
89 | @ 3: 'P1' tags: f2.patch qtip tip |
|
89 | @ 3: 'P1' tags: f2.patch qtip tip | |
90 | | |
|
90 | | | |
91 | o 2: 'P0' tags: f.patch qbase |
|
91 | o 2: 'P0' tags: f.patch qbase | |
92 | | |
|
92 | | | |
93 | o 1: 'R1' tags: qparent |
|
93 | o 1: 'R1' tags: qparent | |
94 | | |
|
94 | | | |
95 | o 0: 'C1' tags: |
|
95 | o 0: 'C1' tags: | |
96 |
|
96 | |||
97 | $ hg up -q qbase |
|
97 | $ hg up -q qbase | |
98 |
|
98 | |||
99 | $ cat f |
|
99 | $ cat f | |
100 | mq1r1 |
|
100 | mq1r1 | |
101 |
|
101 | |||
102 | $ cat .hg/patches/f.patch |
|
102 | $ cat .hg/patches/f.patch | |
103 | # HG changeset patch |
|
103 | # HG changeset patch | |
104 | # User test |
|
104 | # User test | |
105 | # Date ?????????? ? (glob) |
|
105 | # Date 1 0 | |
106 | # * (glob) |
|
106 | # Thu Jan 01 00:00:01 1970 +0000 | |
107 | # Node ID ???????????????????????????????????????? (glob) |
|
107 | # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab | |
108 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
108 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 | |
109 | P0 |
|
109 | P0 | |
110 |
|
110 | |||
111 |
diff -r bac9ed9960d8 -r |
|
111 | diff -r bac9ed9960d8 -r ebe9914c0d1c f | |
112 | --- a/f Thu Jan 01 00:00:00 1970 +0000 |
|
112 | --- a/f Thu Jan 01 00:00:00 1970 +0000 | |
113 | +++ b/f ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
113 | +++ b/f Thu Jan 01 00:00:01 1970 +0000 | |
114 | @@ -1,1 +1,1 @@ |
|
114 | @@ -1,1 +1,1 @@ | |
115 | -r1 |
|
115 | -r1 | |
116 | +mq1r1 |
|
116 | +mq1r1 | |
117 |
|
117 | |||
118 | Update to qtip: |
|
118 | Update to qtip: | |
119 |
|
119 | |||
120 | $ hg up -q qtip |
|
120 | $ hg up -q qtip | |
121 |
|
121 | |||
122 | $ cat f |
|
122 | $ cat f | |
123 | mq1r1mq2 |
|
123 | mq1r1mq2 | |
124 |
|
124 | |||
125 | $ cat .hg/patches/f2.patch |
|
125 | $ cat .hg/patches/f2.patch | |
126 | # HG changeset patch |
|
126 | # HG changeset patch | |
127 | # User test |
|
127 | # User test | |
128 | # Date ?????????? ? (glob) |
|
128 | # Date 2 0 | |
129 | # * (glob) |
|
129 | # Thu Jan 01 00:00:02 1970 +0000 | |
130 | # Node ID ???????????????????????????????????????? (glob) |
|
130 | # Node ID 462012cf340c97d44d62377c985a423f6bb82f07 | |
131 | # Parent ???????????????????????????????????????? (glob) |
|
131 | # Parent ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab | |
132 | P1 |
|
132 | P1 | |
133 |
|
133 | |||
134 | diff -r ???????????? -r ???????????? f (glob) |
|
134 | diff -r ebe9914c0d1c -r 462012cf340c f | |
135 | --- a/f ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
135 | --- a/f Thu Jan 01 00:00:01 1970 +0000 | |
136 | +++ b/f ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
136 | +++ b/f Thu Jan 01 00:00:02 1970 +0000 | |
137 | @@ -1,1 +1,1 @@ |
|
137 | @@ -1,1 +1,1 @@ | |
138 | -mq1r1 |
|
138 | -mq1r1 | |
139 | +mq1r1mq2 |
|
139 | +mq1r1mq2 | |
140 |
|
140 | |||
141 | Adding one git-style patch and one normal: |
|
141 | Adding one git-style patch and one normal: | |
142 |
|
142 | |||
143 | $ hg qpop -a |
|
143 | $ hg qpop -a | |
144 | popping f2.patch |
|
144 | popping f2.patch | |
145 | popping f.patch |
|
145 | popping f.patch | |
146 | patch queue now empty |
|
146 | patch queue now empty | |
147 |
|
147 | |||
148 | $ rm -fr .hg/patches |
|
148 | $ rm -fr .hg/patches | |
149 | $ hg qinit -c |
|
149 | $ hg qinit -c | |
150 |
|
150 | |||
151 | $ hg up -q 0 |
|
151 | $ hg up -q 0 | |
152 |
|
152 | |||
153 | $ hg qnew --git f_git.patch |
|
153 | $ hg qnew --git f_git.patch -d '3 0' | |
154 | $ echo mq1 > p |
|
154 | $ echo mq1 > p | |
155 | $ hg add p |
|
155 | $ hg add p | |
156 | $ hg qref --git -m 'P0 (git)' |
|
156 | $ hg qref --git -m 'P0 (git)' | |
157 |
|
157 | |||
158 | $ hg qnew f.patch |
|
158 | $ hg qnew f.patch -d '4 0' | |
159 | $ echo mq2 > p |
|
159 | $ echo mq2 > p | |
160 | $ hg qref -m P1 |
|
160 | $ hg qref -m P1 | |
161 | $ hg qci -m 'save patch state' |
|
161 | $ hg qci -m 'save patch state' | |
162 |
|
162 | |||
163 | $ hg qseries -s |
|
163 | $ hg qseries -s | |
164 | f_git.patch: P0 (git) |
|
164 | f_git.patch: P0 (git) | |
165 | f.patch: P1 |
|
165 | f.patch: P1 | |
166 |
|
166 | |||
167 | $ hg -R .hg/patches manifest |
|
167 | $ hg -R .hg/patches manifest | |
168 | .hgignore |
|
168 | .hgignore | |
169 | f.patch |
|
169 | f.patch | |
170 | f_git.patch |
|
170 | f_git.patch | |
171 | series |
|
171 | series | |
172 |
|
172 | |||
173 | $ cat .hg/patches/f_git.patch |
|
173 | $ cat .hg/patches/f_git.patch | |
|
174 | Date: 3 0 | |||
|
175 | ||||
174 | P0 (git) |
|
176 | P0 (git) | |
175 |
|
177 | |||
176 | diff --git a/p b/p |
|
178 | diff --git a/p b/p | |
177 | new file mode 100644 |
|
179 | new file mode 100644 | |
178 | --- /dev/null |
|
180 | --- /dev/null | |
179 | +++ b/p |
|
181 | +++ b/p | |
180 | @@ -0,0 +1,1 @@ |
|
182 | @@ -0,0 +1,1 @@ | |
181 | +mq1 |
|
183 | +mq1 | |
182 |
|
184 | |||
183 | $ cat .hg/patches/f.patch |
|
185 | $ cat .hg/patches/f.patch | |
|
186 | Date: 4 0 | |||
|
187 | ||||
184 | P1 |
|
188 | P1 | |
185 |
|
189 | |||
186 | diff -r ???????????? p (glob) |
|
190 | diff -r ???????????? p (glob) | |
187 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
191 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) | |
188 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
192 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) | |
189 | @@ -1,1 +1,1 @@ |
|
193 | @@ -1,1 +1,1 @@ | |
190 | -mq1 |
|
194 | -mq1 | |
191 | +mq2 |
|
195 | +mq2 | |
192 |
|
196 | |||
193 |
|
197 | |||
194 | Rebase the applied mq patches: |
|
198 | Rebase the applied mq patches: | |
195 |
|
199 | |||
196 | $ hg rebase -s 2 -d 1 |
|
200 | $ hg rebase -s 2 -d 1 | |
197 |
saved backup bundle to $TESTTMP/a/.hg/strip-backup/ |
|
201 | saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-backup.hg (glob) | |
198 |
|
202 | |||
199 | $ hg qci -m 'save patch state' |
|
203 | $ hg qci -m 'save patch state' | |
200 |
|
204 | |||
201 | $ hg qseries -s |
|
205 | $ hg qseries -s | |
202 | f_git.patch: P0 (git) |
|
206 | f_git.patch: P0 (git) | |
203 | f.patch: P1 |
|
207 | f.patch: P1 | |
204 |
|
208 | |||
205 | $ hg -R .hg/patches manifest |
|
209 | $ hg -R .hg/patches manifest | |
206 | .hgignore |
|
210 | .hgignore | |
207 | f.patch |
|
211 | f.patch | |
208 | f_git.patch |
|
212 | f_git.patch | |
209 | series |
|
213 | series | |
210 |
|
214 | |||
211 | $ cat .hg/patches/f_git.patch |
|
215 | $ cat .hg/patches/f_git.patch | |
212 | # HG changeset patch |
|
216 | # HG changeset patch | |
213 | # User test |
|
217 | # User test | |
214 | # Date ?????????? ? (glob) |
|
218 | # Date 3 0 | |
215 | # * (glob) |
|
219 | # Thu Jan 01 00:00:03 1970 +0000 | |
216 | # Node ID ???????????????????????????????????????? (glob) |
|
220 | # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837 | |
217 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 |
|
221 | # Parent bac9ed9960d8992bcad75864a879fa76cadaf1b0 | |
218 | P0 (git) |
|
222 | P0 (git) | |
219 |
|
223 | |||
220 | diff --git a/p b/p |
|
224 | diff --git a/p b/p | |
221 | new file mode 100644 |
|
225 | new file mode 100644 | |
222 | --- /dev/null |
|
226 | --- /dev/null | |
223 | +++ b/p |
|
227 | +++ b/p | |
224 | @@ -0,0 +1,1 @@ |
|
228 | @@ -0,0 +1,1 @@ | |
225 | +mq1 |
|
229 | +mq1 | |
226 |
|
230 | |||
227 | $ cat .hg/patches/f.patch |
|
231 | $ cat .hg/patches/f.patch | |
228 | # HG changeset patch |
|
232 | # HG changeset patch | |
229 | # User test |
|
233 | # User test | |
230 | # Date ?????????? ? (glob) |
|
234 | # Date 4 0 | |
231 | # * (glob) |
|
235 | # Thu Jan 01 00:00:04 1970 +0000 | |
232 | # Node ID ???????????????????????????????????????? (glob) |
|
236 | # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557 | |
233 | # Parent ???????????????????????????????????????? (glob) |
|
237 | # Parent 12d9f6a3bbe560dee50c7c454d434add7fb8e837 | |
234 | P1 |
|
238 | P1 | |
235 |
|
239 | |||
236 | diff -r ???????????? -r ???????????? p (glob) |
|
240 | diff -r 12d9f6a3bbe5 -r c77a2661c64c p | |
237 | --- a/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
241 | --- a/p Thu Jan 01 00:00:03 1970 +0000 | |
238 | +++ b/p ??? ??? ?? ??:??:?? ???? ????? (glob) |
|
242 | +++ b/p Thu Jan 01 00:00:04 1970 +0000 | |
239 | @@ -1,1 +1,1 @@ |
|
243 | @@ -1,1 +1,1 @@ | |
240 | -mq1 |
|
244 | -mq1 | |
241 | +mq2 |
|
245 | +mq2 | |
242 |
|
246 | |||
243 | $ cd .. |
|
247 | $ cd .. | |
244 |
|
248 | |||
245 | Rebase with guards |
|
249 | Rebase with guards | |
246 |
|
250 | |||
247 | $ hg init foo |
|
251 | $ hg init foo | |
248 | $ cd foo |
|
252 | $ cd foo | |
249 | $ echo a > a |
|
253 | $ echo a > a | |
250 | $ hg ci -Am a |
|
254 | $ hg ci -Am a | |
251 | adding a |
|
255 | adding a | |
252 |
|
256 | |||
253 | Create mq repo with guarded patches foo and bar and empty patch: |
|
257 | Create mq repo with guarded patches foo and bar and empty patch: | |
254 |
|
258 | |||
255 | $ hg qinit |
|
259 | $ hg qinit | |
256 | $ echo guarded > guarded |
|
260 | $ echo guarded > guarded | |
257 | $ hg add guarded |
|
261 | $ hg add guarded | |
258 | $ hg qnew guarded |
|
262 | $ hg qnew guarded | |
259 | $ hg qnew empty-important -m 'important commit message' |
|
263 | $ hg qnew empty-important -m 'important commit message' -d '1 0' | |
260 | $ echo bar > bar |
|
264 | $ echo bar > bar | |
261 | $ hg add bar |
|
265 | $ hg add bar | |
262 | $ hg qnew bar |
|
266 | $ hg qnew bar -d '2 0' | |
263 | $ echo foo > foo |
|
267 | $ echo foo > foo | |
264 | $ hg add foo |
|
268 | $ hg add foo | |
265 | $ hg qnew foo |
|
269 | $ hg qnew foo | |
266 | $ hg qpop -a |
|
270 | $ hg qpop -a | |
267 | popping foo |
|
271 | popping foo | |
268 | popping bar |
|
272 | popping bar | |
269 | popping empty-important |
|
273 | popping empty-important | |
270 | popping guarded |
|
274 | popping guarded | |
271 | patch queue now empty |
|
275 | patch queue now empty | |
272 | $ hg qguard guarded +guarded |
|
276 | $ hg qguard guarded +guarded | |
273 | $ hg qguard bar +baz |
|
277 | $ hg qguard bar +baz | |
274 | $ hg qguard foo +baz |
|
278 | $ hg qguard foo +baz | |
275 | $ hg qselect baz |
|
279 | $ hg qselect baz | |
276 | number of unguarded, unapplied patches has changed from 1 to 3 |
|
280 | number of unguarded, unapplied patches has changed from 1 to 3 | |
277 | $ hg qpush bar |
|
281 | $ hg qpush bar | |
278 | applying empty-important |
|
282 | applying empty-important | |
279 | patch empty-important is empty |
|
283 | patch empty-important is empty | |
280 | applying bar |
|
284 | applying bar | |
281 | now at: bar |
|
285 | now at: bar | |
282 |
|
286 | |||
283 | $ hg qguard -l |
|
287 | $ hg qguard -l | |
284 | guarded: +guarded |
|
288 | guarded: +guarded | |
285 | empty-important: unguarded |
|
289 | empty-important: unguarded | |
286 | bar: +baz |
|
290 | bar: +baz | |
287 | foo: +baz |
|
291 | foo: +baz | |
288 |
|
292 | |||
289 | $ hg tglog |
|
293 | $ hg tglog | |
290 | @ 2: 'imported patch bar' tags: bar qtip tip |
|
294 | @ 2: 'imported patch bar' tags: bar qtip tip | |
291 | | |
|
295 | | | |
292 | o 1: 'important commit message' tags: empty-important qbase |
|
296 | o 1: 'important commit message' tags: empty-important qbase | |
293 | | |
|
297 | | | |
294 | o 0: 'a' tags: qparent |
|
298 | o 0: 'a' tags: qparent | |
295 |
|
299 | |||
296 | Create new head to rebase bar onto: |
|
300 | Create new head to rebase bar onto: | |
297 |
|
301 | |||
298 | $ hg up -C 0 |
|
302 | $ hg up -C 0 | |
299 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
303 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
300 | $ echo b > b |
|
304 | $ echo b > b | |
301 | $ hg add b |
|
305 | $ hg add b | |
302 | $ hg ci -m b |
|
306 | $ hg ci -m b | |
303 | created new head |
|
307 | created new head | |
304 | $ hg up -C 2 |
|
308 | $ hg up -C 2 | |
305 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
309 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
306 | $ echo a >> a |
|
310 | $ echo a >> a | |
307 | $ hg qref |
|
311 | $ hg qref | |
308 |
|
312 | |||
309 | $ hg tglog |
|
313 | $ hg tglog | |
310 | @ 3: '[mq]: bar' tags: bar qtip tip |
|
314 | @ 3: '[mq]: bar' tags: bar qtip tip | |
311 | | |
|
315 | | | |
312 | | o 2: 'b' tags: |
|
316 | | o 2: 'b' tags: | |
313 | | | |
|
317 | | | | |
314 | o | 1: 'important commit message' tags: empty-important qbase |
|
318 | o | 1: 'important commit message' tags: empty-important qbase | |
315 | |/ |
|
319 | |/ | |
316 | o 0: 'a' tags: qparent |
|
320 | o 0: 'a' tags: qparent | |
317 |
|
321 | |||
318 |
|
322 | |||
319 | Rebase bar (make sure series order is preserved and empty-important also is |
|
323 | Rebase bar (make sure series order is preserved and empty-important also is | |
320 | removed from the series): |
|
324 | removed from the series): | |
321 |
|
325 | |||
322 | $ hg qseries |
|
326 | $ hg qseries | |
323 | guarded |
|
327 | guarded | |
324 | empty-important |
|
328 | empty-important | |
325 | bar |
|
329 | bar | |
326 | foo |
|
330 | foo | |
327 | $ [ -f .hg/patches/empty-important ] |
|
331 | $ [ -f .hg/patches/empty-important ] | |
328 | $ hg -q rebase -d 2 |
|
332 | $ hg -q rebase -d 2 | |
329 | $ hg qseries |
|
333 | $ hg qseries | |
330 | guarded |
|
334 | guarded | |
331 | bar |
|
335 | bar | |
332 | foo |
|
336 | foo | |
333 | $ [ -f .hg/patches/empty-important ] |
|
337 | $ [ -f .hg/patches/empty-important ] | |
334 | [1] |
|
338 | [1] | |
335 |
|
339 | |||
336 | $ hg qguard -l |
|
340 | $ hg qguard -l | |
337 | guarded: +guarded |
|
341 | guarded: +guarded | |
338 | bar: +baz |
|
342 | bar: +baz | |
339 | foo: +baz |
|
343 | foo: +baz | |
340 |
|
344 | |||
341 | $ hg tglog |
|
345 | $ hg tglog | |
342 |
@ 2: |
|
346 | @ 2: '[mq]: bar' tags: bar qbase qtip tip | |
343 | | |
|
347 | | | |
344 |
o 1: |
|
348 | o 1: 'b' tags: qparent | |
345 | | |
|
349 | | | |
346 |
o 0: |
|
350 | o 0: 'a' tags: | |
347 |
|
351 | |||
348 | $ cd .. |
|
352 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now