changeset 22912:3b8e6c095239

lfutil: avoid creating unnecessary copy of status tuple In lfdirstatestatus(), the status tuple gets deconstructed, the lists get updated, and then an identical status tuple gets created and returned. Change it so we simply return the original tuple.
author Martin von Zweigbergk <martinvonz@gmail.com>
date Fri, 03 Oct 2014 21:21:20 -0700
parents 509e2cbee679
children cb4449921a1d
files hgext/largefiles/lfutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/lfutil.py	Fri Oct 03 21:44:10 2014 -0700
+++ b/hgext/largefiles/lfutil.py	Fri Oct 03 21:21:20 2014 -0700
@@ -137,7 +137,7 @@
 def lfdirstatestatus(lfdirstate, repo, rev):
     match = match_.always(repo.root, repo.getcwd())
     unsure, s = lfdirstate.status(match, [], False, False, False)
-    modified, added, removed, missing, unknown, ignored, clean = s
+    modified, _added, _removed, _missing, _unknown, _ignored, clean = s
     for lfile in unsure:
         try:
             fctx = repo[rev][standin(lfile)]
@@ -148,7 +148,7 @@
         else:
             clean.append(lfile)
             lfdirstate.normal(lfile)
-    return (modified, added, removed, missing, unknown, ignored, clean)
+    return s
 
 def listlfiles(repo, rev=None, matcher=None):
     '''return a list of largefiles in the working copy or the