# HG changeset patch # User Martin von Zweigbergk # Date 2014-10-04 04:21:20 # Node ID 3b8e6c095239b1a4c6641302519a3d0c7f54057a # Parent 509e2cbee679e0f7ef589928ddde4da99fb91135 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. diff --git a/hgext/largefiles/lfutil.py b/hgext/largefiles/lfutil.py --- a/hgext/largefiles/lfutil.py +++ b/hgext/largefiles/lfutil.py @@ -137,7 +137,7 @@ def openlfdirstate(ui, repo, create=True 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 @@ def lfdirstatestatus(lfdirstate, repo, r 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