changeset 18089:0127366df8fe

ignore: process hgignore files in deterministic order Previously, we processed them in whatever order the dict iterator gave us.
author Bryan O'Sullivan <bryano@fb.com>
date Mon, 17 Dec 2012 15:57:02 -0800
parents 52620e5db2f6
children 9abc55ef85b5
files mercurial/ignore.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ignore.py	Mon Dec 17 15:52:44 2012 -0800
+++ b/mercurial/ignore.py	Mon Dec 17 15:57:02 2012 -0800
@@ -70,7 +70,7 @@
             if f != files[0]:
                 warn(_("skipping unreadable ignore file '%s': %s\n") %
                      (f, inst.strerror))
-    return pats
+    return [(f, pats[f]) for f in files if f in pats]
 
 def ignore(root, files, warn):
     '''return matcher covering patterns in 'files'.
@@ -95,7 +95,7 @@
     pats = readpats(root, files, warn)
 
     allpats = []
-    for patlist in pats.values():
+    for f, patlist in pats:
         allpats.extend(patlist)
     if not allpats:
         return util.never
@@ -104,7 +104,7 @@
         ignorefunc = match.match(root, '', [], allpats)
     except util.Abort:
         # Re-raise an exception where the src is the right file
-        for f, patlist in pats.iteritems():
+        for f, patlist in pats:
             try:
                 match.match(root, '', [], patlist)
             except util.Abort, inst: