Patchwork [7,of,8,v2] largefiles: avoid using 'lfiles' variable for two purposes

login
register
mail settings
Submitter Martin von Zweigbergk
Date Sept. 23, 2014, 9:46 p.m.
Message ID <7da73fc0e398fe0f69ce.1411508772@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/5929/
State Superseded
Commit 8c8fe120670f320c7f3a775ce54a48610149de65
Headers show

Comments

Martin von Zweigbergk - Sept. 23, 2014, 9:46 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1410933038 25200
#      Tue Sep 16 22:50:38 2014 -0700
# Node ID 7da73fc0e398fe0f69cea666f20a39f397f37aed
# Parent  06769b7fbba93d10fc2e7cf7967779eb838f61a6
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.

Patch

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: