Patchwork D3712: files: drop now-unnecessary filtering of removed dirstate files

login
register
mail settings
Submitter phabricator
Date June 11, 2018, 5:39 p.m.
Message ID <differential-rev-PHID-DREV-4sxo2b745gsdved6huho-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32062/
State Superseded
Headers show

Comments

phabricator - June 11, 2018, 5:39 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  workingctx.matches() now filters out removed files.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3712

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2134,13 +2134,9 @@ 
     return bad, forgot
 
 def files(ui, ctx, m, fm, fmt, subrepos):
-    rev = ctx.rev()
     ret = 1
-    ds = ctx.repo().dirstate
 
     for f in ctx.matches(m):
-        if rev is None and ds[f] == 'r':
-            continue
         fm.startitem()
         if ui.verbose:
             fc = ctx[f]