[PATCH 7 of 9] largefiles: only reset status fields where needed
Martin von Zweigbergk
martinvonz at gmail.com
Wed Sep 17 15:40:24 CDT 2014
# HG changeset patch
# User Martin von Zweigbergk <martinvonz at gmail.com>
# Date 1410906484 25200
# Tue Sep 16 15:28:04 2014 -0700
# Node ID 013f8f20f2ae939ce4dd773e2c4120182450459b
# Parent 20ce7e4eb36f84fce4b36b3bc838e9d170f77b42
largefiles: only reset status fields where needed
Part of lfilesrepo.status() looks as follows. If 'listunknown' (etc.)
is false, the result from orig() should naturally not contain any
unknown files. There is therefore no need to clear these fields unless
the <condition> path was taken, so move the clearing into that block.
result = orig(node1, node2, m, listignored, listclean,
listunknown, listsubrepos)
if <condition>:
// modify 'result'
if not listunknown:
result[4] = []
// similar for ignored and clean files
return result;
diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -226,6 +226,12 @@
lfiles = (modified, added, removed, missing, [], [], clean)
result = [sorted(list1 + list2)
for (list1, list2) in zip(normals, lfiles)]
+ if not listunknown:
+ result[4] = []
+ if not listignored:
+ result[5] = []
+ if not listclean:
+ result[6] = []
else:
def toname(f):
if lfutil.isstandin(f):
@@ -241,12 +247,6 @@
if wlock:
wlock.release()
- if not listunknown:
- result[4] = []
- if not listignored:
- result[5] = []
- if not listclean:
- result[6] = []
self.lfstatus = True
return result
More information about the Mercurial-devel
mailing list