Patchwork [2,of,8] summary: remove unused code for listing ignored files

login
register
mail settings
Submitter Martin von Zweigbergk
Date Oct. 2, 2014, 12:01 a.m.
Message ID <82b9c894095a9d739c25.1412208114@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6072/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Oct. 2, 2014, 12:01 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1412193018 25200
#      Wed Oct 01 12:50:18 2014 -0700
# Node ID 82b9c894095a9d739c25c42951ed1c7788b5ad90
# Parent  0b3772a1555ed003b2bc787b012485b065f276d1
summary: remove unused code for listing ignored files

The call to repo.status() does not request ignored files to be listed,
so remove the code for printing them.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5793,7 +5793,7 @@ 
             ui.write(' ' + m, label='log.bookmark')
         ui.write('\n', label='log.bookmark')
 
-    st = list(repo.status(unknown=True))[:6]
+    st = list(repo.status(unknown=True))[:5]
 
     c = repo.dirstate.copies()
     copied, renamed = [], []
@@ -5821,7 +5821,6 @@ 
               ui.label(_('%d copied'), 'status.copied'),
               ui.label(_('%d deleted'), 'status.deleted'),
               ui.label(_('%d unknown'), 'status.unknown'),
-              ui.label(_('%d ignored'), 'status.ignored'),
               ui.label(_('%d unresolved'), 'resolve.unresolved'),
               ui.label(_('%d subrepos'), 'status.modified')]
     t = []
@@ -5841,7 +5840,7 @@ 
     elif (parents[0].closesbranch() and
           pnode in repo.branchheads(branch, closed=True)):
         t += _(' (head closed)')
-    elif not (st[0] or st[1] or st[2] or st[3] or st[4] or st[9]):
+    elif not (st[0] or st[1] or st[2] or st[3] or st[4] or st[8]):
         t += _(' (clean)')
         cleanworkdir = True
     elif pnode not in bheads: