Show More
@@ -2563,11 +2563,17 b' def merge(ui, repo, node=None, **opts):' | |||||
2563 | updates to the repository are allowed. The next commit will have |
|
2563 | updates to the repository are allowed. The next commit will have | |
2564 | two parents. |
|
2564 | two parents. | |
2565 |
|
2565 | |||
|
2566 | ``--tool`` can be used to specify the merge tool used for file | |||
|
2567 | merges. It overrides the HGMERGE environment variable and your | |||
|
2568 | configuration files. | |||
|
2569 | ||||
2566 | If no revision is specified, the working directory's parent is a |
|
2570 | If no revision is specified, the working directory's parent is a | |
2567 | head revision, and the current branch contains exactly one other |
|
2571 | head revision, and the current branch contains exactly one other | |
2568 | head, the other head is merged with by default. Otherwise, an |
|
2572 | head, the other head is merged with by default. Otherwise, an | |
2569 | explicit revision with which to merge with must be provided. |
|
2573 | explicit revision with which to merge with must be provided. | |
2570 |
|
2574 | |||
|
2575 | :hg:`resolve` must be used to resolve unresolved files. | |||
|
2576 | ||||
2571 | To undo an uncommitted merge, use :hg:`update --clean .` which |
|
2577 | To undo an uncommitted merge, use :hg:`update --clean .` which | |
2572 | will check out a clean copy of the original merge parent, losing |
|
2578 | will check out a clean copy of the original merge parent, losing | |
2573 | all changes. |
|
2579 | all changes. | |
@@ -2580,6 +2586,12 b' def merge(ui, repo, node=None, **opts):' | |||||
2580 | if not node: |
|
2586 | if not node: | |
2581 | node = opts.get('rev') |
|
2587 | node = opts.get('rev') | |
2582 |
|
2588 | |||
|
2589 | t = opts.get('tool') | |||
|
2590 | if t: | |||
|
2591 | if 'HGMERGE' in os.environ: | |||
|
2592 | os.environ['HGMERGE'] = t | |||
|
2593 | ui.setconfig('ui', 'merge', t) | |||
|
2594 | ||||
2583 | if not node: |
|
2595 | if not node: | |
2584 | branch = repo.changectx(None).branch() |
|
2596 | branch = repo.changectx(None).branch() | |
2585 | bheads = repo.branchheads(branch) |
|
2597 | bheads = repo.branchheads(branch) | |
@@ -2932,10 +2944,12 b' def resolve(ui, repo, *pats, **opts):' | |||||
2932 |
|
2944 | |||
2933 | The resolve command can be used in the following ways: |
|
2945 | The resolve command can be used in the following ways: | |
2934 |
|
2946 | |||
2935 |
- :hg:`resolve FILE...`: attempt to re-merge the specified |
|
2947 | - :hg:`resolve [--tool] FILE...`: attempt to re-merge the specified | |
2936 | discarding any previous merge attempts. Re-merging is not |
|
2948 | files, discarding any previous merge attempts. Re-merging is not | |
2937 | performed for files already marked as resolved. Use ``--all/-a`` |
|
2949 | performed for files already marked as resolved. Use ``--all/-a`` | |
2938 | to selects all unresolved files. |
|
2950 | to selects all unresolved files. ``--tool`` can be used to specify | |
|
2951 | the merge tool used for the given files. It overrides the HGMERGE | |||
|
2952 | environment variable and your configuration files. | |||
2939 |
|
2953 | |||
2940 | - :hg:`resolve -m [FILE]`: mark a file as having been resolved |
|
2954 | - :hg:`resolve -m [FILE]`: mark a file as having been resolved | |
2941 | (e.g. after having manually fixed-up the files). The default is |
|
2955 | (e.g. after having manually fixed-up the files). The default is | |
@@ -2965,6 +2979,12 b' def resolve(ui, repo, *pats, **opts):' | |||||
2965 | raise util.Abort(_('no files or directories specified; ' |
|
2979 | raise util.Abort(_('no files or directories specified; ' | |
2966 | 'use --all to remerge all files')) |
|
2980 | 'use --all to remerge all files')) | |
2967 |
|
2981 | |||
|
2982 | t = opts.get('tool') | |||
|
2983 | if t: | |||
|
2984 | if 'HGMERGE' in os.environ: | |||
|
2985 | os.environ['HGMERGE'] = t | |||
|
2986 | ui.setconfig('ui', 'merge', t) | |||
|
2987 | ||||
2968 | ms = mergemod.mergestate(repo) |
|
2988 | ms = mergemod.mergestate(repo) | |
2969 | m = cmdutil.match(repo, pats, opts) |
|
2989 | m = cmdutil.match(repo, pats, opts) | |
2970 | ret = 0 |
|
2990 | ret = 0 | |
@@ -4270,6 +4290,7 b' table = {' | |||||
4270 | "^merge": |
|
4290 | "^merge": | |
4271 | (merge, |
|
4291 | (merge, | |
4272 | [('f', 'force', None, _('force a merge with outstanding changes')), |
|
4292 | [('f', 'force', None, _('force a merge with outstanding changes')), | |
|
4293 | ('t', 'tool', '', _('specify merge tool')), | |||
4273 | ('r', 'rev', '', |
|
4294 | ('r', 'rev', '', | |
4274 | _('revision to merge'), _('REV')), |
|
4295 | _('revision to merge'), _('REV')), | |
4275 | ('P', 'preview', None, |
|
4296 | ('P', 'preview', None, | |
@@ -4338,6 +4359,7 b' table = {' | |||||
4338 | ('l', 'list', None, _('list state of files needing merge')), |
|
4359 | ('l', 'list', None, _('list state of files needing merge')), | |
4339 | ('m', 'mark', None, _('mark files as resolved')), |
|
4360 | ('m', 'mark', None, _('mark files as resolved')), | |
4340 | ('u', 'unmark', None, _('mark files as unresolved')), |
|
4361 | ('u', 'unmark', None, _('mark files as unresolved')), | |
|
4362 | ('t', 'tool', '', _('specify merge tool')), | |||
4341 | ('n', 'no-status', None, _('hide status prefix'))] |
|
4363 | ('n', 'no-status', None, _('hide status prefix'))] | |
4342 | + walkopts, |
|
4364 | + walkopts, | |
4343 | _('[OPTION]... [FILE]...')), |
|
4365 | _('[OPTION]... [FILE]...')), |
@@ -186,7 +186,7 b' Show all commands + options' | |||||
186 | forget: include, exclude |
|
186 | forget: include, exclude | |
187 | init: ssh, remotecmd |
|
187 | init: ssh, remotecmd | |
188 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, style, template, include, exclude |
|
188 | log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, branch, prune, patch, git, limit, no-merges, stat, style, template, include, exclude | |
189 | merge: force, rev, preview |
|
189 | merge: force, tool, rev, preview | |
190 | pull: update, force, rev, branch, ssh, remotecmd |
|
190 | pull: update, force, rev, branch, ssh, remotecmd | |
191 | push: force, rev, branch, new-branch, ssh, remotecmd |
|
191 | push: force, rev, branch, new-branch, ssh, remotecmd | |
192 | remove: after, force, include, exclude |
|
192 | remove: after, force, include, exclude | |
@@ -236,7 +236,7 b' Show all commands + options' | |||||
236 | paths: |
|
236 | paths: | |
237 | recover: |
|
237 | recover: | |
238 | rename: after, force, include, exclude, dry-run |
|
238 | rename: after, force, include, exclude, dry-run | |
239 | resolve: all, list, mark, unmark, no-status, include, exclude |
|
239 | resolve: all, list, mark, unmark, tool, no-status, include, exclude | |
240 | revert: all, date, rev, no-backup, include, exclude, dry-run |
|
240 | revert: all, date, rev, no-backup, include, exclude, dry-run | |
241 | rollback: dry-run |
|
241 | rollback: dry-run | |
242 | root: |
|
242 | root: |
General Comments 0
You need to be logged in to leave comments.
Login now