# HG changeset patch # User Siddharth Agarwal # Date 1412117148 25200 # Node ID 9fe33afc00b472cd6e3521c89fb7484519c6e110 # Parent d4c972b97feeda9bfab26dfc4698fb8084ef8386 files: actually filter out removed files 'hg files' makes an attempt to filter out removed files, but that doesn't work because repo.dirstate[f] returns lowercase 'r', not uppercase. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -3220,7 +3220,7 @@ m = scmutil.match(ctx, pats, opts) for f in ctx.walk(m): - if rev is None and repo.dirstate[f] in 'R?!': + if rev is None and repo.dirstate[f] in 'r?!': continue fm.startitem() if ui.verbose: diff --git a/tests/test-locate.t b/tests/test-locate.t --- a/tests/test-locate.t +++ b/tests/test-locate.t @@ -87,6 +87,8 @@ $ cd .. $ rm -r t + $ hg rm t/b + $ hg locate 't/**' t/b (glob) t/e.h (glob) @@ -96,7 +98,6 @@ b dir.h/foo t.h - t/b t/e.h t/x $ hg files b @@ -132,7 +133,6 @@ ../b ../dir.h/foo ../t.h - ../t/b ../t/e.h ../t/x $ hg files .