1768 """ |
1768 """ |
1769 opts = pycompat.byteskwargs(opts) |
1769 opts = pycompat.byteskwargs(opts) |
1770 overrides = {} |
1770 overrides = {} |
1771 if opts['tool']: |
1771 if opts['tool']: |
1772 overrides[('ui', 'forcemerge')] = opts['tool'] |
1772 overrides[('ui', 'forcemerge')] = opts['tool'] |
1773 ui.note(('with --tool %r\n') % (opts['tool'])) |
1773 ui.note(('with --tool %r\n') % (pycompat.bytestr(opts['tool']))) |
1774 |
1774 |
1775 with ui.configoverride(overrides, 'debugmergepatterns'): |
1775 with ui.configoverride(overrides, 'debugmergepatterns'): |
1776 hgmerge = encoding.environ.get("HGMERGE") |
1776 hgmerge = encoding.environ.get("HGMERGE") |
1777 if hgmerge is not None: |
1777 if hgmerge is not None: |
1778 ui.note(('with HGMERGE=%r\n') % (hgmerge)) |
1778 ui.note(('with HGMERGE=%r\n') % (pycompat.bytestr(hgmerge))) |
1779 uimerge = ui.config("ui", "merge") |
1779 uimerge = ui.config("ui", "merge") |
1780 if uimerge: |
1780 if uimerge: |
1781 ui.note(('with ui.merge=%r\n') % (uimerge)) |
1781 ui.note(('with ui.merge=%r\n') % (pycompat.bytestr(uimerge))) |
1782 |
1782 |
1783 ctx = scmutil.revsingle(repo, opts.get('rev')) |
1783 ctx = scmutil.revsingle(repo, opts.get('rev')) |
1784 m = scmutil.match(ctx, pats, opts) |
1784 m = scmutil.match(ctx, pats, opts) |
1785 changedelete = opts['changedelete'] |
1785 changedelete = opts['changedelete'] |
1786 for path in ctx.walk(m): |
1786 for path in ctx.walk(m): |