##// END OF EJS Templates
record: remove superfluous space
timeless@mozdev.org -
r9461:cec9fb4e default
parent child Browse files
Show More
@@ -1,551 +1,551
1 1 # record.py
2 2 #
3 3 # Copyright 2007 Bryan O'Sullivan <bos@serpentine.com>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2, incorporated herein by reference.
7 7
8 8 '''commands to interactively select changes for commit/qrefresh'''
9 9
10 10 from mercurial.i18n import gettext, _
11 11 from mercurial import cmdutil, commands, extensions, hg, mdiff, patch
12 12 from mercurial import util
13 13 import copy, cStringIO, errno, operator, os, re, tempfile
14 14
15 15 lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
16 16
17 17 def scanpatch(fp):
18 18 """like patch.iterhunks, but yield different events
19 19
20 20 - ('file', [header_lines + fromfile + tofile])
21 21 - ('context', [context_lines])
22 22 - ('hunk', [hunk_lines])
23 23 - ('range', (-start,len, +start,len, diffp))
24 24 """
25 25 lr = patch.linereader(fp)
26 26
27 27 def scanwhile(first, p):
28 28 """scan lr while predicate holds"""
29 29 lines = [first]
30 30 while True:
31 31 line = lr.readline()
32 32 if not line:
33 33 break
34 34 if p(line):
35 35 lines.append(line)
36 36 else:
37 37 lr.push(line)
38 38 break
39 39 return lines
40 40
41 41 while True:
42 42 line = lr.readline()
43 43 if not line:
44 44 break
45 45 if line.startswith('diff --git a/'):
46 46 def notheader(line):
47 47 s = line.split(None, 1)
48 48 return not s or s[0] not in ('---', 'diff')
49 49 header = scanwhile(line, notheader)
50 50 fromfile = lr.readline()
51 51 if fromfile.startswith('---'):
52 52 tofile = lr.readline()
53 53 header += [fromfile, tofile]
54 54 else:
55 55 lr.push(fromfile)
56 56 yield 'file', header
57 57 elif line[0] == ' ':
58 58 yield 'context', scanwhile(line, lambda l: l[0] in ' \\')
59 59 elif line[0] in '-+':
60 60 yield 'hunk', scanwhile(line, lambda l: l[0] in '-+\\')
61 61 else:
62 62 m = lines_re.match(line)
63 63 if m:
64 64 yield 'range', m.groups()
65 65 else:
66 66 raise patch.PatchError('unknown patch content: %r' % line)
67 67
68 68 class header(object):
69 69 """patch header
70 70
71 71 XXX shoudn't we move this to mercurial/patch.py ?
72 72 """
73 73 diff_re = re.compile('diff --git a/(.*) b/(.*)$')
74 74 allhunks_re = re.compile('(?:index|new file|deleted file) ')
75 75 pretty_re = re.compile('(?:new file|deleted file) ')
76 76 special_re = re.compile('(?:index|new|deleted|copy|rename) ')
77 77
78 78 def __init__(self, header):
79 79 self.header = header
80 80 self.hunks = []
81 81
82 82 def binary(self):
83 83 for h in self.header:
84 84 if h.startswith('index '):
85 85 return True
86 86
87 87 def pretty(self, fp):
88 88 for h in self.header:
89 89 if h.startswith('index '):
90 90 fp.write(_('this modifies a binary file (all or nothing)\n'))
91 91 break
92 92 if self.pretty_re.match(h):
93 93 fp.write(h)
94 94 if self.binary():
95 95 fp.write(_('this is a binary file\n'))
96 96 break
97 97 if h.startswith('---'):
98 98 fp.write(_('%d hunks, %d lines changed\n') %
99 99 (len(self.hunks),
100 100 sum([h.added + h.removed for h in self.hunks])))
101 101 break
102 102 fp.write(h)
103 103
104 104 def write(self, fp):
105 105 fp.write(''.join(self.header))
106 106
107 107 def allhunks(self):
108 108 for h in self.header:
109 109 if self.allhunks_re.match(h):
110 110 return True
111 111
112 112 def files(self):
113 113 fromfile, tofile = self.diff_re.match(self.header[0]).groups()
114 114 if fromfile == tofile:
115 115 return [fromfile]
116 116 return [fromfile, tofile]
117 117
118 118 def filename(self):
119 119 return self.files()[-1]
120 120
121 121 def __repr__(self):
122 122 return '<header %s>' % (' '.join(map(repr, self.files())))
123 123
124 124 def special(self):
125 125 for h in self.header:
126 126 if self.special_re.match(h):
127 127 return True
128 128
129 129 def countchanges(hunk):
130 130 """hunk -> (n+,n-)"""
131 131 add = len([h for h in hunk if h[0] == '+'])
132 132 rem = len([h for h in hunk if h[0] == '-'])
133 133 return add, rem
134 134
135 135 class hunk(object):
136 136 """patch hunk
137 137
138 138 XXX shouldn't we merge this with patch.hunk ?
139 139 """
140 140 maxcontext = 3
141 141
142 142 def __init__(self, header, fromline, toline, proc, before, hunk, after):
143 143 def trimcontext(number, lines):
144 144 delta = len(lines) - self.maxcontext
145 145 if False and delta > 0:
146 146 return number + delta, lines[:self.maxcontext]
147 147 return number, lines
148 148
149 149 self.header = header
150 150 self.fromline, self.before = trimcontext(fromline, before)
151 151 self.toline, self.after = trimcontext(toline, after)
152 152 self.proc = proc
153 153 self.hunk = hunk
154 154 self.added, self.removed = countchanges(self.hunk)
155 155
156 156 def write(self, fp):
157 157 delta = len(self.before) + len(self.after)
158 158 if self.after and self.after[-1] == '\\ No newline at end of file\n':
159 159 delta -= 1
160 160 fromlen = delta + self.removed
161 161 tolen = delta + self.added
162 162 fp.write('@@ -%d,%d +%d,%d @@%s\n' %
163 163 (self.fromline, fromlen, self.toline, tolen,
164 164 self.proc and (' ' + self.proc)))
165 165 fp.write(''.join(self.before + self.hunk + self.after))
166 166
167 167 pretty = write
168 168
169 169 def filename(self):
170 170 return self.header.filename()
171 171
172 172 def __repr__(self):
173 173 return '<hunk %r@%d>' % (self.filename(), self.fromline)
174 174
175 175 def parsepatch(fp):
176 176 """patch -> [] of hunks """
177 177 class parser(object):
178 178 """patch parsing state machine"""
179 179 def __init__(self):
180 180 self.fromline = 0
181 181 self.toline = 0
182 182 self.proc = ''
183 183 self.header = None
184 184 self.context = []
185 185 self.before = []
186 186 self.hunk = []
187 187 self.stream = []
188 188
189 189 def addrange(self, (fromstart, fromend, tostart, toend, proc)):
190 190 self.fromline = int(fromstart)
191 191 self.toline = int(tostart)
192 192 self.proc = proc
193 193
194 194 def addcontext(self, context):
195 195 if self.hunk:
196 196 h = hunk(self.header, self.fromline, self.toline, self.proc,
197 197 self.before, self.hunk, context)
198 198 self.header.hunks.append(h)
199 199 self.stream.append(h)
200 200 self.fromline += len(self.before) + h.removed
201 201 self.toline += len(self.before) + h.added
202 202 self.before = []
203 203 self.hunk = []
204 204 self.proc = ''
205 205 self.context = context
206 206
207 207 def addhunk(self, hunk):
208 208 if self.context:
209 209 self.before = self.context
210 210 self.context = []
211 211 self.hunk = hunk
212 212
213 213 def newfile(self, hdr):
214 214 self.addcontext([])
215 215 h = header(hdr)
216 216 self.stream.append(h)
217 217 self.header = h
218 218
219 219 def finished(self):
220 220 self.addcontext([])
221 221 return self.stream
222 222
223 223 transitions = {
224 224 'file': {'context': addcontext,
225 225 'file': newfile,
226 226 'hunk': addhunk,
227 227 'range': addrange},
228 228 'context': {'file': newfile,
229 229 'hunk': addhunk,
230 230 'range': addrange},
231 231 'hunk': {'context': addcontext,
232 232 'file': newfile,
233 233 'range': addrange},
234 234 'range': {'context': addcontext,
235 235 'hunk': addhunk},
236 236 }
237 237
238 238 p = parser()
239 239
240 240 state = 'context'
241 241 for newstate, data in scanpatch(fp):
242 242 try:
243 243 p.transitions[state][newstate](p, data)
244 244 except KeyError:
245 245 raise patch.PatchError('unhandled transition: %s -> %s' %
246 246 (state, newstate))
247 247 state = newstate
248 248 return p.finished()
249 249
250 250 def filterpatch(ui, chunks):
251 251 """Interactively filter patch chunks into applied-only chunks"""
252 252 chunks = list(chunks)
253 253 chunks.reverse()
254 254 seen = set()
255 255 def consumefile():
256 256 """fetch next portion from chunks until a 'header' is seen
257 257 NB: header == new-file mark
258 258 """
259 259 consumed = []
260 260 while chunks:
261 261 if isinstance(chunks[-1], header):
262 262 break
263 263 else:
264 264 consumed.append(chunks.pop())
265 265 return consumed
266 266
267 267 resp_all = [None] # this two are changed from inside prompt,
268 268 resp_file = [None] # so can't be usual variables
269 269 applied = {} # 'filename' -> [] of chunks
270 270 def prompt(query):
271 271 """prompt query, and process base inputs
272 272
273 273 - y/n for the rest of file
274 274 - y/n for the rest
275 275 - ? (help)
276 276 - q (quit)
277 277
278 278 else, input is returned to the caller.
279 279 """
280 280 if resp_all[0] is not None:
281 281 return resp_all[0]
282 282 if resp_file[0] is not None:
283 283 return resp_file[0]
284 284 while True:
285 285 resps = _('[Ynsfdaq?]')
286 286 choices = (_('&Yes, record this change'),
287 287 _('&No, skip this change'),
288 288 _('&Skip remaining changes to this file'),
289 289 _('Record remaining changes to this &file'),
290 290 _('&Done, skip remaining changes and files'),
291 291 _('Record &all changes to all remaining files'),
292 292 _('&Quit, recording no changes'),
293 293 _('&?'))
294 r = ui.promptchoice("%s %s " % (query, resps), choices)
294 r = ui.promptchoice("%s %s" % (query, resps), choices)
295 295 if r == 7: # ?
296 296 doc = gettext(record.__doc__)
297 297 c = doc.find(_('y - record this change'))
298 298 for l in doc[c:].splitlines():
299 299 if l: ui.write(l.strip(), '\n')
300 300 continue
301 301 elif r == 0: # yes
302 302 ret = 'y'
303 303 elif r == 1: # no
304 304 ret = 'n'
305 305 elif r == 2: # Skip
306 306 ret = resp_file[0] = 'n'
307 307 elif r == 3: # file (Record remaining)
308 308 ret = resp_file[0] = 'y'
309 309 elif r == 4: # done, skip remaining
310 310 ret = resp_all[0] = 'n'
311 311 elif r == 5: # all
312 312 ret = resp_all[0] = 'y'
313 313 elif r == 6: # quit
314 314 raise util.Abort(_('user quit'))
315 315 return ret
316 316 pos, total = 0, len(chunks) - 1
317 317 while chunks:
318 318 chunk = chunks.pop()
319 319 if isinstance(chunk, header):
320 320 # new-file mark
321 321 resp_file = [None]
322 322 fixoffset = 0
323 323 hdr = ''.join(chunk.header)
324 324 if hdr in seen:
325 325 consumefile()
326 326 continue
327 327 seen.add(hdr)
328 328 if resp_all[0] is None:
329 329 chunk.pretty(ui)
330 330 r = prompt(_('examine changes to %s?') %
331 331 _(' and ').join(map(repr, chunk.files())))
332 332 if r == _('y'):
333 333 applied[chunk.filename()] = [chunk]
334 334 if chunk.allhunks():
335 335 applied[chunk.filename()] += consumefile()
336 336 else:
337 337 consumefile()
338 338 else:
339 339 # new hunk
340 340 if resp_file[0] is None and resp_all[0] is None:
341 341 chunk.pretty(ui)
342 342 r = total == 1 and prompt(_('record this change to %r?') %
343 343 chunk.filename()) \
344 344 or prompt(_('record change %d/%d to %r?') %
345 345 (pos, total, chunk.filename()))
346 346 if r == _('y'):
347 347 if fixoffset:
348 348 chunk = copy.copy(chunk)
349 349 chunk.toline += fixoffset
350 350 applied[chunk.filename()].append(chunk)
351 351 else:
352 352 fixoffset += chunk.removed - chunk.added
353 353 pos = pos + 1
354 354 return reduce(operator.add, [h for h in applied.itervalues()
355 355 if h[0].special() or len(h) > 1], [])
356 356
357 357 def record(ui, repo, *pats, **opts):
358 358 '''interactively select changes to commit
359 359
360 360 If a list of files is omitted, all changes reported by "hg status"
361 361 will be candidates for recording.
362 362
363 363 See 'hg help dates' for a list of formats valid for -d/--date.
364 364
365 365 You will be prompted for whether to record changes to each
366 366 modified file, and for files with multiple changes, for each
367 367 change to use. For each query, the following responses are
368 368 possible::
369 369
370 370 y - record this change
371 371 n - skip this change
372 372
373 373 s - skip remaining changes to this file
374 374 f - record remaining changes to this file
375 375
376 376 d - done, skip remaining changes and files
377 377 a - record all changes to all remaining files
378 378 q - quit, recording no changes
379 379
380 380 ? - display help'''
381 381
382 382 def record_committer(ui, repo, pats, opts):
383 383 commands.commit(ui, repo, *pats, **opts)
384 384
385 385 dorecord(ui, repo, record_committer, *pats, **opts)
386 386
387 387
388 388 def qrecord(ui, repo, patch, *pats, **opts):
389 389 '''interactively record a new patch
390 390
391 391 See 'hg help qnew' & 'hg help record' for more information and
392 392 usage.
393 393 '''
394 394
395 395 try:
396 396 mq = extensions.find('mq')
397 397 except KeyError:
398 398 raise util.Abort(_("'mq' extension not loaded"))
399 399
400 400 def qrecord_committer(ui, repo, pats, opts):
401 401 mq.new(ui, repo, patch, *pats, **opts)
402 402
403 403 opts = opts.copy()
404 404 opts['force'] = True # always 'qnew -f'
405 405 dorecord(ui, repo, qrecord_committer, *pats, **opts)
406 406
407 407
408 408 def dorecord(ui, repo, committer, *pats, **opts):
409 409 if not ui.interactive():
410 410 raise util.Abort(_('running non-interactively, use commit instead'))
411 411
412 412 def recordfunc(ui, repo, message, match, opts):
413 413 """This is generic record driver.
414 414
415 415 Its job is to interactively filter local changes, and accordingly
416 416 prepare working dir into a state, where the job can be delegated to
417 417 non-interactive commit command such as 'commit' or 'qrefresh'.
418 418
419 419 After the actual job is done by non-interactive command, working dir
420 420 state is restored to original.
421 421
422 422 In the end we'll record intresting changes, and everything else will be
423 423 left in place, so the user can continue his work.
424 424 """
425 425
426 426 changes = repo.status(match=match)[:3]
427 427 diffopts = mdiff.diffopts(git=True, nodates=True)
428 428 chunks = patch.diff(repo, changes=changes, opts=diffopts)
429 429 fp = cStringIO.StringIO()
430 430 fp.write(''.join(chunks))
431 431 fp.seek(0)
432 432
433 433 # 1. filter patch, so we have intending-to apply subset of it
434 434 chunks = filterpatch(ui, parsepatch(fp))
435 435 del fp
436 436
437 437 contenders = set()
438 438 for h in chunks:
439 439 try: contenders.update(set(h.files()))
440 440 except AttributeError: pass
441 441
442 442 changed = changes[0] + changes[1] + changes[2]
443 443 newfiles = [f for f in changed if f in contenders]
444 444 if not newfiles:
445 445 ui.status(_('no changes to record\n'))
446 446 return 0
447 447
448 448 modified = set(changes[0])
449 449
450 450 # 2. backup changed files, so we can restore them in the end
451 451 backups = {}
452 452 backupdir = repo.join('record-backups')
453 453 try:
454 454 os.mkdir(backupdir)
455 455 except OSError, err:
456 456 if err.errno != errno.EEXIST:
457 457 raise
458 458 try:
459 459 # backup continues
460 460 for f in newfiles:
461 461 if f not in modified:
462 462 continue
463 463 fd, tmpname = tempfile.mkstemp(prefix=f.replace('/', '_')+'.',
464 464 dir=backupdir)
465 465 os.close(fd)
466 466 ui.debug(_('backup %r as %r\n') % (f, tmpname))
467 467 util.copyfile(repo.wjoin(f), tmpname)
468 468 backups[f] = tmpname
469 469
470 470 fp = cStringIO.StringIO()
471 471 for c in chunks:
472 472 if c.filename() in backups:
473 473 c.write(fp)
474 474 dopatch = fp.tell()
475 475 fp.seek(0)
476 476
477 477 # 3a. apply filtered patch to clean repo (clean)
478 478 if backups:
479 479 hg.revert(repo, repo.dirstate.parents()[0], backups.has_key)
480 480
481 481 # 3b. (apply)
482 482 if dopatch:
483 483 try:
484 484 ui.debug(_('applying patch\n'))
485 485 ui.debug(fp.getvalue())
486 486 pfiles = {}
487 487 patch.internalpatch(fp, ui, 1, repo.root, files=pfiles,
488 488 eolmode=None)
489 489 patch.updatedir(ui, repo, pfiles)
490 490 except patch.PatchError, err:
491 491 s = str(err)
492 492 if s:
493 493 raise util.Abort(s)
494 494 else:
495 495 raise util.Abort(_('patch failed to apply'))
496 496 del fp
497 497
498 498 # 4. We prepared working directory according to filtered patch.
499 499 # Now is the time to delegate the job to commit/qrefresh or the like!
500 500
501 501 # it is important to first chdir to repo root -- we'll call a
502 502 # highlevel command with list of pathnames relative to repo root
503 503 cwd = os.getcwd()
504 504 os.chdir(repo.root)
505 505 try:
506 506 committer(ui, repo, newfiles, opts)
507 507 finally:
508 508 os.chdir(cwd)
509 509
510 510 return 0
511 511 finally:
512 512 # 5. finally restore backed-up files
513 513 try:
514 514 for realname, tmpname in backups.iteritems():
515 515 ui.debug(_('restoring %r to %r\n') % (tmpname, realname))
516 516 util.copyfile(tmpname, repo.wjoin(realname))
517 517 os.unlink(tmpname)
518 518 os.rmdir(backupdir)
519 519 except OSError:
520 520 pass
521 521 return cmdutil.commit(ui, repo, recordfunc, pats, opts)
522 522
523 523 cmdtable = {
524 524 "record":
525 525 (record,
526 526
527 527 # add commit options
528 528 commands.table['^commit|ci'][1],
529 529
530 530 _('hg record [OPTION]... [FILE]...')),
531 531 }
532 532
533 533
534 534 def extsetup():
535 535 try:
536 536 mq = extensions.find('mq')
537 537 except KeyError:
538 538 return
539 539
540 540 qcmdtable = {
541 541 "qrecord":
542 542 (qrecord,
543 543
544 544 # add qnew options, except '--force'
545 545 [opt for opt in mq.cmdtable['qnew'][1] if opt[1] != 'force'],
546 546
547 547 _('hg qrecord [OPTION]... PATCH [FILE]...')),
548 548 }
549 549
550 550 cmdtable.update(qcmdtable)
551 551
@@ -1,208 +1,208
1 1 % help (no mq, so no qrecord)
2 2 hg: unknown command 'qrecord'
3 3 Mercurial Distributed SCM
4 4
5 5 basic commands:
6 6
7 7 add add the specified files on the next commit
8 8 annotate show changeset information by line for each file
9 9 clone make a copy of an existing repository
10 10 commit commit the specified files or all outstanding changes
11 11 diff diff repository (or selected files)
12 12 export dump the header and diffs for one or more changesets
13 13 forget forget the specified files on the next commit
14 14 init create a new repository in the given directory
15 15 log show revision history of entire repository or files
16 16 merge merge working directory with another revision
17 17 parents show the parents of the working directory or revision
18 18 pull pull changes from the specified source
19 19 push push changes to the specified destination
20 20 remove remove the specified files on the next commit
21 21 serve export the repository via HTTP
22 22 status show changed files in the working directory
23 23 update update working directory
24 24
25 25 use "hg help" for the full list of commands or "hg -v" for details
26 26 % help (mq present)
27 27 hg qrecord [OPTION]... PATCH [FILE]...
28 28
29 29 interactively record a new patch
30 30
31 31 See 'hg help qnew' & 'hg help record' for more information and usage.
32 32
33 33 options:
34 34
35 35 -e --edit edit commit message
36 36 -g --git use git extended diff format
37 37 -U --currentuser add "From: <current user>" to patch
38 38 -u --user add "From: <given user>" to patch
39 39 -D --currentdate add "Date: <current date>" to patch
40 40 -d --date add "Date: <given date>" to patch
41 41 -I --include include names matching the given patterns
42 42 -X --exclude exclude names matching the given patterns
43 43 -m --message use <text> as commit message
44 44 -l --logfile read commit message from <file>
45 45
46 46 use "hg -v help qrecord" to show global options
47 47 % base commit
48 48 % changing files
49 49 % whole diff
50 50 diff -r 1057167b20ef 1.txt
51 51 --- a/1.txt
52 52 +++ b/1.txt
53 53 @@ -1,5 +1,5 @@
54 54 1
55 55 -2
56 56 +2 2
57 57 3
58 58 -4
59 59 +4 4
60 60 5
61 61 diff -r 1057167b20ef 2.txt
62 62 --- a/2.txt
63 63 +++ b/2.txt
64 64 @@ -1,5 +1,5 @@
65 65 a
66 66 -b
67 67 +b b
68 68 c
69 69 d
70 70 e
71 71 diff -r 1057167b20ef dir/a.txt
72 72 --- a/dir/a.txt
73 73 +++ b/dir/a.txt
74 74 @@ -1,4 +1,4 @@
75 75 -hello world
76 76 +hello world!
77 77
78 78 someone
79 79 up
80 80 % qrecord a.patch
81 81 diff --git a/1.txt b/1.txt
82 82 2 hunks, 4 lines changed
83 examine changes to '1.txt'? [Ynsfdaq?] @@ -1,3 +1,3 @@
83 examine changes to '1.txt'? [Ynsfdaq?] @@ -1,3 +1,3 @@
84 84 1
85 85 -2
86 86 +2 2
87 87 3
88 record change 1/6 to '1.txt'? [Ynsfdaq?] @@ -3,3 +3,3 @@
88 record change 1/6 to '1.txt'? [Ynsfdaq?] @@ -3,3 +3,3 @@
89 89 3
90 90 -4
91 91 +4 4
92 92 5
93 record change 2/6 to '1.txt'? [Ynsfdaq?] diff --git a/2.txt b/2.txt
93 record change 2/6 to '1.txt'? [Ynsfdaq?] diff --git a/2.txt b/2.txt
94 94 1 hunks, 2 lines changed
95 examine changes to '2.txt'? [Ynsfdaq?] @@ -1,5 +1,5 @@
95 examine changes to '2.txt'? [Ynsfdaq?] @@ -1,5 +1,5 @@
96 96 a
97 97 -b
98 98 +b b
99 99 c
100 100 d
101 101 e
102 record change 4/6 to '2.txt'? [Ynsfdaq?] diff --git a/dir/a.txt b/dir/a.txt
102 record change 4/6 to '2.txt'? [Ynsfdaq?] diff --git a/dir/a.txt b/dir/a.txt
103 103 1 hunks, 2 lines changed
104 examine changes to 'dir/a.txt'? [Ynsfdaq?]
104 examine changes to 'dir/a.txt'? [Ynsfdaq?]
105 105 % after qrecord a.patch 'tip'
106 106 changeset: 1:5d1ca63427ee
107 107 tag: qtip
108 108 tag: tip
109 109 tag: a.patch
110 110 tag: qbase
111 111 user: test
112 112 date: Thu Jan 01 00:00:00 1970 +0000
113 113 summary: aaa
114 114
115 115 diff -r 1057167b20ef -r 5d1ca63427ee 1.txt
116 116 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
117 117 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
118 118 @@ -1,5 +1,5 @@
119 119 1
120 120 -2
121 121 +2 2
122 122 3
123 123 4
124 124 5
125 125 diff -r 1057167b20ef -r 5d1ca63427ee 2.txt
126 126 --- a/2.txt Thu Jan 01 00:00:00 1970 +0000
127 127 +++ b/2.txt Thu Jan 01 00:00:00 1970 +0000
128 128 @@ -1,5 +1,5 @@
129 129 a
130 130 -b
131 131 +b b
132 132 c
133 133 d
134 134 e
135 135
136 136
137 137 % after qrecord a.patch 'diff'
138 138 diff -r 5d1ca63427ee 1.txt
139 139 --- a/1.txt
140 140 +++ b/1.txt
141 141 @@ -1,5 +1,5 @@
142 142 1
143 143 2 2
144 144 3
145 145 -4
146 146 +4 4
147 147 5
148 148 diff -r 5d1ca63427ee dir/a.txt
149 149 --- a/dir/a.txt
150 150 +++ b/dir/a.txt
151 151 @@ -1,4 +1,4 @@
152 152 -hello world
153 153 +hello world!
154 154
155 155 someone
156 156 up
157 157 % qrecord b.patch
158 158 diff --git a/1.txt b/1.txt
159 159 1 hunks, 2 lines changed
160 examine changes to '1.txt'? [Ynsfdaq?] @@ -1,5 +1,5 @@
160 examine changes to '1.txt'? [Ynsfdaq?] @@ -1,5 +1,5 @@
161 161 1
162 162 2 2
163 163 3
164 164 -4
165 165 +4 4
166 166 5
167 record change 1/3 to '1.txt'? [Ynsfdaq?] diff --git a/dir/a.txt b/dir/a.txt
167 record change 1/3 to '1.txt'? [Ynsfdaq?] diff --git a/dir/a.txt b/dir/a.txt
168 168 1 hunks, 2 lines changed
169 examine changes to 'dir/a.txt'? [Ynsfdaq?] @@ -1,4 +1,4 @@
169 examine changes to 'dir/a.txt'? [Ynsfdaq?] @@ -1,4 +1,4 @@
170 170 -hello world
171 171 +hello world!
172 172
173 173 someone
174 174 up
175 record change 3/3 to 'dir/a.txt'? [Ynsfdaq?]
175 record change 3/3 to 'dir/a.txt'? [Ynsfdaq?]
176 176 % after qrecord b.patch 'tip'
177 177 changeset: 2:b056198bf878
178 178 tag: qtip
179 179 tag: tip
180 180 tag: b.patch
181 181 user: test
182 182 date: Thu Jan 01 00:00:00 1970 +0000
183 183 summary: bbb
184 184
185 185 diff -r 5d1ca63427ee -r b056198bf878 1.txt
186 186 --- a/1.txt Thu Jan 01 00:00:00 1970 +0000
187 187 +++ b/1.txt Thu Jan 01 00:00:00 1970 +0000
188 188 @@ -1,5 +1,5 @@
189 189 1
190 190 2 2
191 191 3
192 192 -4
193 193 +4 4
194 194 5
195 195 diff -r 5d1ca63427ee -r b056198bf878 dir/a.txt
196 196 --- a/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
197 197 +++ b/dir/a.txt Thu Jan 01 00:00:00 1970 +0000
198 198 @@ -1,4 +1,4 @@
199 199 -hello world
200 200 +hello world!
201 201
202 202 someone
203 203 up
204 204
205 205
206 206 % after qrecord b.patch 'diff'
207 207
208 208 % --- end ---
@@ -1,595 +1,595
1 1 % help
2 2 hg record [OPTION]... [FILE]...
3 3
4 4 interactively select changes to commit
5 5
6 6 If a list of files is omitted, all changes reported by "hg status" will be
7 7 candidates for recording.
8 8
9 9 See 'hg help dates' for a list of formats valid for -d/--date.
10 10
11 11 You will be prompted for whether to record changes to each modified file,
12 12 and for files with multiple changes, for each change to use. For each
13 13 query, the following responses are possible:
14 14
15 15 y - record this change
16 16 n - skip this change
17 17
18 18 s - skip remaining changes to this file
19 19 f - record remaining changes to this file
20 20
21 21 d - done, skip remaining changes and files
22 22 a - record all changes to all remaining files
23 23 q - quit, recording no changes
24 24
25 25 ? - display help
26 26
27 27 options:
28 28
29 29 -A --addremove mark new/missing files as added/removed before committing
30 30 --close-branch mark a branch as closed, hiding it from the branch list
31 31 -I --include include names matching the given patterns
32 32 -X --exclude exclude names matching the given patterns
33 33 -m --message use <text> as commit message
34 34 -l --logfile read commit message from <file>
35 35 -d --date record datecode as commit date
36 36 -u --user record the specified user as committer
37 37
38 38 use "hg -v help record" to show global options
39 39 % select no files
40 40 diff --git a/empty-rw b/empty-rw
41 41 new file mode 100644
42 examine changes to 'empty-rw'? [Ynsfdaq?] no changes to record
42 examine changes to 'empty-rw'? [Ynsfdaq?] no changes to record
43 43
44 44 changeset: -1:000000000000
45 45 tag: tip
46 46 user:
47 47 date: Thu Jan 01 00:00:00 1970 +0000
48 48
49 49
50 50 % select files but no hunks
51 51 diff --git a/empty-rw b/empty-rw
52 52 new file mode 100644
53 examine changes to 'empty-rw'? [Ynsfdaq?] abort: empty commit message
53 examine changes to 'empty-rw'? [Ynsfdaq?] abort: empty commit message
54 54
55 55 changeset: -1:000000000000
56 56 tag: tip
57 57 user:
58 58 date: Thu Jan 01 00:00:00 1970 +0000
59 59
60 60
61 61 % record empty file
62 62 diff --git a/empty-rw b/empty-rw
63 63 new file mode 100644
64 examine changes to 'empty-rw'? [Ynsfdaq?]
64 examine changes to 'empty-rw'? [Ynsfdaq?]
65 65 changeset: 0:c0708cf4e46e
66 66 tag: tip
67 67 user: test
68 68 date: Thu Jan 01 00:00:00 1970 +0000
69 69 summary: empty
70 70
71 71
72 72 % rename empty file
73 73 diff --git a/empty-rw b/empty-rename
74 74 rename from empty-rw
75 75 rename to empty-rename
76 examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?]
76 examine changes to 'empty-rw' and 'empty-rename'? [Ynsfdaq?]
77 77 changeset: 1:df251d174da3
78 78 tag: tip
79 79 user: test
80 80 date: Thu Jan 01 00:00:01 1970 +0000
81 81 summary: rename
82 82
83 83
84 84 % copy empty file
85 85 diff --git a/empty-rename b/empty-copy
86 86 copy from empty-rename
87 87 copy to empty-copy
88 examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?]
88 examine changes to 'empty-rename' and 'empty-copy'? [Ynsfdaq?]
89 89 changeset: 2:b63ea3939f8d
90 90 tag: tip
91 91 user: test
92 92 date: Thu Jan 01 00:00:02 1970 +0000
93 93 summary: copy
94 94
95 95
96 96 % delete empty file
97 97 diff --git a/empty-copy b/empty-copy
98 98 deleted file mode 100644
99 examine changes to 'empty-copy'? [Ynsfdaq?]
99 examine changes to 'empty-copy'? [Ynsfdaq?]
100 100 changeset: 3:a2546574bce9
101 101 tag: tip
102 102 user: test
103 103 date: Thu Jan 01 00:00:03 1970 +0000
104 104 summary: delete
105 105
106 106
107 107 % add binary file
108 108 1 changesets found
109 109 diff --git a/tip.bundle b/tip.bundle
110 110 new file mode 100644
111 111 this is a binary file
112 examine changes to 'tip.bundle'? [Ynsfdaq?]
112 examine changes to 'tip.bundle'? [Ynsfdaq?]
113 113 changeset: 4:9e998a545a8b
114 114 tag: tip
115 115 user: test
116 116 date: Thu Jan 01 00:00:04 1970 +0000
117 117 summary: binary
118 118
119 119 diff -r a2546574bce9 -r 9e998a545a8b tip.bundle
120 120 Binary file tip.bundle has changed
121 121
122 122 % change binary file
123 123 1 changesets found
124 124 diff --git a/tip.bundle b/tip.bundle
125 125 this modifies a binary file (all or nothing)
126 examine changes to 'tip.bundle'? [Ynsfdaq?]
126 examine changes to 'tip.bundle'? [Ynsfdaq?]
127 127 changeset: 5:93d05561507d
128 128 tag: tip
129 129 user: test
130 130 date: Thu Jan 01 00:00:05 1970 +0000
131 131 summary: binary-change
132 132
133 133 diff -r 9e998a545a8b -r 93d05561507d tip.bundle
134 134 Binary file tip.bundle has changed
135 135
136 136 % rename and change binary file
137 137 1 changesets found
138 138 diff --git a/tip.bundle b/top.bundle
139 139 rename from tip.bundle
140 140 rename to top.bundle
141 141 this modifies a binary file (all or nothing)
142 examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?]
142 examine changes to 'tip.bundle' and 'top.bundle'? [Ynsfdaq?]
143 143 changeset: 6:699cc1bea9aa
144 144 tag: tip
145 145 user: test
146 146 date: Thu Jan 01 00:00:06 1970 +0000
147 147 summary: binary-change-rename
148 148
149 149 diff -r 93d05561507d -r 699cc1bea9aa tip.bundle
150 150 Binary file tip.bundle has changed
151 151 diff -r 93d05561507d -r 699cc1bea9aa top.bundle
152 152 Binary file top.bundle has changed
153 153
154 154 % add plain file
155 155 diff --git a/plain b/plain
156 156 new file mode 100644
157 examine changes to 'plain'? [Ynsfdaq?]
157 examine changes to 'plain'? [Ynsfdaq?]
158 158 changeset: 7:118ed744216b
159 159 tag: tip
160 160 user: test
161 161 date: Thu Jan 01 00:00:07 1970 +0000
162 162 summary: plain
163 163
164 164 diff -r 699cc1bea9aa -r 118ed744216b plain
165 165 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
166 166 +++ b/plain Thu Jan 01 00:00:07 1970 +0000
167 167 @@ -0,0 +1,10 @@
168 168 +1
169 169 +2
170 170 +3
171 171 +4
172 172 +5
173 173 +6
174 174 +7
175 175 +8
176 176 +9
177 177 +10
178 178
179 179 % modify end of plain file
180 180 diff --git a/plain b/plain
181 181 1 hunks, 1 lines changed
182 examine changes to 'plain'? [Ynsfdaq?] @@ -8,3 +8,4 @@
182 examine changes to 'plain'? [Ynsfdaq?] @@ -8,3 +8,4 @@
183 183 8
184 184 9
185 185 10
186 186 +11
187 record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, no EOL
187 record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, no EOL
188 188 diff --git a/plain b/plain
189 189 1 hunks, 1 lines changed
190 examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,4 @@
190 examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,4 @@
191 191 9
192 192 10
193 193 11
194 194 +cf81a2760718a74d44c0c2eecb72f659e63a69c5
195 195 \ No newline at end of file
196 record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, add EOL
196 record this change to 'plain'? [Ynsfdaq?] % modify end of plain file, add EOL
197 197 diff --git a/plain b/plain
198 198 1 hunks, 2 lines changed
199 examine changes to 'plain'? [Ynsfdaq?] @@ -9,4 +9,4 @@
199 examine changes to 'plain'? [Ynsfdaq?] @@ -9,4 +9,4 @@
200 200 9
201 201 10
202 202 11
203 203 -cf81a2760718a74d44c0c2eecb72f659e63a69c5
204 204 \ No newline at end of file
205 205 +cf81a2760718a74d44c0c2eecb72f659e63a69c5
206 record this change to 'plain'? [Ynsfdaq?] % modify beginning, trim end, record both
206 record this change to 'plain'? [Ynsfdaq?] % modify beginning, trim end, record both
207 207 diff --git a/plain b/plain
208 208 2 hunks, 4 lines changed
209 examine changes to 'plain'? [Ynsfdaq?] @@ -1,4 +1,4 @@
209 examine changes to 'plain'? [Ynsfdaq?] @@ -1,4 +1,4 @@
210 210 -1
211 211 +2
212 212 2
213 213 3
214 214 4
215 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -8,5 +8,3 @@
215 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -8,5 +8,3 @@
216 216 8
217 217 9
218 218 10
219 219 -11
220 220 -cf81a2760718a74d44c0c2eecb72f659e63a69c5
221 record change 2/2 to 'plain'? [Ynsfdaq?]
221 record change 2/2 to 'plain'? [Ynsfdaq?]
222 222 changeset: 11:d09ab1967dab
223 223 tag: tip
224 224 user: test
225 225 date: Thu Jan 01 00:00:10 1970 +0000
226 226 summary: begin-and-end
227 227
228 228 diff -r e2ecd9b0b78d -r d09ab1967dab plain
229 229 --- a/plain Thu Jan 01 00:00:10 1970 +0000
230 230 +++ b/plain Thu Jan 01 00:00:10 1970 +0000
231 231 @@ -1,4 +1,4 @@
232 232 -1
233 233 +2
234 234 2
235 235 3
236 236 4
237 237 @@ -8,5 +8,3 @@
238 238 8
239 239 9
240 240 10
241 241 -11
242 242 -cf81a2760718a74d44c0c2eecb72f659e63a69c5
243 243
244 244 % trim beginning, modify end
245 245 % record end
246 246 diff --git a/plain b/plain
247 247 2 hunks, 5 lines changed
248 examine changes to 'plain'? [Ynsfdaq?] @@ -1,9 +1,6 @@
248 examine changes to 'plain'? [Ynsfdaq?] @@ -1,9 +1,6 @@
249 249 -2
250 250 -2
251 251 -3
252 252 4
253 253 5
254 254 6
255 255 7
256 256 8
257 257 9
258 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -4,7 +1,7 @@
258 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -4,7 +1,7 @@
259 259 4
260 260 5
261 261 6
262 262 7
263 263 8
264 264 9
265 265 -10
266 266 +10.new
267 record change 2/2 to 'plain'? [Ynsfdaq?]
267 record change 2/2 to 'plain'? [Ynsfdaq?]
268 268 changeset: 12:44516c9708ae
269 269 tag: tip
270 270 user: test
271 271 date: Thu Jan 01 00:00:11 1970 +0000
272 272 summary: end-only
273 273
274 274 diff -r d09ab1967dab -r 44516c9708ae plain
275 275 --- a/plain Thu Jan 01 00:00:10 1970 +0000
276 276 +++ b/plain Thu Jan 01 00:00:11 1970 +0000
277 277 @@ -7,4 +7,4 @@
278 278 7
279 279 8
280 280 9
281 281 -10
282 282 +10.new
283 283
284 284 % record beginning
285 285 diff --git a/plain b/plain
286 286 1 hunks, 3 lines changed
287 examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,3 @@
287 examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,3 @@
288 288 -2
289 289 -2
290 290 -3
291 291 4
292 292 5
293 293 6
294 record this change to 'plain'? [Ynsfdaq?]
294 record this change to 'plain'? [Ynsfdaq?]
295 295 changeset: 13:3ebbace64a8d
296 296 tag: tip
297 297 user: test
298 298 date: Thu Jan 01 00:00:12 1970 +0000
299 299 summary: begin-only
300 300
301 301 diff -r 44516c9708ae -r 3ebbace64a8d plain
302 302 --- a/plain Thu Jan 01 00:00:11 1970 +0000
303 303 +++ b/plain Thu Jan 01 00:00:12 1970 +0000
304 304 @@ -1,6 +1,3 @@
305 305 -2
306 306 -2
307 307 -3
308 308 4
309 309 5
310 310 6
311 311
312 312 % add to beginning, trim from end
313 313 % record end
314 314 diff --git a/plain b/plain
315 315 2 hunks, 4 lines changed
316 examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,9 @@
316 examine changes to 'plain'? [Ynsfdaq?] @@ -1,6 +1,9 @@
317 317 +1
318 318 +2
319 319 +3
320 320 4
321 321 5
322 322 6
323 323 7
324 324 8
325 325 9
326 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -1,7 +4,6 @@
326 record change 1/2 to 'plain'? [Ynsfdaq?] @@ -1,7 +4,6 @@
327 327 4
328 328 5
329 329 6
330 330 7
331 331 8
332 332 9
333 333 -10.new
334 record change 2/2 to 'plain'? [Ynsfdaq?] % add to beginning, middle, end
334 record change 2/2 to 'plain'? [Ynsfdaq?] % add to beginning, middle, end
335 335 % record beginning, middle
336 336 diff --git a/plain b/plain
337 337 3 hunks, 7 lines changed
338 examine changes to 'plain'? [Ynsfdaq?] @@ -1,2 +1,5 @@
338 examine changes to 'plain'? [Ynsfdaq?] @@ -1,2 +1,5 @@
339 339 +1
340 340 +2
341 341 +3
342 342 4
343 343 5
344 record change 1/3 to 'plain'? [Ynsfdaq?] @@ -1,6 +4,8 @@
344 record change 1/3 to 'plain'? [Ynsfdaq?] @@ -1,6 +4,8 @@
345 345 4
346 346 5
347 347 +5.new
348 348 +5.reallynew
349 349 6
350 350 7
351 351 8
352 352 9
353 record change 2/3 to 'plain'? [Ynsfdaq?] @@ -3,4 +8,6 @@
353 record change 2/3 to 'plain'? [Ynsfdaq?] @@ -3,4 +8,6 @@
354 354 6
355 355 7
356 356 8
357 357 9
358 358 +10
359 359 +11
360 record change 3/3 to 'plain'? [Ynsfdaq?]
360 record change 3/3 to 'plain'? [Ynsfdaq?]
361 361 changeset: 15:c1c639d8b268
362 362 tag: tip
363 363 user: test
364 364 date: Thu Jan 01 00:00:14 1970 +0000
365 365 summary: middle-only
366 366
367 367 diff -r efc0dad7bd9f -r c1c639d8b268 plain
368 368 --- a/plain Thu Jan 01 00:00:13 1970 +0000
369 369 +++ b/plain Thu Jan 01 00:00:14 1970 +0000
370 370 @@ -1,5 +1,10 @@
371 371 +1
372 372 +2
373 373 +3
374 374 4
375 375 5
376 376 +5.new
377 377 +5.reallynew
378 378 6
379 379 7
380 380 8
381 381
382 382 % record end
383 383 diff --git a/plain b/plain
384 384 1 hunks, 2 lines changed
385 examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,5 @@
385 examine changes to 'plain'? [Ynsfdaq?] @@ -9,3 +9,5 @@
386 386 7
387 387 8
388 388 9
389 389 +10
390 390 +11
391 record this change to 'plain'? [Ynsfdaq?]
391 record this change to 'plain'? [Ynsfdaq?]
392 392 changeset: 16:80b74bbc7808
393 393 tag: tip
394 394 user: test
395 395 date: Thu Jan 01 00:00:15 1970 +0000
396 396 summary: end-only
397 397
398 398 diff -r c1c639d8b268 -r 80b74bbc7808 plain
399 399 --- a/plain Thu Jan 01 00:00:14 1970 +0000
400 400 +++ b/plain Thu Jan 01 00:00:15 1970 +0000
401 401 @@ -9,3 +9,5 @@
402 402 7
403 403 8
404 404 9
405 405 +10
406 406 +11
407 407
408 408 adding subdir/a
409 409 diff --git a/subdir/a b/subdir/a
410 410 1 hunks, 1 lines changed
411 examine changes to 'subdir/a'? [Ynsfdaq?] @@ -1,1 +1,2 @@
411 examine changes to 'subdir/a'? [Ynsfdaq?] @@ -1,1 +1,2 @@
412 412 a
413 413 +a
414 record this change to 'subdir/a'? [Ynsfdaq?]
414 record this change to 'subdir/a'? [Ynsfdaq?]
415 415 changeset: 18:33ff5c4fb017
416 416 tag: tip
417 417 user: test
418 418 date: Thu Jan 01 00:00:16 1970 +0000
419 419 summary: subdir-change
420 420
421 421 diff -r aecf2b2ea83c -r 33ff5c4fb017 subdir/a
422 422 --- a/subdir/a Thu Jan 01 00:00:16 1970 +0000
423 423 +++ b/subdir/a Thu Jan 01 00:00:16 1970 +0000
424 424 @@ -1,1 +1,2 @@
425 425 a
426 426 +a
427 427
428 428 % help, quit
429 429 diff --git a/subdir/f1 b/subdir/f1
430 430 1 hunks, 1 lines changed
431 examine changes to 'subdir/f1'? [Ynsfdaq?] y - record this change
431 examine changes to 'subdir/f1'? [Ynsfdaq?] y - record this change
432 432 n - skip this change
433 433 s - skip remaining changes to this file
434 434 f - record remaining changes to this file
435 435 d - done, skip remaining changes and files
436 436 a - record all changes to all remaining files
437 437 q - quit, recording no changes
438 438 ? - display help
439 examine changes to 'subdir/f1'? [Ynsfdaq?] abort: user quit
439 examine changes to 'subdir/f1'? [Ynsfdaq?] abort: user quit
440 440 % skip
441 441 diff --git a/subdir/f1 b/subdir/f1
442 442 1 hunks, 1 lines changed
443 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
443 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
444 444 1 hunks, 1 lines changed
445 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
445 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
446 446 % no
447 447 diff --git a/subdir/f1 b/subdir/f1
448 448 1 hunks, 1 lines changed
449 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
449 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
450 450 1 hunks, 1 lines changed
451 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
451 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: response expected
452 452 % f, quit
453 453 diff --git a/subdir/f1 b/subdir/f1
454 454 1 hunks, 1 lines changed
455 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
455 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
456 456 1 hunks, 1 lines changed
457 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: user quit
457 examine changes to 'subdir/f2'? [Ynsfdaq?] abort: user quit
458 458 % s, all
459 459 diff --git a/subdir/f1 b/subdir/f1
460 460 1 hunks, 1 lines changed
461 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
461 examine changes to 'subdir/f1'? [Ynsfdaq?] diff --git a/subdir/f2 b/subdir/f2
462 462 1 hunks, 1 lines changed
463 examine changes to 'subdir/f2'? [Ynsfdaq?]
463 examine changes to 'subdir/f2'? [Ynsfdaq?]
464 464 changeset: 20:094183e04b7c
465 465 tag: tip
466 466 user: test
467 467 date: Thu Jan 01 00:00:18 1970 +0000
468 468 summary: x
469 469
470 470 diff -r f9e855cd9374 -r 094183e04b7c subdir/f2
471 471 --- a/subdir/f2 Thu Jan 01 00:00:17 1970 +0000
472 472 +++ b/subdir/f2 Thu Jan 01 00:00:18 1970 +0000
473 473 @@ -1,1 +1,2 @@
474 474 b
475 475 +b
476 476
477 477 % f
478 478 diff --git a/subdir/f1 b/subdir/f1
479 479 1 hunks, 1 lines changed
480 examine changes to 'subdir/f1'? [Ynsfdaq?]
480 examine changes to 'subdir/f1'? [Ynsfdaq?]
481 481 changeset: 21:38164785b0ef
482 482 tag: tip
483 483 user: test
484 484 date: Thu Jan 01 00:00:19 1970 +0000
485 485 summary: y
486 486
487 487 diff -r 094183e04b7c -r 38164785b0ef subdir/f1
488 488 --- a/subdir/f1 Thu Jan 01 00:00:18 1970 +0000
489 489 +++ b/subdir/f1 Thu Jan 01 00:00:19 1970 +0000
490 490 @@ -1,1 +1,2 @@
491 491 a
492 492 +a
493 493
494 494 % preserve chmod +x
495 495 diff --git a/subdir/f1 b/subdir/f1
496 496 old mode 100644
497 497 new mode 100755
498 498 1 hunks, 1 lines changed
499 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -1,2 +1,3 @@
499 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -1,2 +1,3 @@
500 500 a
501 501 a
502 502 +a
503 record this change to 'subdir/f1'? [Ynsfdaq?]
503 record this change to 'subdir/f1'? [Ynsfdaq?]
504 504 changeset: 22:a891589cb933
505 505 tag: tip
506 506 user: test
507 507 date: Thu Jan 01 00:00:20 1970 +0000
508 508 summary: z
509 509
510 510 diff --git a/subdir/f1 b/subdir/f1
511 511 old mode 100644
512 512 new mode 100755
513 513 --- a/subdir/f1
514 514 +++ b/subdir/f1
515 515 @@ -1,2 +1,3 @@
516 516 a
517 517 a
518 518 +a
519 519
520 520 % preserve execute permission on original
521 521 diff --git a/subdir/f1 b/subdir/f1
522 522 1 hunks, 1 lines changed
523 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -1,3 +1,4 @@
523 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -1,3 +1,4 @@
524 524 a
525 525 a
526 526 a
527 527 +b
528 record this change to 'subdir/f1'? [Ynsfdaq?]
528 record this change to 'subdir/f1'? [Ynsfdaq?]
529 529 changeset: 23:befa0dae6201
530 530 tag: tip
531 531 user: test
532 532 date: Thu Jan 01 00:00:21 1970 +0000
533 533 summary: aa
534 534
535 535 diff --git a/subdir/f1 b/subdir/f1
536 536 --- a/subdir/f1
537 537 +++ b/subdir/f1
538 538 @@ -1,3 +1,4 @@
539 539 a
540 540 a
541 541 a
542 542 +b
543 543
544 544 % preserve chmod -x
545 545 diff --git a/subdir/f1 b/subdir/f1
546 546 old mode 100755
547 547 new mode 100644
548 548 1 hunks, 1 lines changed
549 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -2,3 +2,4 @@
549 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -2,3 +2,4 @@
550 550 a
551 551 a
552 552 b
553 553 +c
554 record this change to 'subdir/f1'? [Ynsfdaq?]
554 record this change to 'subdir/f1'? [Ynsfdaq?]
555 555 changeset: 24:8fd83ff53ce6
556 556 tag: tip
557 557 user: test
558 558 date: Thu Jan 01 00:00:22 1970 +0000
559 559 summary: ab
560 560
561 561 diff --git a/subdir/f1 b/subdir/f1
562 562 old mode 100755
563 563 new mode 100644
564 564 --- a/subdir/f1
565 565 +++ b/subdir/f1
566 566 @@ -2,3 +2,4 @@
567 567 a
568 568 a
569 569 b
570 570 +c
571 571
572 572 % with win32ext
573 573 diff --git a/subdir/f1 b/subdir/f1
574 574 1 hunks, 1 lines changed
575 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -3,3 +3,4 @@
575 examine changes to 'subdir/f1'? [Ynsfdaq?] @@ -3,3 +3,4 @@
576 576 a
577 577 b
578 578 c
579 579 +d
580 record this change to 'subdir/f1'? [Ynsfdaq?]
580 record this change to 'subdir/f1'? [Ynsfdaq?]
581 581 changeset: 25:49b3838dc9e7
582 582 tag: tip
583 583 user: test
584 584 date: Thu Jan 01 00:00:23 1970 +0000
585 585 summary: w1
586 586
587 587 diff -r 8fd83ff53ce6 -r 49b3838dc9e7 subdir/f1
588 588 --- a/subdir/f1 Thu Jan 01 00:00:22 1970 +0000
589 589 +++ b/subdir/f1 Thu Jan 01 00:00:23 1970 +0000
590 590 @@ -3,3 +3,4 @@
591 591 a
592 592 b
593 593 c
594 594 +d
595 595
General Comments 0
You need to be logged in to leave comments. Login now