Patchwork [2,of,5] filemerge: rename _symlinkcheck to _mergecheck

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 12, 2015, 10:29 p.m.
Message ID <34326e0cf6435e87149a.1447367371@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11385/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 12, 2015, 10:29 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1447292068 28800
#      Wed Nov 11 17:34:28 2015 -0800
# Node ID 34326e0cf6435e87149adecc8e74039ac403fe75
# Parent  e96e5636da409ad20feb472774ef0824ea70caf5
filemerge: rename _symlinkcheck to _mergecheck

We're going to be adding other checks in here soon.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -243,7 +243,7 @@  def _premerge(repo, toolconf, files, lab
             util.copyfile(back, a) # restore from backup and try again
     return 1 # continue merging
 
-def _symlinkcheck(repo, mynode, orig, fcd, fco, fca, toolconf):
+def _mergecheck(repo, mynode, orig, fcd, fco, fca, toolconf):
     tool, toolpath, binary, symlink = toolconf
     if symlink:
         repo.ui.warn(_('warning: internal %s cannot merge symlinks '
@@ -267,7 +267,7 @@  def _merge(repo, mynode, orig, fcd, fco,
 @internaltool('union', fullmerge,
               _("warning: conflicts while merging %s! "
                 "(edit, then use 'hg resolve --mark')\n"),
-              precheck=_symlinkcheck)
+              precheck=_mergecheck)
 def _iunion(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
     """
     Uses the internal non-interactive simple merge algorithm for merging
@@ -279,7 +279,7 @@  def _iunion(repo, mynode, orig, fcd, fco
 @internaltool('merge', fullmerge,
               _("warning: conflicts while merging %s! "
                 "(edit, then use 'hg resolve --mark')\n"),
-              precheck=_symlinkcheck)
+              precheck=_mergecheck)
 def _imerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
     """
     Uses the internal non-interactive simple merge algorithm for merging
@@ -292,7 +292,7 @@  def _imerge(repo, mynode, orig, fcd, fco
 @internaltool('merge3', fullmerge,
               _("warning: conflicts while merging %s! "
                 "(edit, then use 'hg resolve --mark')\n"),
-              precheck=_symlinkcheck)
+              precheck=_mergecheck)
 def _imerge3(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
     """
     Uses the internal non-interactive simple merge algorithm for merging
@@ -317,7 +317,7 @@  def _imergeauto(repo, mynode, orig, fcd,
                                 localorother=localorother)
     return True, r
 
-@internaltool('merge-local', mergeonly, precheck=_symlinkcheck)
+@internaltool('merge-local', mergeonly, precheck=_mergecheck)
 def _imergelocal(*args, **kwargs):
     """
     Like :merge, but resolve all conflicts non-interactively in favor
@@ -325,7 +325,7 @@  def _imergelocal(*args, **kwargs):
     success, status = _imergeauto(localorother='local', *args, **kwargs)
     return success, status
 
-@internaltool('merge-other', mergeonly, precheck=_symlinkcheck)
+@internaltool('merge-other', mergeonly, precheck=_mergecheck)
 def _imergeother(*args, **kwargs):
     """
     Like :merge, but resolve all conflicts non-interactively in favor