<div dir="ltr">I've pushed this to the clowncopter, thanks.<br><br>There are still 3 cases of ".bad = " in the codebase. Did you intentionally not update those? Will they be dealt with in another series?</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 5, 2015 at 9:00 PM Matt Harbison <<a href="mailto:mharbison72@gmail.com">mharbison72@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Matt Harbison <<a href="mailto:matt_harbison@yahoo.com" target="_blank">matt_harbison@yahoo.com</a>><br>
# Date 1433559195 14400<br>
#      Fri Jun 05 22:53:15 2015 -0400<br>
# Node ID 2e18852e1324a67455c39a1a39b5a2c266c1d387<br>
# Parent  63faca7efc382bd10477106373596e81b7129576<br>
largefiles: use the optional badfn argument when building a matcher<br>
<br>
The monkey patching in cat() can't be fixed, because it still delegates to the<br>
original bad().  Overriding <a href="http://commands.cat" target="_blank">commands.cat</a>() should go away in favor overriding<br>
<a href="http://cmdutil.cat" target="_blank">cmdutil.cat</a>() anyway, and that matcher can be wrapped with matchmod.badmatch().<br>
<br>
diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py<br>
--- a/hgext/largefiles/lfutil.py<br>
+++ b/hgext/largefiles/lfutil.py<br>
@@ -241,16 +241,18 @@<br>
 def getstandinmatcher(repo, rmatcher=None):<br>
     '''Return a match object that applies rmatcher to the standin directory'''<br>
     standindir = repo.wjoin(shortname)<br>
+<br>
+    # no warnings about missing files or directories<br>
+    badfn = lambda f, msg: None<br>
+<br>
     if rmatcher and not rmatcher.always():<br>
         pats = [os.path.join(standindir, pat) for pat in rmatcher.files()]<br>
-        match = scmutil.match(repo[None], pats)<br>
+        match = scmutil.match(repo[None], pats, badfn=badfn)<br>
         # if pats is empty, it would incorrectly always match, so clear _always<br>
         match._always = False<br>
     else:<br>
         # no patterns: relative to repo root<br>
-        match = scmutil.match(repo[None], [standindir])<br>
-    # no warnings about missing files or directories<br>
-    match.bad = lambda f, msg: None<br>
+        match = scmutil.match(repo[None], [standindir], badfn=badfn)<br>
     return match<br>
<br>
 def composestandinmatcher(repo, rmatcher):<br>
_______________________________________________<br>
Mercurial-devel mailing list<br>
<a href="mailto:Mercurial-devel@selenic.com" target="_blank">Mercurial-devel@selenic.com</a><br>
<a href="https://selenic.com/mailman/listinfo/mercurial-devel" target="_blank">https://selenic.com/mailman/listinfo/mercurial-devel</a><br>
</blockquote></div>