# HG changeset patch # User Siddharth Agarwal # Date 1444197393 25200 # Node ID 0ffa7fe1076be4cbbbfe2a44610f3d560e9911b6 # Parent d5d8cd0e0d5804fd7c7e63b93cd351db50647dcd filemerge: add a precheck for symlinks This will be used by internal merge tools. diff -r d5d8cd0e0d58 -r 0ffa7fe1076b mercurial/filemerge.py --- a/mercurial/filemerge.py Tue Oct 06 22:55:21 2015 -0700 +++ b/mercurial/filemerge.py Tue Oct 06 22:56:33 2015 -0700 @@ -228,6 +228,14 @@ util.copyfile(back, a) # restore from backup and try again return 1 # continue merging +def _symlinkcheck(repo, mynode, orig, fcd, fco, fca, toolconf): + tool, toolpath, binary, symlink = toolconf + if symlink: + repo.ui.warn(_('warning: internal :merge cannot merge symlinks ' + 'for %s\n') % fcd.path()) + return False + return True + def _merge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels, mode): """ Uses the internal non-interactive simple merge algorithm for merging