Patchwork [2,of,3] ignore: only read an ignore file once

login
register
mail settings
Submitter Bryan O'Sullivan
Date Dec. 18, 2012, 12:30 a.m.
Message ID <588d2a23ca25b43dd4af.1355790602@fedora>
Download mbox | patch
Permalink /patch/178/
State Accepted
Commit 52620e5db2f6631fd6b068dd8f779e2772562250
Headers show

Comments

Bryan O'Sullivan - Dec. 18, 2012, 12:30 a.m.
# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1355788364 28800
# Node ID 588d2a23ca25b43dd4afd1a194343635a1255992
# Parent  c0143219521a427970cc224f0c4ea3ac7428236f
ignore: only read an ignore file once

Patch

diff --git a/mercurial/ignore.py b/mercurial/ignore.py
--- a/mercurial/ignore.py
+++ b/mercurial/ignore.py
@@ -57,6 +57,8 @@ 
 
     pats = {}
     for f in files:
+        if f in pats:
+            continue
         try:
             pats[f] = []
             fp = open(f)