comparison mercurial/filemerge.py @ 18256:d084df89d948

merge: make internal merge fail cleanly on symlinks Simplemerge is not symlink aware and will never do the the right thing on symlinks. It would read the symlink as a file and abort with 'No such file or directory' on dangling symlinks. Instead, internal:merge now simply fails to merge symlinks.
author Mads Kiilerich <mads@kiilerich.com>
date Tue, 08 Jan 2013 04:15:41 +0100
parents 9a2cf955db84
children a35d0128545e
comparison
equal deleted inserted replaced
18255:7ca534f31a83 18256:d084df89d948
202 def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files): 202 def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files):
203 """ 203 """
204 Uses the internal non-interactive simple merge algorithm for merging 204 Uses the internal non-interactive simple merge algorithm for merging
205 files. It will fail if there are any conflicts and leave markers in 205 files. It will fail if there are any conflicts and leave markers in
206 the partially merged file.""" 206 the partially merged file."""
207 tool, toolpath, binary, symlink = toolconf
208 if symlink:
209 return False, 1
210
207 r = _premerge(repo, toolconf, files) 211 r = _premerge(repo, toolconf, files)
208 if r: 212 if r:
209 a, b, c, back = files 213 a, b, c, back = files
210 214
211 ui = repo.ui 215 ui = repo.ui