Mercurial > hg
comparison mercurial/filemerge.py @ 18257:a35d0128545e
merge: never do premerge on symlinks
Simplemerge is not symlink aware and will never do the right thing on symlinks.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 08 Jan 2013 04:15:46 +0100 |
parents | d084df89d948 |
children | 297bf69966a0 |
comparison
equal
deleted
inserted
replaced
18256:d084df89d948 | 18257:a35d0128545e |
---|---|
169 used to resolve these conflicts.""" | 169 used to resolve these conflicts.""" |
170 return 1 | 170 return 1 |
171 | 171 |
172 def _premerge(repo, toolconf, files): | 172 def _premerge(repo, toolconf, files): |
173 tool, toolpath, binary, symlink = toolconf | 173 tool, toolpath, binary, symlink = toolconf |
174 if symlink: | |
175 return 1 | |
174 a, b, c, back = files | 176 a, b, c, back = files |
175 | 177 |
176 ui = repo.ui | 178 ui = repo.ui |
177 | 179 |
178 # do we attempt to simplemerge first? | 180 # do we attempt to simplemerge first? |
179 try: | 181 try: |
180 premerge = _toolbool(ui, tool, "premerge", not (binary or symlink)) | 182 premerge = _toolbool(ui, tool, "premerge", not binary) |
181 except error.ConfigError: | 183 except error.ConfigError: |
182 premerge = _toolstr(ui, tool, "premerge").lower() | 184 premerge = _toolstr(ui, tool, "premerge").lower() |
183 valid = 'keep'.split() | 185 valid = 'keep'.split() |
184 if premerge not in valid: | 186 if premerge not in valid: |
185 _valid = ', '.join(["'" + v + "'" for v in valid]) | 187 _valid = ', '.join(["'" + v + "'" for v in valid]) |