Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 12765:5eed9ceebd64
merge: when --tool is specified, disable HGMERGE by setting to empty string
HGMERGE has different semantics than ui.merge. HGMERGE should hold the name
on an executable in your path, or an absolute tool path. As such, it's not
safe to simply copy the user's specified --tool value into HGMERGE. Instead,
we disable HGMERGE by setting it to an empty string.
author | Steve Borho <steve@borho.org> |
---|---|
date | Mon, 18 Oct 2010 23:20:14 -0500 |
parents | eaac5e8cb637 |
children | de793925862e |
comparison
equal
deleted
inserted
replaced
12764:ad2506f097d3 | 12765:5eed9ceebd64 |
---|---|
2587 node = opts.get('rev') | 2587 node = opts.get('rev') |
2588 | 2588 |
2589 t = opts.get('tool') | 2589 t = opts.get('tool') |
2590 if t: | 2590 if t: |
2591 if 'HGMERGE' in os.environ: | 2591 if 'HGMERGE' in os.environ: |
2592 os.environ['HGMERGE'] = t | 2592 os.environ['HGMERGE'] = '' |
2593 ui.setconfig('ui', 'merge', t) | 2593 ui.setconfig('ui', 'merge', t) |
2594 | 2594 |
2595 if not node: | 2595 if not node: |
2596 branch = repo.changectx(None).branch() | 2596 branch = repo.changectx(None).branch() |
2597 bheads = repo.branchheads(branch) | 2597 bheads = repo.branchheads(branch) |
2980 'use --all to remerge all files')) | 2980 'use --all to remerge all files')) |
2981 | 2981 |
2982 t = opts.get('tool') | 2982 t = opts.get('tool') |
2983 if t: | 2983 if t: |
2984 if 'HGMERGE' in os.environ: | 2984 if 'HGMERGE' in os.environ: |
2985 os.environ['HGMERGE'] = t | 2985 os.environ['HGMERGE'] = '' |
2986 ui.setconfig('ui', 'merge', t) | 2986 ui.setconfig('ui', 'merge', t) |
2987 | 2987 |
2988 ms = mergemod.mergestate(repo) | 2988 ms = mergemod.mergestate(repo) |
2989 m = cmdutil.match(repo, pats, opts) | 2989 m = cmdutil.match(repo, pats, opts) |
2990 ret = 0 | 2990 ret = 0 |