Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filemerge.py @ 26515:0ffa7fe1076b
filemerge: add a precheck for symlinks
This will be used by internal merge tools.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 06 Oct 2015 22:56:33 -0700 |
parents | d5d8cd0e0d58 |
children | eb9876aa8770 |
comparison
equal
deleted
inserted
replaced
26514:d5d8cd0e0d58 | 26515:0ffa7fe1076b |
---|---|
226 return 0 | 226 return 0 |
227 if premerge not in validkeep: | 227 if premerge not in validkeep: |
228 util.copyfile(back, a) # restore from backup and try again | 228 util.copyfile(back, a) # restore from backup and try again |
229 return 1 # continue merging | 229 return 1 # continue merging |
230 | 230 |
231 def _symlinkcheck(repo, mynode, orig, fcd, fco, fca, toolconf): | |
232 tool, toolpath, binary, symlink = toolconf | |
233 if symlink: | |
234 repo.ui.warn(_('warning: internal :merge cannot merge symlinks ' | |
235 'for %s\n') % fcd.path()) | |
236 return False | |
237 return True | |
238 | |
231 def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): | 239 def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): |
232 """ | 240 """ |
233 Uses the internal non-interactive simple merge algorithm for merging | 241 Uses the internal non-interactive simple merge algorithm for merging |
234 files. It will fail if there are any conflicts and leave markers in | 242 files. It will fail if there are any conflicts and leave markers in |
235 the partially merged file. Markers will have two sections, one for each side | 243 the partially merged file. Markers will have two sections, one for each side |