[PATCH 4 of 8] gpg: drop unnecessary slicing of status array
Martin von Zweigbergk
martinvonz at gmail.com
Wed Oct 1 19:01:56 CDT 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1411588659 25200
# Wed Sep 24 12:57:39 2014 -0700
# Node ID e78e91806185683b1bc8814556a71bf66abcd7a1
# Parent e1154b545f8411371124e7c24fd7e3f67c11dcba
gpg: drop unnecessary slicing of status array
The call to repo.status() does not request status for clean files, so
there is no reason to slice it out from the result. Leaving the tuple
untouched will simplify a future change.
diff --git a/hgext/gpg.py b/hgext/gpg.py
--- a/hgext/gpg.py
+++ b/hgext/gpg.py
@@ -254,7 +254,7 @@
return
msigs = match.exact(repo.root, '', ['.hgsigs'])
- s = repo.status(match=msigs, unknown=True, ignored=True)[:6]
+ s = repo.status(match=msigs, unknown=True, ignored=True)
if util.any(s) and not opts["force"]:
raise util.Abort(_("working copy of .hgsigs is changed "
"(please commit .hgsigs manually "
More information about the Mercurial-devel
mailing list