Mercurial > hg
changeset 2663:96950d39171d
Mq: modify repo.lookup to resolve applied patches too.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 20 Jul 2006 11:52:28 -0700 |
parents | 2c5d5cf35034 |
children | 9b8df8dceeed |
files | hgext/mq.py |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Mon Jul 24 14:36:32 2006 -0700 +++ b/hgext/mq.py Thu Jul 20 11:52:28 2006 -0700 @@ -1272,6 +1272,19 @@ def reposetup(ui, repo): repomap[repo] = queue(ui, repo.join("")) + oldlookup = repo.lookup + + def qlookup(key): + try: + return oldlookup(key) + except hg.RepoError: + q = repomap[repo] + patch = q.isapplied(key) + if not patch: + raise + return revlog.bin(patch[1]) + + repo.lookup = qlookup cmdtable = { "qapplied": (applied, [], 'hg qapplied [PATCH]'),