Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 10559:b1339234080e stable
resolve: rewrite help to be clearer and more complete (issue2030).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Mon, 01 Mar 2010 15:41:21 -0500 |
parents | fac67f0bfbb2 |
children | 6ded6243bde2 |
comparison
equal
deleted
inserted
replaced
10558:6505773080e4 | 10559:b1339234080e |
---|---|
2527 return cmdutil.copy(ui, repo, pats, opts, rename=True) | 2527 return cmdutil.copy(ui, repo, pats, opts, rename=True) |
2528 finally: | 2528 finally: |
2529 wlock.release() | 2529 wlock.release() |
2530 | 2530 |
2531 def resolve(ui, repo, *pats, **opts): | 2531 def resolve(ui, repo, *pats, **opts): |
2532 """retry file merges from a merge or update | 2532 """various operations to help finish a merge |
2533 | 2533 |
2534 This command can cleanly retry unresolved file merges using file | 2534 This command includes several actions that are often useful while |
2535 revisions preserved from the last update or merge. | 2535 performing a merge, after running ``merge`` but before running |
2536 | 2536 ``commit``. (It is only meaningful if your working directory has |
2537 If a conflict is resolved manually, please note that the changes | 2537 two parents.) It is most relevant for merges with unresolved |
2538 will be overwritten if the merge is retried with resolve. The | 2538 conflicts, which are typically a result of non-interactive merging with |
2539 -m/--mark switch should be used to mark the file as resolved. | 2539 ``internal:merge`` or a command-line merge tool like ``diff3``. |
2540 | 2540 |
2541 You can specify a set of files to operate on, or use the -a/--all | 2541 The available actions are: |
2542 switch to select all unresolved files. | 2542 |
2543 | 2543 1) list files that were merged with conflicts (U, for unresolved) |
2544 This command also allows listing resolved files and manually | 2544 and without conflicts (R, for resolved): ``hg resolve -l`` |
2545 indicating whether or not files are resolved. All files must be | 2545 (this is like ``status`` for merges) |
2546 marked as resolved before a commit is permitted. | 2546 2) record that you have resolved conflicts in certain files: |
2547 | 2547 ``hg resolve -m [file ...]`` (default: mark all unresolved files) |
2548 The codes used to show the status of files are:: | 2548 3) forget that you have resolved conflicts in certain files: |
2549 | 2549 ``hg resolve -u [file ...]`` (default: unmark all resolved files) |
2550 U = unresolved | 2550 4) discard your current attempt(s) at resolving conflicts and |
2551 R = resolved | 2551 restart the merge from scratch: ``hg resolve file...`` |
2552 (or ``-a`` for all unresolved files) | |
2553 | |
2554 Note that Mercurial will not let you commit files with unresolved merge | |
2555 conflicts. You must use ``hg resolve -m ...`` before you can commit | |
2556 after a conflicting merge. | |
2552 """ | 2557 """ |
2553 | 2558 |
2554 all, mark, unmark, show, nostatus = \ | 2559 all, mark, unmark, show, nostatus = \ |
2555 [opts.get(o) for o in 'all mark unmark list no_status'.split()] | 2560 [opts.get(o) for o in 'all mark unmark list no_status'.split()] |
2556 | 2561 |