[PATCH 8 of 9] largefiles: avoid using 'lfiles' variable for two purposes
Martin von Zweigbergk
martinvonz at gmail.com
Wed Sep 17 15:40:25 CDT 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1410933038 25200
# Tue Sep 16 22:50:38 2014 -0700
# Node ID 0e7f51097cdb5364b0fb45dcee38b9ffbf06ec16
# Parent 013f8f20f2ae939ce4dd773e2c4120182450459b
largefiles: avoid using 'lfiles' variable for two purposes
The variable 'lfiles' is first used for a set of the names of all the
large files. It is then overwritten with a tuple like the ones
returned from status(). To reduce confusion, let's create a separate
variable for the second use.
diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -223,9 +223,10 @@
normals = [[fn for fn in filelist
if not lfutil.isstandin(fn)]
for filelist in result]
- lfiles = (modified, added, removed, missing, [], [], clean)
+ lfstatus = (modified, added, removed, missing, [], [],
+ clean)
result = [sorted(list1 + list2)
- for (list1, list2) in zip(normals, lfiles)]
+ for (list1, list2) in zip(normals, lfstatus)]
if not listunknown:
result[4] = []
if not listignored:
More information about the Mercurial-devel
mailing list