diff --git a/hgext/hgk.py b/hgext/hgk.py --- a/hgext/hgk.py +++ b/hgext/hgk.py @@ -46,7 +46,7 @@ # vdiff on hovered and selected revisions. import os -from mercurial import commands, util, patch, revlog +from mercurial import commands, util, patch, revlog, cmdutil from mercurial.node import nullid, nullrev, short def difftree(ui, repo, node1=None, node2=None, *files, **opts): @@ -55,7 +55,8 @@ def difftree(ui, repo, node1=None, node2 assert node2 is not None mmap = repo.changectx(node1).manifest() mmap2 = repo.changectx(node2).manifest() - status = repo.status(node1, node2, files=files)[:5] + m = cmdutil.matchfiles(repo, files) + status = repo.status(node1, node2, files=m.files(), match=m)[:5] modified, added, removed, deleted, unknown = status empty = short(nullid) diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1045,12 +1045,10 @@ class queue: man = repo.manifest.read(changes[0]) aaa = aa[:] if opts.get('short'): - filelist = mm + aa + dd - match = dict.fromkeys(filelist).__contains__ + match = cmdutil.matchfiles(repo, mm + aa + dd) else: - filelist = None - match = util.always - m, a, r, d, u = repo.status(files=filelist, match=match)[:5] + match = cmdutil.matchall(repo) + m, a, r, d, u = repo.status(files=match.files(), match=match)[:5] # we might end up with files that were added between # tip and the dirstate parent, but then changed in the diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2363,7 +2363,8 @@ def revert(ui, repo, *pats, **opts): if abs not in names: names[abs] = m.rel(abs), m.exact(abs) - changes = repo.status(files=files, match=names.has_key)[:4] + m = cmdutil.matchfiles(repo, names) + changes = repo.status(files=m.files(), match=m)[:4] modified, added, removed, deleted = map(dict.fromkeys, changes) # if f is a rename, also revert the source