Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 11836:53fdc0989047 stable
resolve: updated help documentation for improved clarity
author | Mark Edgington <edgimar@gmail.com> |
---|---|
date | Thu, 12 Aug 2010 22:48:22 +0200 |
parents | 9299b98041e8 |
children | b9d316bcc013 8f40125a0ed8 |
comparison
equal
deleted
inserted
replaced
11835:14db59e3b248 | 11836:53fdc0989047 |
---|---|
2956 return cmdutil.copy(ui, repo, pats, opts, rename=True) | 2956 return cmdutil.copy(ui, repo, pats, opts, rename=True) |
2957 finally: | 2957 finally: |
2958 wlock.release() | 2958 wlock.release() |
2959 | 2959 |
2960 def resolve(ui, repo, *pats, **opts): | 2960 def resolve(ui, repo, *pats, **opts): |
2961 """various operations to help finish a merge | 2961 """redo merges or set/view the merge status of files |
2962 | 2962 |
2963 This command includes several actions that are often useful while | 2963 Merges with unresolved conflicts are often the result of |
2964 performing a merge, after running ``merge`` but before running | 2964 non-interactive merging using the ``internal:merge`` hgrc setting, |
2965 ``commit``. (It is only meaningful if your working directory has | 2965 or a command-line merge tool like ``diff3``. The resolve command |
2966 two parents.) It is most relevant for merges with unresolved | 2966 is used to manage the files involved in a merge, after :hg:`merge` |
2967 conflicts, which are typically a result of non-interactive merging with | 2967 has been run, and before :hg:`commit` is run (i.e. the working |
2968 ``internal:merge`` or a command-line merge tool like ``diff3``. | 2968 directory must have two parents). |
2969 | 2969 |
2970 The available actions are: | 2970 The resolve command can be used in the following ways: |
2971 | 2971 |
2972 1) list files that were merged with conflicts (U, for unresolved) | 2972 - :hg:`resolve FILE...`: attempt to re-merge the specified files, |
2973 and without conflicts (R, for resolved): ``hg resolve -l`` | 2973 discarding any previous merge attempts. Re-merging is not |
2974 (this is like ``status`` for merges) | 2974 performed for files already marked as resolved. Use ``--all/-a`` |
2975 2) record that you have resolved conflicts in certain files: | 2975 to selects all unresolved files. |
2976 ``hg resolve -m [file ...]`` (default: mark all unresolved files) | 2976 |
2977 3) forget that you have resolved conflicts in certain files: | 2977 - :hg:`resolve -m [FILE]`: mark a file as having been resolved |
2978 ``hg resolve -u [file ...]`` (default: unmark all resolved files) | 2978 (e.g. after having manually fixed-up the files). The default is |
2979 4) discard your current attempt(s) at resolving conflicts and | 2979 to mark all unresolved files. |
2980 restart the merge from scratch: ``hg resolve file...`` | 2980 |
2981 (or ``-a`` for all unresolved files) | 2981 - :hg:`resolve -u [FILE]...`: mark a file as unresolved. The |
2982 | 2982 default is to mark all resolved files. |
2983 Note that Mercurial will not let you commit files with unresolved merge | 2983 |
2984 conflicts. You must use ``hg resolve -m ...`` before you can commit | 2984 - :hg:`resolve -l`: list files which had or still have conflicts. |
2985 after a conflicting merge. | 2985 In the printed list, ``U`` = unresolved and ``R`` = resolved. |
2986 | |
2987 Note that Mercurial will not let you commit files with unresolved | |
2988 merge conflicts. You must use :hg:`resolve -m ...` before you can | |
2989 commit after a conflicting merge. | |
2986 | 2990 |
2987 Returns 0 on success, 1 if any files fail a resolve attempt. | 2991 Returns 0 on success, 1 if any files fail a resolve attempt. |
2988 """ | 2992 """ |
2989 | 2993 |
2990 all, mark, unmark, show, nostatus = \ | 2994 all, mark, unmark, show, nostatus = \ |
4348 "resolve": | 4352 "resolve": |
4349 (resolve, | 4353 (resolve, |
4350 [('a', 'all', None, _('select all unresolved files')), | 4354 [('a', 'all', None, _('select all unresolved files')), |
4351 ('l', 'list', None, _('list state of files needing merge')), | 4355 ('l', 'list', None, _('list state of files needing merge')), |
4352 ('m', 'mark', None, _('mark files as resolved')), | 4356 ('m', 'mark', None, _('mark files as resolved')), |
4353 ('u', 'unmark', None, _('unmark files as resolved')), | 4357 ('u', 'unmark', None, _('mark files as unresolved')), |
4354 ('n', 'no-status', None, _('hide status prefix'))] | 4358 ('n', 'no-status', None, _('hide status prefix'))] |
4355 + walkopts, | 4359 + walkopts, |
4356 _('[OPTION]... [FILE]...')), | 4360 _('[OPTION]... [FILE]...')), |
4357 "revert": | 4361 "revert": |
4358 (revert, | 4362 (revert, |