Patchwork [5,of,6] ignore: rename readignorefile to readpatternfile

login
register
mail settings
Submitter Durham Goode
Date May 18, 2015, 6:29 p.m.
Message ID <533b865c77371c6dcbd8.1431973741@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/9139/
State Accepted
Headers show

Comments

Durham Goode - May 18, 2015, 6:29 p.m.
# HG changeset patch
# User Durham Goode <durham@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.

Patch

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))