[PATCH] cmdutil: rename '_deleted' to 'deleted' since it is used

Martin von Zweigbergk martinvonz at gmail.com
Fri Oct 3 13:50:29 CDT 2014


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1412362128 25200
#      Fri Oct 03 11:48:48 2014 -0700
# Node ID 27a6af7fdd92f97cd587faae9502c044b292fb83
# Parent  78c916f24dd99a56e4c29153a5df3bd7d1c40edd
cmdutil: rename '_deleted' to 'deleted' since it is used

Underscore seems to be used as a prefix in some places to indicate
that a variable is not used, so avoid using it for a variable that is
used.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2520,7 +2520,7 @@
         modified = set(changes[0])
         added    = set(changes[1])
         removed  = set(changes[2])
-        _deleted = set(changes[3])
+        deleted  = set(changes[3])
         unknown  = set(changes[4])
         unknown.update(changes[5])
         clean    = set(changes[6])
@@ -2530,8 +2530,8 @@
         smf = set(mf)
 
         # determine the exact nature of the deleted changesets
-        deladded = _deleted - smf
-        deleted = _deleted - deladded
+        deladded = deleted - smf
+        deleted = deleted - deladded
 
         # We need to account for the state of file in the dirstate
         #


More information about the Mercurial-devel mailing list