Patchwork [3,of,4] files: only check for removed, not unknown or missing

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 30, 2014, 11:08 p.m.
Message ID <7a1f88d04efc612c8070.1412118501@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6054/
State Accepted
Headers show

Comments

Siddharth Agarwal - Sept. 30, 2014, 11:08 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1412115695 25200
#      Tue Sep 30 15:21:35 2014 -0700
# Node ID 7a1f88d04efc612c8070ac0d7c59d8b33c37d438
# Parent  3341e34839e9da4e028a2752935e73a967ce2697
files: only check for removed, not unknown or missing

ctx.matches() doesn't return unknown files, and repo.dirstate[f] never returns
'!' for an answer.

Patch

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.matches(m):
-        if rev is None and repo.dirstate[f] in 'r?!':
+        if rev is None and repo.dirstate[f] == 'r':
             continue
         fm.startitem()
         if ui.verbose: