Patchwork [2,of,3] largefiles: extract and reuse 'standin' variable in overriderevert()

login
register
mail settings
Submitter Martin von Zweigbergk
Date March 24, 2015, 6:16 p.m.
Message ID <a390c931dda089c51b85.1427221000@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8239/
State Accepted
Headers show

Comments

Martin von Zweigbergk - March 24, 2015, 6:16 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1427218076 25200
#      Tue Mar 24 10:27:56 2015 -0700
# Node ID a390c931dda089c51b858bb360f12d4e80bddba9
# Parent  05b3c16a656cce3130de9851abcc425c412d7f9d
largefiles: extract and reuse 'standin' variable in overriderevert()

Patch

diff -r 05b3c16a656c -r a390c931dda0 hgext/largefiles/overrides.py
--- 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]