297 return r |
297 return r |
298 m.matchfn = lfmatchfn |
298 m.matchfn = lfmatchfn |
299 |
299 |
300 return m, pats |
300 return m, pats |
301 |
301 |
|
302 # For hg log --patch, the match object is used in two different senses: |
|
303 # (1) to determine what revisions should be printed out, and |
|
304 # (2) to determine what files to print out diffs for. |
|
305 # The magic matchandpats override should be used for case (1) but not for |
|
306 # case (2). |
|
307 def overridemakelogfilematcher(repo, pats, opts): |
|
308 pctx = repo[None] |
|
309 match, pats = oldmatchandpats(pctx, pats, opts) |
|
310 return lambda rev: match |
|
311 |
302 oldmatchandpats = installmatchandpatsfn(overridematchandpats) |
312 oldmatchandpats = installmatchandpatsfn(overridematchandpats) |
|
313 oldmakelogfilematcher = cmdutil._makenofollowlogfilematcher |
|
314 setattr(cmdutil, '_makenofollowlogfilematcher', overridemakelogfilematcher) |
|
315 |
303 try: |
316 try: |
304 return orig(ui, repo, *pats, **opts) |
317 return orig(ui, repo, *pats, **opts) |
305 finally: |
318 finally: |
306 restorematchandpatsfn() |
319 restorematchandpatsfn() |
|
320 setattr(cmdutil, '_makenofollowlogfilematcher', oldmakelogfilematcher) |
307 |
321 |
308 def overrideverify(orig, ui, repo, *pats, **opts): |
322 def overrideverify(orig, ui, repo, *pats, **opts): |
309 large = opts.pop('large', False) |
323 large = opts.pop('large', False) |
310 all = opts.pop('lfa', False) |
324 all = opts.pop('lfa', False) |
311 contents = opts.pop('lfc', False) |
325 contents = opts.pop('lfc', False) |