changeset 22591:9fe33afc00b4

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.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 30 Sep 2014 15:45:48 -0700
parents d4c972b97fee
children ff3ccc592af4
files mercurial/commands.py tests/test-locate.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Oct 01 01:08:17 2014 +0200
+++ b/mercurial/commands.py	Tue Sep 30 15:45:48 2014 -0700
@@ -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:
--- a/tests/test-locate.t	Wed Oct 01 01:08:17 2014 +0200
+++ b/tests/test-locate.t	Tue Sep 30 15:45:48 2014 -0700
@@ -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 .