# HG changeset patch # User Matt Mackall # Date 1308433971 18000 # Node ID 8d821e2fed38a06d0e904f020e10d6a152006cc6 # Parent e6f112b6f14b0c74477c0398efe476be361cc3e5 scmutil: switch match users to supplying contexts The most appropriate context is not always clearly defined. The obvious cases: For working directory commands, we use None For commands (eg annotate) with single revs, we use that revision The less obvious cases: For commands (eg status, diff) with a pair of revs, we use the second revision For commands that take a range (like log), we use None [ original upstream message ] diff -r e6f112b6f14b -r 8d821e2fed38 hgkw/keyword.py --- a/hgkw/keyword.py Sun Jun 12 17:26:20 2011 +0300 +++ b/hgkw/keyword.py Sat Jun 18 16:52:51 2011 -0500 @@ -326,7 +326,7 @@ '''Bails out if [keyword] configuration is not active. Returns status of working directory.''' if kwt: - return repo.status(match=scmutil.match(repo, pats, opts), clean=True, + return repo.status(match=scmutil.match(repo[None], pats, opts), clean=True, unknown=opts.get('unknown') or opts.get('all')) if ui.configitems('keyword'): raise util.Abort(_('[keyword] patterns cannot match'))