[PATCH 8 of 8] largefiles: inline redundant toname function in status

Mads Kiilerich mads at kiilerich.com
Tue Oct 14 22:09:15 CDT 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1413342536 -7200
#      Wed Oct 15 05:08:56 2014 +0200
# Node ID defd3115ade0f094bcbd2f380cfffa3df5705b04
# Parent  05f6422005091798fbe0f2a8d4d5d66ca2c78f28
largefiles: inline redundant toname function in status

Simpler and an optimization.

diff --git a/hgext/largefiles/reposetup.py b/hgext/largefiles/reposetup.py
--- a/hgext/largefiles/reposetup.py
+++ b/hgext/largefiles/reposetup.py
@@ -217,12 +217,8 @@ def reposetup(ui, repo):
                                 clean)
                     result = [sorted(list1 + list2)
                               for (list1, list2) in zip(normals, lfstatus)]
-                else:
-                    def toname(f):
-                        if lfutil.isstandin(f):
-                            return lfutil.splitstandin(f)
-                        return f
-                    result = [[toname(f) for f in items]
+                else: # not against working directory
+                    result = [[lfutil.splitstandin(f) or f for f in items]
                               for items in result]
 
                 if wlock:


More information about the Mercurial-devel mailing list