# HG changeset patch # User Martin von Zweigbergk # Date 2014-09-22 20:05:36 # Node ID 8cd91f481ffd54312513e968c96899cbbdc8472e # Parent 382c2be610dc5c1cd275150fbd2c8b8dd73e0e21 largefiles: remove unnecessary clearing of status fields At the end of lfilesrepo.status(), we clear the lists of unknown, ignored and clean files, depending on the values of 'listunknown' etc. The lists originate from other calls to status(), and it is only 'clean' that may get updated after the calls. Let's remove the need to clear any of the lists by explicitly only adding to 'clean' when 'listclean' is true. diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py --- a/hgext/largefiles/reposetup.py +++ b/hgext/largefiles/reposetup.py @@ -173,7 +173,8 @@ def reposetup(ui, repo): != lfutil.hashfile(self.wjoin(lfile)): modified.append(lfile) else: - clean.append(lfile) + if listclean: + clean.append(lfile) lfdirstate.normal(lfile) else: tocheck = unsure + modified + added + clean @@ -185,7 +186,7 @@ def reposetup(ui, repo): if ctx1[standin].data().strip() != \ lfutil.hashfile(self.wjoin(lfile)): modified.append(lfile) - else: + elif listclean: clean.append(lfile) else: added.append(lfile) @@ -241,12 +242,6 @@ def reposetup(ui, repo): if wlock: wlock.release() - if not listunknown: - result[4] = [] - if not listignored: - result[5] = [] - if not listclean: - result[6] = [] self.lfstatus = True return result