Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filemerge.py @ 16254:c7eef052c9e3 stable
filemerge: restore default prompt for binary/symlink lost in 83925d3a4559
This could result in a traceback.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 13 Mar 2012 15:12:26 -0500 |
parents | b605448eb254 |
children | c655e4acaa82 |
comparison
equal
deleted
inserted
replaced
16252:cf17e76be4dd | 16254:c7eef052c9e3 |
---|---|
95 tools.append((None, "hgmerge")) # the old default, if found | 95 tools.append((None, "hgmerge")) # the old default, if found |
96 for p, t in tools: | 96 for p, t in tools: |
97 if check(t, None, symlink, binary): | 97 if check(t, None, symlink, binary): |
98 toolpath = _findtool(ui, t) | 98 toolpath = _findtool(ui, t) |
99 return (t, '"' + toolpath + '"') | 99 return (t, '"' + toolpath + '"') |
100 # internal merge as last resort | 100 |
101 return (not (symlink or binary) and "internal:merge" or None, None) | 101 # internal merge or prompt as last resort |
102 if symlink or binary: | |
103 return "internal:prompt", None | |
104 return "internal:merge", None | |
102 | 105 |
103 def _eoltype(data): | 106 def _eoltype(data): |
104 "Guess the EOL type of a file" | 107 "Guess the EOL type of a file" |
105 if '\0' in data: # binary | 108 if '\0' in data: # binary |
106 return None | 109 return None |