changeset 24437:2703eb73a3af

largefiles: extract and reuse 'standin' variable in overriderevert()
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 24 Mar 2015 10:27:56 -0700
parents 66a69da9cde4
children 5b85a5bc5bbb
files hgext/largefiles/overrides.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Fri Mar 20 10:05:31 2015 -0700
+++ b/hgext/largefiles/overrides.py	Tue Mar 24 10:27:56 2015 -0700
@@ -764,9 +764,10 @@
                                                False)
 
             def tostandin(f):
-                if lfutil.standin(f) in mctx:
-                    return lfutil.standin(f)
-                elif lfutil.standin(f) in repo[None] or lfdirstate[f] == 'r':
+                standin = lfutil.standin(f)
+                if standin in mctx:
+                    return standin
+                elif standin in repo[None] or lfdirstate[f] == 'r':
                     return None
                 return f
             m._files = [tostandin(f) for f in m._files]