[PATCH 5 of 6] ignore: rename readignorefile to readpatternfile

Durham Goode durham at fb.com
Mon May 18 13:29:01 CDT 2015


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1431816346 25200
#      Sat May 16 15:45:46 2015 -0700
# Node ID 533b865c77371c6dcbd8283e65df8ac8df5e6fc2
# Parent  8f3107192afae4980357ab70d69a060f57e9ac9f
ignore: rename readignorefile to readpatternfile

A future commit will move the readignorefile logic into match.py so it can be
used from general match rules. Let's rename the function to represent this new
behavior.

diff --git a/mercurial/ignore.py b/mercurial/ignore.py
--- a/mercurial/ignore.py
+++ b/mercurial/ignore.py
@@ -11,7 +11,7 @@ import re
 
 _commentre = None
 
-def readignorefile(filepath):
+def readpatternfile(filepath):
     '''parse a pattern file, returning a list of
     patterns. These patterns should be given to compile()
     to be validated and converted into a match function.'''
@@ -63,7 +63,7 @@ def readpats(root, files, warn):
         if f in pats:
             continue
         try:
-            pats[f] = readignorefile(f)
+            pats[f] = readpatternfile(f)
         except IOError, inst:
             warn(_("skipping unreadable ignore file '%s': %s\n") %
                  (f, inst.strerror))


More information about the Mercurial-devel mailing list