Show More
@@ -296,9 +296,9 b' def filterpatch(ui, chunks):' | |||||
296 | ui.write("\n") |
|
296 | ui.write("\n") | |
297 | if r == 7: # ? |
|
297 | if r == 7: # ? | |
298 | doc = gettext(record.__doc__) |
|
298 | doc = gettext(record.__doc__) | |
299 |
c = doc.find( |
|
299 | c = doc.find('::') + 2 | |
300 | for l in doc[c:].splitlines(): |
|
300 | for l in doc[c:].splitlines(): | |
301 | if l: |
|
301 | if l.startswith(' '): | |
302 | ui.write(l.strip(), '\n') |
|
302 | ui.write(l.strip(), '\n') | |
303 | continue |
|
303 | continue | |
304 | elif r == 0: # yes |
|
304 | elif r == 0: # yes | |
@@ -380,7 +380,9 b' def record(ui, repo, *pats, **opts):' | |||||
380 | a - record all changes to all remaining files |
|
380 | a - record all changes to all remaining files | |
381 | q - quit, recording no changes |
|
381 | q - quit, recording no changes | |
382 |
|
382 | |||
383 |
? - display help |
|
383 | ? - display help | |
|
384 | ||||
|
385 | This command is not available when committing a merge.''' | |||
384 |
|
386 | |||
385 | dorecord(ui, repo, commands.commit, *pats, **opts) |
|
387 | dorecord(ui, repo, commands.commit, *pats, **opts) | |
386 |
|
388 | |||
@@ -419,10 +421,15 b' def dorecord(ui, repo, commitfunc, *pats' | |||||
419 | After the actual job is done by non-interactive command, working dir |
|
421 | After the actual job is done by non-interactive command, working dir | |
420 | state is restored to original. |
|
422 | state is restored to original. | |
421 |
|
423 | |||
422 | In the end we'll record intresting changes, and everything else will be |
|
424 | In the end we'll record interesting changes, and everything else will be | |
423 | left in place, so the user can continue his work. |
|
425 | left in place, so the user can continue his work. | |
424 | """ |
|
426 | """ | |
425 |
|
427 | |||
|
428 | merge = len(repo[None].parents()) > 1 | |||
|
429 | if merge: | |||
|
430 | raise util.Abort(_('cannot partially commit a merge ' | |||
|
431 | '(use hg commit instead)')) | |||
|
432 | ||||
426 | changes = repo.status(match=match)[:3] |
|
433 | changes = repo.status(match=match)[:3] | |
427 | diffopts = mdiff.diffopts(git=True, nodates=True) |
|
434 | diffopts = mdiff.diffopts(git=True, nodates=True) | |
428 | chunks = patch.diff(repo, changes=changes, opts=diffopts) |
|
435 | chunks = patch.diff(repo, changes=changes, opts=diffopts) |
@@ -301,9 +301,20 b' y' | |||||
301 | EOF |
|
301 | EOF | |
302 | echo; hg tip --config diff.git=True -p |
|
302 | echo; hg tip --config diff.git=True -p | |
303 |
|
303 | |||
|
304 | cd .. | |||
|
305 | ||||
|
306 | echo % abort early when a merge is in progress | |||
|
307 | hg up 4 | |||
|
308 | touch iwillmergethat | |||
|
309 | hg add iwillmergethat | |||
|
310 | hg branch thatbranch | |||
|
311 | hg ci -m'new head' | |||
|
312 | hg up default | |||
|
313 | hg merge thatbranch | |||
|
314 | echo; hg record -m'will abort' | |||
|
315 | hg up -C | |||
304 |
|
316 | |||
305 | echo % with win32ext |
|
317 | echo % with win32ext | |
306 | cd .. |
|
|||
307 | echo '[extensions]' >> .hg/hgrc |
|
318 | echo '[extensions]' >> .hg/hgrc | |
308 | echo 'win32text = ' >> .hg/hgrc |
|
319 | echo 'win32text = ' >> .hg/hgrc | |
309 | echo '[decode]' >> .hg/hgrc |
|
320 | echo '[decode]' >> .hg/hgrc |
@@ -24,6 +24,8 b' interactively select changes to commit' | |||||
24 |
|
24 | |||
25 | ? - display help |
|
25 | ? - display help | |
26 |
|
26 | |||
|
27 | This command is not available when committing a merge. | |||
|
28 | ||||
27 | options: |
|
29 | options: | |
28 |
|
30 | |||
29 | -A --addremove mark new/missing files as added/removed before committing |
|
31 | -A --addremove mark new/missing files as added/removed before committing | |
@@ -626,6 +628,15 b' new mode 100644' | |||||
626 | b |
|
628 | b | |
627 | +c |
|
629 | +c | |
628 |
|
630 | |||
|
631 | % abort early when a merge is in progress | |||
|
632 | 1 files updated, 0 files merged, 5 files removed, 0 files unresolved | |||
|
633 | marked working directory as branch thatbranch | |||
|
634 | 5 files updated, 0 files merged, 2 files removed, 0 files unresolved | |||
|
635 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
636 | (branch merge, don't forget to commit) | |||
|
637 | ||||
|
638 | abort: cannot partially commit a merge (use hg commit instead) | |||
|
639 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
629 | % with win32ext |
|
640 | % with win32ext | |
630 | diff --git a/subdir/f1 b/subdir/f1 |
|
641 | diff --git a/subdir/f1 b/subdir/f1 | |
631 | 1 hunks, 1 lines changed |
|
642 | 1 hunks, 1 lines changed | |
@@ -637,8 +648,9 b" examine changes to 'subdir/f1'? [Ynsfdaq" | |||||
637 | +d |
|
648 | +d | |
638 | record this change to 'subdir/f1'? [Ynsfdaq?] |
|
649 | record this change to 'subdir/f1'? [Ynsfdaq?] | |
639 |
|
650 | |||
640 |
changeset: 2 |
|
651 | changeset: 26:5bacc1f6e9cf | |
641 | tag: tip |
|
652 | tag: tip | |
|
653 | parent: 24:1460f6e47966 | |||
642 | user: test |
|
654 | user: test | |
643 | date: Thu Jan 01 00:00:23 1970 +0000 |
|
655 | date: Thu Jan 01 00:00:23 1970 +0000 | |
644 | summary: w1 |
|
656 | summary: w1 |
General Comments 0
You need to be logged in to leave comments.
Login now