Show More
@@ -0,0 +1,178 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | echo "[extensions]" >> $HGRCPATH | |||
|
4 | echo "mq=" >> $HGRCPATH | |||
|
5 | echo "[diff]" >> $HGRCPATH | |||
|
6 | echo "nodates=true" >> $HGRCPATH | |||
|
7 | ||||
|
8 | ||||
|
9 | catpatch() { | |||
|
10 | cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" | |||
|
11 | } | |||
|
12 | ||||
|
13 | catlog() { | |||
|
14 | catpatch $1 | |||
|
15 | hg log --template "{rev}: {desc} - {author}\n" | |||
|
16 | } | |||
|
17 | ||||
|
18 | catlogd() { | |||
|
19 | catpatch $1 | |||
|
20 | hg log --template "{rev}: {desc} - {author} - {date}\n" | |||
|
21 | } | |||
|
22 | ||||
|
23 | drop() { | |||
|
24 | hg qpop | |||
|
25 | hg qdel $1.patch | |||
|
26 | } | |||
|
27 | ||||
|
28 | ||||
|
29 | echo ==== init | |||
|
30 | hg init a | |||
|
31 | cd a | |||
|
32 | hg qinit | |||
|
33 | ||||
|
34 | ||||
|
35 | echo ==== qnew -d | |||
|
36 | hg qnew -d '3 0' 1.patch | |||
|
37 | catlogd 1 | |||
|
38 | ||||
|
39 | echo ==== qref | |||
|
40 | echo "1" >1 | |||
|
41 | hg add | |||
|
42 | hg qref | |||
|
43 | catlogd 1 | |||
|
44 | ||||
|
45 | echo ==== qref -d | |||
|
46 | hg qref -d '4 0' | |||
|
47 | catlogd 1 | |||
|
48 | ||||
|
49 | ||||
|
50 | echo ==== qnew | |||
|
51 | hg qnew 2.patch | |||
|
52 | echo "2" >2 | |||
|
53 | hg add | |||
|
54 | hg qref | |||
|
55 | catlog 2 | |||
|
56 | ||||
|
57 | echo ==== qref -d | |||
|
58 | hg qref -d '5 0' | |||
|
59 | catlog 2 | |||
|
60 | ||||
|
61 | drop 2 | |||
|
62 | ||||
|
63 | ||||
|
64 | echo ==== qnew -d -m | |||
|
65 | hg qnew -d '6 0' -m "Three" 3.patch | |||
|
66 | catlogd 3 | |||
|
67 | ||||
|
68 | echo ==== qref | |||
|
69 | echo "3" >3 | |||
|
70 | hg add | |||
|
71 | hg qref | |||
|
72 | catlogd 3 | |||
|
73 | ||||
|
74 | echo ==== qref -m | |||
|
75 | hg qref -m "Drei" | |||
|
76 | catlogd 3 | |||
|
77 | ||||
|
78 | echo ==== qref -d | |||
|
79 | hg qref -d '7 0' | |||
|
80 | catlogd 3 | |||
|
81 | ||||
|
82 | echo ==== qref -d -m | |||
|
83 | hg qref -d '8 0' -m "Three (again)" | |||
|
84 | catlogd 3 | |||
|
85 | ||||
|
86 | ||||
|
87 | echo ==== qnew -m | |||
|
88 | hg qnew -m "Four" 4.patch | |||
|
89 | echo "4" >4 | |||
|
90 | hg add | |||
|
91 | hg qref | |||
|
92 | catlog 4 | |||
|
93 | ||||
|
94 | echo ==== qref -d | |||
|
95 | hg qref -d '9 0' | |||
|
96 | catlog 4 | |||
|
97 | ||||
|
98 | drop 4 | |||
|
99 | ||||
|
100 | ||||
|
101 | echo ==== qnew with HG header | |||
|
102 | hg qnew 5.patch | |||
|
103 | hg qpop | |||
|
104 | echo "# HG changeset patch" >>.hg/patches/5.patch | |||
|
105 | echo "# Date 10 0" >>.hg/patches/5.patch | |||
|
106 | # Drop patch specific error line | |||
|
107 | hg qpush 2>&1 | grep -v garbage | |||
|
108 | catlogd 5 | |||
|
109 | ||||
|
110 | echo ==== hg qref | |||
|
111 | echo "5" >5 | |||
|
112 | hg add | |||
|
113 | hg qref | |||
|
114 | catlogd 5 | |||
|
115 | ||||
|
116 | echo ==== hg qref -d | |||
|
117 | hg qref -d '11 0' | |||
|
118 | catlogd 5 | |||
|
119 | ||||
|
120 | ||||
|
121 | echo ==== qnew -u | |||
|
122 | hg qnew -u jane 6.patch | |||
|
123 | echo "6" >6 | |||
|
124 | hg add | |||
|
125 | hg qref | |||
|
126 | catlog 6 | |||
|
127 | ||||
|
128 | echo ==== qref -d | |||
|
129 | hg qref -d '12 0' | |||
|
130 | catlog 6 | |||
|
131 | ||||
|
132 | drop 6 | |||
|
133 | ||||
|
134 | ||||
|
135 | echo ==== qnew -d | |||
|
136 | hg qnew -d '13 0' 7.patch | |||
|
137 | echo "7" >7 | |||
|
138 | hg add | |||
|
139 | hg qref | |||
|
140 | catlog 7 | |||
|
141 | ||||
|
142 | echo ==== qref -u | |||
|
143 | hg qref -u john | |||
|
144 | catlogd 7 | |||
|
145 | ||||
|
146 | ||||
|
147 | echo ==== qnew | |||
|
148 | hg qnew 8.patch | |||
|
149 | echo "8" >8 | |||
|
150 | hg add | |||
|
151 | hg qref | |||
|
152 | catlog 8 | |||
|
153 | ||||
|
154 | echo ==== qref -u -d | |||
|
155 | hg qref -u john -d '14 0' | |||
|
156 | catlog 8 | |||
|
157 | ||||
|
158 | drop 8 | |||
|
159 | ||||
|
160 | ||||
|
161 | echo ==== qnew -m | |||
|
162 | hg qnew -m "Nine" 9.patch | |||
|
163 | echo "9" >9 | |||
|
164 | hg add | |||
|
165 | hg qref | |||
|
166 | catlog 9 | |||
|
167 | ||||
|
168 | echo ==== qref -u -d | |||
|
169 | hg qref -u john -d '15 0' | |||
|
170 | catlog 9 | |||
|
171 | ||||
|
172 | drop 9 | |||
|
173 | ||||
|
174 | ||||
|
175 | echo ==== "qpop -a / qpush -a" | |||
|
176 | hg qpop -a | |||
|
177 | hg qpush -a | |||
|
178 | hg log --template "{rev}: {desc} - {author} - {date}\n" |
@@ -0,0 +1,287 b'' | |||||
|
1 | ==== init | |||
|
2 | ==== qnew -d | |||
|
3 | # HG changeset patch | |||
|
4 | # Date 3 0 | |||
|
5 | ||||
|
6 | 0: [mq]: 1.patch - test - 3.00 | |||
|
7 | ==== qref | |||
|
8 | adding 1 | |||
|
9 | # HG changeset patch | |||
|
10 | # Date 3 0 | |||
|
11 | ||||
|
12 | diff -r ... 1 | |||
|
13 | --- /dev/null | |||
|
14 | +++ b/1 | |||
|
15 | @@ -0,0 +1,1 @@ | |||
|
16 | +1 | |||
|
17 | 0: [mq]: 1.patch - test - 3.00 | |||
|
18 | ==== qref -d | |||
|
19 | # HG changeset patch | |||
|
20 | # Date 4 0 | |||
|
21 | ||||
|
22 | diff -r ... 1 | |||
|
23 | --- /dev/null | |||
|
24 | +++ b/1 | |||
|
25 | @@ -0,0 +1,1 @@ | |||
|
26 | +1 | |||
|
27 | 0: [mq]: 1.patch - test - 4.00 | |||
|
28 | ==== qnew | |||
|
29 | adding 2 | |||
|
30 | diff -r ... 2 | |||
|
31 | --- /dev/null | |||
|
32 | +++ b/2 | |||
|
33 | @@ -0,0 +1,1 @@ | |||
|
34 | +2 | |||
|
35 | 1: [mq]: 2.patch - test | |||
|
36 | 0: [mq]: 1.patch - test | |||
|
37 | ==== qref -d | |||
|
38 | diff -r ... 2 | |||
|
39 | --- /dev/null | |||
|
40 | +++ b/2 | |||
|
41 | @@ -0,0 +1,1 @@ | |||
|
42 | +2 | |||
|
43 | 1: [mq]: 2.patch - test | |||
|
44 | 0: [mq]: 1.patch - test | |||
|
45 | Now at: 1.patch | |||
|
46 | ==== qnew -d -m | |||
|
47 | # HG changeset patch | |||
|
48 | # Date 6 0 | |||
|
49 | ||||
|
50 | Three | |||
|
51 | 1: Three - test - 6.00 | |||
|
52 | 0: [mq]: 1.patch - test - 4.00 | |||
|
53 | ==== qref | |||
|
54 | adding 3 | |||
|
55 | # HG changeset patch | |||
|
56 | # Date 6 0 | |||
|
57 | ||||
|
58 | Three | |||
|
59 | ||||
|
60 | diff -r ... 3 | |||
|
61 | --- /dev/null | |||
|
62 | +++ b/3 | |||
|
63 | @@ -0,0 +1,1 @@ | |||
|
64 | +3 | |||
|
65 | 1: Three - test - 6.00 | |||
|
66 | 0: [mq]: 1.patch - test - 4.00 | |||
|
67 | ==== qref -m | |||
|
68 | # HG changeset patch | |||
|
69 | # Date 6 0 | |||
|
70 | ||||
|
71 | Drei | |||
|
72 | ||||
|
73 | diff -r ... 3 | |||
|
74 | --- /dev/null | |||
|
75 | +++ b/3 | |||
|
76 | @@ -0,0 +1,1 @@ | |||
|
77 | +3 | |||
|
78 | 1: Drei - test - 6.00 | |||
|
79 | 0: [mq]: 1.patch - test - 4.00 | |||
|
80 | ==== qref -d | |||
|
81 | # HG changeset patch | |||
|
82 | # Date 7 0 | |||
|
83 | ||||
|
84 | Drei | |||
|
85 | ||||
|
86 | diff -r ... 3 | |||
|
87 | --- /dev/null | |||
|
88 | +++ b/3 | |||
|
89 | @@ -0,0 +1,1 @@ | |||
|
90 | +3 | |||
|
91 | 1: Drei - test - 7.00 | |||
|
92 | 0: [mq]: 1.patch - test - 4.00 | |||
|
93 | ==== qref -d -m | |||
|
94 | # HG changeset patch | |||
|
95 | # Date 8 0 | |||
|
96 | ||||
|
97 | Three (again) | |||
|
98 | ||||
|
99 | diff -r ... 3 | |||
|
100 | --- /dev/null | |||
|
101 | +++ b/3 | |||
|
102 | @@ -0,0 +1,1 @@ | |||
|
103 | +3 | |||
|
104 | 1: Three (again) - test - 8.00 | |||
|
105 | 0: [mq]: 1.patch - test - 4.00 | |||
|
106 | ==== qnew -m | |||
|
107 | adding 4 | |||
|
108 | Four | |||
|
109 | ||||
|
110 | diff -r ... 4 | |||
|
111 | --- /dev/null | |||
|
112 | +++ b/4 | |||
|
113 | @@ -0,0 +1,1 @@ | |||
|
114 | +4 | |||
|
115 | 2: Four - test | |||
|
116 | 1: Three (again) - test | |||
|
117 | 0: [mq]: 1.patch - test | |||
|
118 | ==== qref -d | |||
|
119 | Four | |||
|
120 | ||||
|
121 | diff -r ... 4 | |||
|
122 | --- /dev/null | |||
|
123 | +++ b/4 | |||
|
124 | @@ -0,0 +1,1 @@ | |||
|
125 | +4 | |||
|
126 | 2: Four - test | |||
|
127 | 1: Three (again) - test | |||
|
128 | 0: [mq]: 1.patch - test | |||
|
129 | Now at: 3.patch | |||
|
130 | ==== qnew with HG header | |||
|
131 | Now at: 3.patch | |||
|
132 | applying 5.patch | |||
|
133 | patch failed, unable to continue (try -v) | |||
|
134 | patch 5.patch is empty | |||
|
135 | Now at: 5.patch | |||
|
136 | # HG changeset patch | |||
|
137 | # Date 10 0 | |||
|
138 | 2: imported patch 5.patch - test - 10.00 | |||
|
139 | 1: Three (again) - test - 8.00 | |||
|
140 | 0: [mq]: 1.patch - test - 4.00 | |||
|
141 | ==== hg qref | |||
|
142 | adding 5 | |||
|
143 | # HG changeset patch | |||
|
144 | # Date 10 0 | |||
|
145 | ||||
|
146 | diff -r ... 5 | |||
|
147 | --- /dev/null | |||
|
148 | +++ b/5 | |||
|
149 | @@ -0,0 +1,1 @@ | |||
|
150 | +5 | |||
|
151 | 2: [mq]: 5.patch - test - 10.00 | |||
|
152 | 1: Three (again) - test - 8.00 | |||
|
153 | 0: [mq]: 1.patch - test - 4.00 | |||
|
154 | ==== hg qref -d | |||
|
155 | # HG changeset patch | |||
|
156 | # Date 11 0 | |||
|
157 | ||||
|
158 | diff -r ... 5 | |||
|
159 | --- /dev/null | |||
|
160 | +++ b/5 | |||
|
161 | @@ -0,0 +1,1 @@ | |||
|
162 | +5 | |||
|
163 | 2: [mq]: 5.patch - test - 11.00 | |||
|
164 | 1: Three (again) - test - 8.00 | |||
|
165 | 0: [mq]: 1.patch - test - 4.00 | |||
|
166 | ==== qnew -u | |||
|
167 | adding 6 | |||
|
168 | From: jane | |||
|
169 | ||||
|
170 | diff -r ... 6 | |||
|
171 | --- /dev/null | |||
|
172 | +++ b/6 | |||
|
173 | @@ -0,0 +1,1 @@ | |||
|
174 | +6 | |||
|
175 | 3: [mq]: 6.patch - jane | |||
|
176 | 2: [mq]: 5.patch - test | |||
|
177 | 1: Three (again) - test | |||
|
178 | 0: [mq]: 1.patch - test | |||
|
179 | ==== qref -d | |||
|
180 | From: jane | |||
|
181 | ||||
|
182 | diff -r ... 6 | |||
|
183 | --- /dev/null | |||
|
184 | +++ b/6 | |||
|
185 | @@ -0,0 +1,1 @@ | |||
|
186 | +6 | |||
|
187 | 3: [mq]: 6.patch - jane | |||
|
188 | 2: [mq]: 5.patch - test | |||
|
189 | 1: Three (again) - test | |||
|
190 | 0: [mq]: 1.patch - test | |||
|
191 | Now at: 5.patch | |||
|
192 | ==== qnew -d | |||
|
193 | adding 7 | |||
|
194 | # HG changeset patch | |||
|
195 | # Date 13 0 | |||
|
196 | ||||
|
197 | diff -r ... 7 | |||
|
198 | --- /dev/null | |||
|
199 | +++ b/7 | |||
|
200 | @@ -0,0 +1,1 @@ | |||
|
201 | +7 | |||
|
202 | 3: [mq]: 7.patch - test | |||
|
203 | 2: [mq]: 5.patch - test | |||
|
204 | 1: Three (again) - test | |||
|
205 | 0: [mq]: 1.patch - test | |||
|
206 | ==== qref -u | |||
|
207 | # HG changeset patch | |||
|
208 | # User john | |||
|
209 | # Date 13 0 | |||
|
210 | ||||
|
211 | diff -r ... 7 | |||
|
212 | --- /dev/null | |||
|
213 | +++ b/7 | |||
|
214 | @@ -0,0 +1,1 @@ | |||
|
215 | +7 | |||
|
216 | 3: [mq]: 7.patch - john - 13.00 | |||
|
217 | 2: [mq]: 5.patch - test - 11.00 | |||
|
218 | 1: Three (again) - test - 8.00 | |||
|
219 | 0: [mq]: 1.patch - test - 4.00 | |||
|
220 | ==== qnew | |||
|
221 | adding 8 | |||
|
222 | diff -r ... 8 | |||
|
223 | --- /dev/null | |||
|
224 | +++ b/8 | |||
|
225 | @@ -0,0 +1,1 @@ | |||
|
226 | +8 | |||
|
227 | 4: [mq]: 8.patch - test | |||
|
228 | 3: [mq]: 7.patch - john | |||
|
229 | 2: [mq]: 5.patch - test | |||
|
230 | 1: Three (again) - test | |||
|
231 | 0: [mq]: 1.patch - test | |||
|
232 | ==== qref -u -d | |||
|
233 | From: john | |||
|
234 | ||||
|
235 | ||||
|
236 | diff -r ... 8 | |||
|
237 | --- /dev/null | |||
|
238 | +++ b/8 | |||
|
239 | @@ -0,0 +1,1 @@ | |||
|
240 | +8 | |||
|
241 | 4: [mq]: 8.patch - john | |||
|
242 | 3: [mq]: 7.patch - john | |||
|
243 | 2: [mq]: 5.patch - test | |||
|
244 | 1: Three (again) - test | |||
|
245 | 0: [mq]: 1.patch - test | |||
|
246 | Now at: 7.patch | |||
|
247 | ==== qnew -m | |||
|
248 | adding 9 | |||
|
249 | Nine | |||
|
250 | ||||
|
251 | diff -r ... 9 | |||
|
252 | --- /dev/null | |||
|
253 | +++ b/9 | |||
|
254 | @@ -0,0 +1,1 @@ | |||
|
255 | +9 | |||
|
256 | 4: Nine - test | |||
|
257 | 3: [mq]: 7.patch - john | |||
|
258 | 2: [mq]: 5.patch - test | |||
|
259 | 1: Three (again) - test | |||
|
260 | 0: [mq]: 1.patch - test | |||
|
261 | ==== qref -u -d | |||
|
262 | From: john | |||
|
263 | ||||
|
264 | Nine | |||
|
265 | ||||
|
266 | diff -r ... 9 | |||
|
267 | --- /dev/null | |||
|
268 | +++ b/9 | |||
|
269 | @@ -0,0 +1,1 @@ | |||
|
270 | +9 | |||
|
271 | 4: Nine - john | |||
|
272 | 3: [mq]: 7.patch - john | |||
|
273 | 2: [mq]: 5.patch - test | |||
|
274 | 1: Three (again) - test | |||
|
275 | 0: [mq]: 1.patch - test | |||
|
276 | Now at: 7.patch | |||
|
277 | ==== qpop -a / qpush -a | |||
|
278 | Patch queue now empty | |||
|
279 | applying 1.patch | |||
|
280 | applying 3.patch | |||
|
281 | applying 5.patch | |||
|
282 | applying 7.patch | |||
|
283 | Now at: 7.patch | |||
|
284 | 3: imported patch 7.patch - john - 13.00 | |||
|
285 | 2: imported patch 5.patch - test - 11.00 | |||
|
286 | 1: Three (again) - test - 8.00 | |||
|
287 | 0: imported patch 1.patch - test - 4.00 |
@@ -604,6 +604,7 b' class queue:' | |||||
604 | msg = opts.get('msg') |
|
604 | msg = opts.get('msg') | |
605 | force = opts.get('force') |
|
605 | force = opts.get('force') | |
606 | user = opts.get('user') |
|
606 | user = opts.get('user') | |
|
607 | date = opts.get('date') | |||
607 | if os.path.exists(self.join(patch)): |
|
608 | if os.path.exists(self.join(patch)): | |
608 | raise util.Abort(_('patch "%s" already exists') % patch) |
|
609 | raise util.Abort(_('patch "%s" already exists') % patch) | |
609 | if opts.get('include') or opts.get('exclude') or pats: |
|
610 | if opts.get('include') or opts.get('exclude') or pats: | |
@@ -618,7 +619,7 b' class queue:' | |||||
618 | try: |
|
619 | try: | |
619 | insert = self.full_series_end() |
|
620 | insert = self.full_series_end() | |
620 | commitmsg = msg and msg or ("[mq]: %s" % patch) |
|
621 | commitmsg = msg and msg or ("[mq]: %s" % patch) | |
621 | n = repo.commit(commitfiles, commitmsg, user, match=match, force=True) |
|
622 | n = repo.commit(commitfiles, commitmsg, user, date, match=match, force=True) | |
622 | if n == None: |
|
623 | if n == None: | |
623 | raise util.Abort(_("repo commit failed")) |
|
624 | raise util.Abort(_("repo commit failed")) | |
624 | self.full_series[insert:insert] = [patch] |
|
625 | self.full_series[insert:insert] = [patch] | |
@@ -627,8 +628,15 b' class queue:' | |||||
627 | self.series_dirty = 1 |
|
628 | self.series_dirty = 1 | |
628 | self.applied_dirty = 1 |
|
629 | self.applied_dirty = 1 | |
629 | p = self.opener(patch, "w") |
|
630 | p = self.opener(patch, "w") | |
630 |
if |
|
631 | if date: | |
631 |
p.write(" |
|
632 | p.write("# HG changeset patch\n") | |
|
633 | if user: | |||
|
634 | p.write("# User " + user + "\n") | |||
|
635 | p.write("# Date " + date + "\n") | |||
|
636 | p.write("\n") | |||
|
637 | elif user: | |||
|
638 | p.write("From: " + user + "\n") | |||
|
639 | p.write("\n") | |||
632 | if msg: |
|
640 | if msg: | |
633 | msg = msg + "\n" |
|
641 | msg = msg + "\n" | |
634 | p.write(msg) |
|
642 | p.write(msg) | |
@@ -949,21 +957,33 b' class queue:' | |||||
949 | ci += 1 |
|
957 | ci += 1 | |
950 | del comments[ci] |
|
958 | del comments[ci] | |
951 |
|
959 | |||
|
960 | def setheaderfield(comments, prefixes, new): | |||
|
961 | # Update all references to a field in the patch header. | |||
|
962 | # If none found, add it email style. | |||
|
963 | res = False | |||
|
964 | for prefix in prefixes: | |||
|
965 | for i in xrange(len(comments)): | |||
|
966 | if comments[i].startswith(prefix): | |||
|
967 | comments[i] = prefix + new | |||
|
968 | res = True | |||
|
969 | break | |||
|
970 | return res | |||
|
971 | ||||
952 | newuser = opts.get('user') |
|
972 | newuser = opts.get('user') | |
953 | if newuser: |
|
973 | if newuser: | |
954 | # Update all references to a user in the patch header. |
|
974 | if not setheaderfield(comments, ['From: ', '# User '], newuser): | |
955 | # If none found, add "From: " header. |
|
975 | try: | |
956 | needfrom = True |
|
976 | patchheaderat = comments.index('# HG changeset patch') | |
957 | for prefix in ['# User ', 'From: ']: |
|
977 | comments.insert(patchheaderat + 1,'# User ' + newuser) | |
958 | for i in xrange(len(comments)): |
|
978 | except ValueError: | |
959 | if comments[i].startswith(prefix): |
|
979 | comments = ['From: ' + newuser, ''] + comments | |
960 | comments[i] = prefix + newuser |
|
|||
961 | needfrom = False |
|
|||
962 | break |
|
|||
963 | if needfrom: |
|
|||
964 | comments = ['From: ' + newuser, ''] + comments |
|
|||
965 | user = newuser |
|
980 | user = newuser | |
966 |
|
981 | |||
|
982 | newdate = opts.get('date') | |||
|
983 | if newdate: | |||
|
984 | if setheaderfield(comments, ['# Date '], newdate): | |||
|
985 | date = newdate | |||
|
986 | ||||
967 | if msg: |
|
987 | if msg: | |
968 | comments.append(msg) |
|
988 | comments.append(msg) | |
969 |
|
989 | |||
@@ -1094,7 +1114,7 b' class queue:' | |||||
1094 |
|
1114 | |||
1095 | self.strip(repo, top, update=False, |
|
1115 | self.strip(repo, top, update=False, | |
1096 | backup='strip') |
|
1116 | backup='strip') | |
1097 | n = repo.commit(filelist, message, user, match=matchfn, |
|
1117 | n = repo.commit(filelist, message, user, date, match=matchfn, | |
1098 | force=1) |
|
1118 | force=1) | |
1099 | self.applied[-1] = statusentry(revlog.hex(n), patchfn) |
|
1119 | self.applied[-1] = statusentry(revlog.hex(n), patchfn) | |
1100 | self.applied_dirty = 1 |
|
1120 | self.applied_dirty = 1 | |
@@ -1632,6 +1652,7 b' def setupheaderopts(ui, opts):' | |||||
1632 | if not opts[opt] and opts['current' + opt]: |
|
1652 | if not opts[opt] and opts['current' + opt]: | |
1633 | opts[opt] = val |
|
1653 | opts[opt] = val | |
1634 | do('user', ui.username()) |
|
1654 | do('user', ui.username()) | |
|
1655 | do('date', "%d %d" % util.makedate()) | |||
1635 |
|
1656 | |||
1636 | def new(ui, repo, patch, *args, **opts): |
|
1657 | def new(ui, repo, patch, *args, **opts): | |
1637 | """create a new patch |
|
1658 | """create a new patch | |
@@ -2170,7 +2191,9 b" seriesopts = [('s', 'summary', None, _('" | |||||
2170 |
|
2191 | |||
2171 | headeropts = [ |
|
2192 | headeropts = [ | |
2172 | ('U', 'currentuser', None, _('add "From: <current user>" to patch')), |
|
2193 | ('U', 'currentuser', None, _('add "From: <current user>" to patch')), | |
2173 |
('u', 'user', '', _('add "From: <given user>" to patch')) |
|
2194 | ('u', 'user', '', _('add "From: <given user>" to patch')), | |
|
2195 | ('D', 'currentdate', None, _('add "Date: <current date>" to patch')), | |||
|
2196 | ('d', 'date', '', _('add "Date: <given date>" to patch'))] | |||
2174 |
|
2197 | |||
2175 | cmdtable = { |
|
2198 | cmdtable = { | |
2176 | "qapplied": (applied, [] + seriesopts, _('hg qapplied [-s] [PATCH]')), |
|
2199 | "qapplied": (applied, [] + seriesopts, _('hg qapplied [-s] [PATCH]')), |
General Comments 0
You need to be logged in to leave comments.
Login now