Patchwork [1,of,3] eol: fix variable naming - call it _eolmatch instead of _eolfile

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 9, 2016, 2:19 p.m.
Message ID <408ddba4689de432fe77.1476022779@madski>
Download mbox | patch
Permalink /patch/17011/
State Accepted
Headers show

Comments

Mads Kiilerich - Oct. 9, 2016, 2:19 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1476020562 -7200
#      Sun Oct 09 15:42:42 2016 +0200
# Node ID 408ddba4689de432fe77e0ba8d27765b63719180
# Parent  dbcef8918bbdd8a64d9f79a37bcfa284a26f3a39
eol: fix variable naming - call it _eolmatch instead of _eolfile

It is not the file but a match object based on it.

Patch

diff --git a/hgext/eol.py b/hgext/eol.py
--- a/hgext/eol.py
+++ b/hgext/eol.py
@@ -305,9 +305,9 @@  def reposetup(ui, repo):
             return eol.match
 
         def _hgcleardirstate(self):
-            self._eolfile = self.loadeol([None, 'tip'])
-            if not self._eolfile:
-                self._eolfile = util.never
+            self._eolmatch = self.loadeol([None, 'tip'])
+            if not self._eolmatch:
+                self._eolmatch = util.never
                 return
 
             try:
@@ -344,7 +344,7 @@  def reposetup(ui, repo):
 
         def commitctx(self, ctx, haserror=False):
             for f in sorted(ctx.added() + ctx.modified()):
-                if not self._eolfile(f):
+                if not self._eolmatch(f):
                     continue
                 fctx = ctx[f]
                 if fctx is None: