Show More
@@ -1,304 +1,359 b'' | |||
|
1 | 1 | Create configuration |
|
2 | 2 | |
|
3 | 3 | $ echo "[ui]" >> $HGRCPATH |
|
4 | 4 | $ echo "interactive=true" >> $HGRCPATH |
|
5 | ||
|
6 | help record (no record) | |
|
7 | ||
|
8 | $ hg help record | |
|
9 | record extension - commands to interactively select changes for commit/qrefresh | |
|
10 | ||
|
11 | use "hg help extensions" for information on enabling extensions | |
|
12 | ||
|
5 | 13 | $ echo "[extensions]" >> $HGRCPATH |
|
6 | 14 | $ echo "record=" >> $HGRCPATH |
|
7 | 15 | |
|
16 | help record (record) | |
|
17 | ||
|
18 | $ hg help record | |
|
19 | hg record [OPTION]... [FILE]... | |
|
20 | ||
|
21 | interactively select changes to commit | |
|
22 | ||
|
23 | If a list of files is omitted, all changes reported by "hg status" will be | |
|
24 | candidates for recording. | |
|
25 | ||
|
26 | See "hg help dates" for a list of formats valid for -d/--date. | |
|
27 | ||
|
28 | You will be prompted for whether to record changes to each modified file, | |
|
29 | and for files with multiple changes, for each change to use. For each | |
|
30 | query, the following responses are possible: | |
|
31 | ||
|
32 | y - record this change | |
|
33 | n - skip this change | |
|
34 | ||
|
35 | s - skip remaining changes to this file | |
|
36 | f - record remaining changes to this file | |
|
37 | ||
|
38 | d - done, skip remaining changes and files | |
|
39 | a - record all changes to all remaining files | |
|
40 | q - quit, recording no changes | |
|
41 | ||
|
42 | ? - display help | |
|
43 | ||
|
44 | This command is not available when committing a merge. | |
|
45 | ||
|
46 | options: | |
|
47 | ||
|
48 | -A --addremove mark new/missing files as added/removed before | |
|
49 | committing | |
|
50 | --close-branch mark a branch as closed, hiding it from the branch | |
|
51 | list | |
|
52 | -I --include PATTERN [+] include names matching the given patterns | |
|
53 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
|
54 | -m --message TEXT use text as commit message | |
|
55 | -l --logfile FILE read commit message from file | |
|
56 | -d --date DATE record datecode as commit date | |
|
57 | -u --user USER record the specified user as committer | |
|
58 | ||
|
59 | [+] marked option can be specified multiple times | |
|
60 | ||
|
61 | use "hg -v help record" to show global options | |
|
62 | ||
|
8 | 63 | help (no mq, so no qrecord) |
|
9 | 64 | |
|
10 | 65 | $ hg help qrecord |
|
11 | 66 | hg: unknown command 'qrecord' |
|
12 | 67 | Mercurial Distributed SCM |
|
13 | 68 | |
|
14 | 69 | basic commands: |
|
15 | 70 | |
|
16 | 71 | add add the specified files on the next commit |
|
17 | 72 | annotate show changeset information by line for each file |
|
18 | 73 | clone make a copy of an existing repository |
|
19 | 74 | commit commit the specified files or all outstanding changes |
|
20 | 75 | diff diff repository (or selected files) |
|
21 | 76 | export dump the header and diffs for one or more changesets |
|
22 | 77 | forget forget the specified files on the next commit |
|
23 | 78 | init create a new repository in the given directory |
|
24 | 79 | log show revision history of entire repository or files |
|
25 | 80 | merge merge working directory with another revision |
|
26 | 81 | pull pull changes from the specified source |
|
27 | 82 | push push changes to the specified destination |
|
28 | 83 | remove remove the specified files on the next commit |
|
29 | 84 | serve start stand-alone webserver |
|
30 | 85 | status show changed files in the working directory |
|
31 | 86 | summary summarize working directory state |
|
32 | 87 | update update working directory (or switch revisions) |
|
33 | 88 | |
|
34 | 89 | use "hg help" for the full list of commands or "hg -v" for details |
|
35 | 90 | [255] |
|
36 | 91 | |
|
37 | 92 | help (mq present) |
|
38 | 93 | |
|
39 | 94 | $ echo "mq=" >> $HGRCPATH |
|
40 | 95 | $ hg help qrecord |
|
41 | 96 | hg qrecord [OPTION]... PATCH [FILE]... |
|
42 | 97 | |
|
43 | 98 | interactively record a new patch |
|
44 | 99 | |
|
45 | 100 | See "hg help qnew" & "hg help record" for more information and usage. |
|
46 | 101 | |
|
47 | 102 | options: |
|
48 | 103 | |
|
49 | 104 | -e --edit edit commit message |
|
50 | 105 | -g --git use git extended diff format |
|
51 | 106 | -U --currentuser add "From: <current user>" to patch |
|
52 | 107 | -u --user USER add "From: <USER>" to patch |
|
53 | 108 | -D --currentdate add "Date: <current date>" to patch |
|
54 | 109 | -d --date DATE add "Date: <DATE>" to patch |
|
55 | 110 | -I --include PATTERN [+] include names matching the given patterns |
|
56 | 111 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
57 | 112 | -m --message TEXT use text as commit message |
|
58 | 113 | -l --logfile FILE read commit message from file |
|
59 | 114 | |
|
60 | 115 | [+] marked option can be specified multiple times |
|
61 | 116 | |
|
62 | 117 | use "hg -v help qrecord" to show global options |
|
63 | 118 | |
|
64 | 119 | $ hg init a |
|
65 | 120 | $ cd a |
|
66 | 121 | |
|
67 | 122 | Base commit |
|
68 | 123 | |
|
69 | 124 | $ cat > 1.txt <<EOF |
|
70 | 125 | > 1 |
|
71 | 126 | > 2 |
|
72 | 127 | > 3 |
|
73 | 128 | > 4 |
|
74 | 129 | > 5 |
|
75 | 130 | > EOF |
|
76 | 131 | $ cat > 2.txt <<EOF |
|
77 | 132 | > a |
|
78 | 133 | > b |
|
79 | 134 | > c |
|
80 | 135 | > d |
|
81 | 136 | > e |
|
82 | 137 | > f |
|
83 | 138 | > EOF |
|
84 | 139 | |
|
85 | 140 | $ mkdir dir |
|
86 | 141 | $ cat > dir/a.txt <<EOF |
|
87 | 142 | > hello world |
|
88 | 143 | > |
|
89 | 144 | > someone |
|
90 | 145 | > up |
|
91 | 146 | > there |
|
92 | 147 | > loves |
|
93 | 148 | > me |
|
94 | 149 | > EOF |
|
95 | 150 | |
|
96 | 151 | $ hg add 1.txt 2.txt dir/a.txt |
|
97 | 152 | $ hg commit -m 'initial checkin' |
|
98 | 153 | |
|
99 | 154 | Changing files |
|
100 | 155 | |
|
101 | 156 | $ sed -e 's/2/2 2/;s/4/4 4/' 1.txt > 1.txt.new |
|
102 | 157 | $ sed -e 's/b/b b/' 2.txt > 2.txt.new |
|
103 | 158 | $ sed -e 's/hello world/hello world!/' dir/a.txt > dir/a.txt.new |
|
104 | 159 | |
|
105 | 160 | $ mv -f 1.txt.new 1.txt |
|
106 | 161 | $ mv -f 2.txt.new 2.txt |
|
107 | 162 | $ mv -f dir/a.txt.new dir/a.txt |
|
108 | 163 | |
|
109 | 164 | Whole diff |
|
110 | 165 | |
|
111 | 166 | $ hg diff --nodates |
|
112 | 167 | diff -r 1057167b20ef 1.txt |
|
113 | 168 | --- a/1.txt |
|
114 | 169 | +++ b/1.txt |
|
115 | 170 | @@ -1,5 +1,5 @@ |
|
116 | 171 | 1 |
|
117 | 172 | -2 |
|
118 | 173 | +2 2 |
|
119 | 174 | 3 |
|
120 | 175 | -4 |
|
121 | 176 | +4 4 |
|
122 | 177 | 5 |
|
123 | 178 | diff -r 1057167b20ef 2.txt |
|
124 | 179 | --- a/2.txt |
|
125 | 180 | +++ b/2.txt |
|
126 | 181 | @@ -1,5 +1,5 @@ |
|
127 | 182 | a |
|
128 | 183 | -b |
|
129 | 184 | +b b |
|
130 | 185 | c |
|
131 | 186 | d |
|
132 | 187 | e |
|
133 | 188 | diff -r 1057167b20ef dir/a.txt |
|
134 | 189 | --- a/dir/a.txt |
|
135 | 190 | +++ b/dir/a.txt |
|
136 | 191 | @@ -1,4 +1,4 @@ |
|
137 | 192 | -hello world |
|
138 | 193 | +hello world! |
|
139 | 194 | |
|
140 | 195 | someone |
|
141 | 196 | up |
|
142 | 197 | |
|
143 | 198 | qrecord a.patch |
|
144 | 199 | |
|
145 | 200 | $ hg qrecord -d '0 0' -m aaa a.patch <<EOF |
|
146 | 201 | > y |
|
147 | 202 | > y |
|
148 | 203 | > n |
|
149 | 204 | > y |
|
150 | 205 | > y |
|
151 | 206 | > n |
|
152 | 207 | > EOF |
|
153 | 208 | diff --git a/1.txt b/1.txt |
|
154 | 209 | 2 hunks, 2 lines changed |
|
155 | 210 | examine changes to '1.txt'? [Ynsfdaq?] |
|
156 | 211 | @@ -1,3 +1,3 @@ |
|
157 | 212 | 1 |
|
158 | 213 | -2 |
|
159 | 214 | +2 2 |
|
160 | 215 | 3 |
|
161 | 216 | record change 1/4 to '1.txt'? [Ynsfdaq?] |
|
162 | 217 | @@ -3,3 +3,3 @@ |
|
163 | 218 | 3 |
|
164 | 219 | -4 |
|
165 | 220 | +4 4 |
|
166 | 221 | 5 |
|
167 | 222 | record change 2/4 to '1.txt'? [Ynsfdaq?] |
|
168 | 223 | diff --git a/2.txt b/2.txt |
|
169 | 224 | 1 hunks, 1 lines changed |
|
170 | 225 | examine changes to '2.txt'? [Ynsfdaq?] |
|
171 | 226 | @@ -1,5 +1,5 @@ |
|
172 | 227 | a |
|
173 | 228 | -b |
|
174 | 229 | +b b |
|
175 | 230 | c |
|
176 | 231 | d |
|
177 | 232 | e |
|
178 | 233 | record change 3/4 to '2.txt'? [Ynsfdaq?] |
|
179 | 234 | diff --git a/dir/a.txt b/dir/a.txt |
|
180 | 235 | 1 hunks, 1 lines changed |
|
181 | 236 | examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
182 | 237 | |
|
183 | 238 | After qrecord a.patch 'tip'" |
|
184 | 239 | |
|
185 | 240 | $ hg tip -p |
|
186 | 241 | changeset: 1:5d1ca63427ee |
|
187 | 242 | tag: a.patch |
|
188 | 243 | tag: qbase |
|
189 | 244 | tag: qtip |
|
190 | 245 | tag: tip |
|
191 | 246 | user: test |
|
192 | 247 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
193 | 248 | summary: aaa |
|
194 | 249 | |
|
195 | 250 | diff -r 1057167b20ef -r 5d1ca63427ee 1.txt |
|
196 | 251 | --- a/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
197 | 252 | +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
198 | 253 | @@ -1,5 +1,5 @@ |
|
199 | 254 | 1 |
|
200 | 255 | -2 |
|
201 | 256 | +2 2 |
|
202 | 257 | 3 |
|
203 | 258 | 4 |
|
204 | 259 | 5 |
|
205 | 260 | diff -r 1057167b20ef -r 5d1ca63427ee 2.txt |
|
206 | 261 | --- a/2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
207 | 262 | +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000 |
|
208 | 263 | @@ -1,5 +1,5 @@ |
|
209 | 264 | a |
|
210 | 265 | -b |
|
211 | 266 | +b b |
|
212 | 267 | c |
|
213 | 268 | d |
|
214 | 269 | e |
|
215 | 270 | |
|
216 | 271 | |
|
217 | 272 | After qrecord a.patch 'diff'" |
|
218 | 273 | |
|
219 | 274 | $ hg diff --nodates |
|
220 | 275 | diff -r 5d1ca63427ee 1.txt |
|
221 | 276 | --- a/1.txt |
|
222 | 277 | +++ b/1.txt |
|
223 | 278 | @@ -1,5 +1,5 @@ |
|
224 | 279 | 1 |
|
225 | 280 | 2 2 |
|
226 | 281 | 3 |
|
227 | 282 | -4 |
|
228 | 283 | +4 4 |
|
229 | 284 | 5 |
|
230 | 285 | diff -r 5d1ca63427ee dir/a.txt |
|
231 | 286 | --- a/dir/a.txt |
|
232 | 287 | +++ b/dir/a.txt |
|
233 | 288 | @@ -1,4 +1,4 @@ |
|
234 | 289 | -hello world |
|
235 | 290 | +hello world! |
|
236 | 291 | |
|
237 | 292 | someone |
|
238 | 293 | up |
|
239 | 294 | |
|
240 | 295 | qrecord b.patch |
|
241 | 296 | |
|
242 | 297 | $ hg qrecord -d '0 0' -m bbb b.patch <<EOF |
|
243 | 298 | > y |
|
244 | 299 | > y |
|
245 | 300 | > y |
|
246 | 301 | > y |
|
247 | 302 | > EOF |
|
248 | 303 | diff --git a/1.txt b/1.txt |
|
249 | 304 | 1 hunks, 1 lines changed |
|
250 | 305 | examine changes to '1.txt'? [Ynsfdaq?] |
|
251 | 306 | @@ -1,5 +1,5 @@ |
|
252 | 307 | 1 |
|
253 | 308 | 2 2 |
|
254 | 309 | 3 |
|
255 | 310 | -4 |
|
256 | 311 | +4 4 |
|
257 | 312 | 5 |
|
258 | 313 | record change 1/2 to '1.txt'? [Ynsfdaq?] |
|
259 | 314 | diff --git a/dir/a.txt b/dir/a.txt |
|
260 | 315 | 1 hunks, 1 lines changed |
|
261 | 316 | examine changes to 'dir/a.txt'? [Ynsfdaq?] |
|
262 | 317 | @@ -1,4 +1,4 @@ |
|
263 | 318 | -hello world |
|
264 | 319 | +hello world! |
|
265 | 320 | |
|
266 | 321 | someone |
|
267 | 322 | up |
|
268 | 323 | record change 2/2 to 'dir/a.txt'? [Ynsfdaq?] |
|
269 | 324 | |
|
270 | 325 | After qrecord b.patch 'tip' |
|
271 | 326 | |
|
272 | 327 | $ hg tip -p |
|
273 | 328 | changeset: 2:b056198bf878 |
|
274 | 329 | tag: b.patch |
|
275 | 330 | tag: qtip |
|
276 | 331 | tag: tip |
|
277 | 332 | user: test |
|
278 | 333 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
279 | 334 | summary: bbb |
|
280 | 335 | |
|
281 | 336 | diff -r 5d1ca63427ee -r b056198bf878 1.txt |
|
282 | 337 | --- a/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
283 | 338 | +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000 |
|
284 | 339 | @@ -1,5 +1,5 @@ |
|
285 | 340 | 1 |
|
286 | 341 | 2 2 |
|
287 | 342 | 3 |
|
288 | 343 | -4 |
|
289 | 344 | +4 4 |
|
290 | 345 | 5 |
|
291 | 346 | diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt |
|
292 | 347 | --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000 |
|
293 | 348 | +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000 |
|
294 | 349 | @@ -1,4 +1,4 @@ |
|
295 | 350 | -hello world |
|
296 | 351 | +hello world! |
|
297 | 352 | |
|
298 | 353 | someone |
|
299 | 354 | up |
|
300 | 355 | |
|
301 | 356 | |
|
302 | 357 | After qrecord b.patch 'diff' |
|
303 | 358 | |
|
304 | 359 | $ hg diff --nodates |
General Comments 0
You need to be logged in to leave comments.
Login now