hgext/largefiles/overrides.py
branchstable
changeset 22169 35cc5b07b3fc
parent 22168 1b9d0dc1bbe1
child 22170 0e1b02f984c7
--- a/hgext/largefiles/overrides.py	Wed Aug 13 15:13:50 2014 -0700
+++ b/hgext/largefiles/overrides.py	Wed Aug 13 15:18:41 2014 -0700
@@ -299,11 +299,25 @@
 
         return m, pats
 
+    # For hg log --patch, the match object is used in two different senses:
+    # (1) to determine what revisions should be printed out, and
+    # (2) to determine what files to print out diffs for.
+    # The magic matchandpats override should be used for case (1) but not for
+    # case (2).
+    def overridemakelogfilematcher(repo, pats, opts):
+        pctx = repo[None]
+        match, pats = oldmatchandpats(pctx, pats, opts)
+        return lambda rev: match
+
     oldmatchandpats = installmatchandpatsfn(overridematchandpats)
+    oldmakelogfilematcher = cmdutil._makenofollowlogfilematcher
+    setattr(cmdutil, '_makenofollowlogfilematcher', overridemakelogfilematcher)
+
     try:
         return orig(ui, repo, *pats, **opts)
     finally:
         restorematchandpatsfn()
+        setattr(cmdutil, '_makenofollowlogfilematcher', oldmakelogfilematcher)
 
 def overrideverify(orig, ui, repo, *pats, **opts):
     large = opts.pop('large', False)