# HG changeset patch # User Bryan O'Sullivan # Date 2012-12-17 23:57:02 # Node ID 0127366df8fef5f1b1889f4387de341b94128b92 # Parent 52620e5db2f6631fd6b068dd8f779e2772562250 ignore: process hgignore files in deterministic order Previously, we processed them in whatever order the dict iterator gave us. diff --git a/mercurial/ignore.py b/mercurial/ignore.py --- a/mercurial/ignore.py +++ b/mercurial/ignore.py @@ -70,7 +70,7 @@ def readpats(root, files, warn): 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 @@ def ignore(root, files, warn): 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 @@ def ignore(root, files, warn): 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: