# HG changeset patch # User Martin von Zweigbergk # Date 2015-03-24 17:27:56 # Node ID 2703eb73a3af7ef93c08b458ef38eee39f0b90ba # Parent 66a69da9cde4b100e28865492c138cf5fe554db5 largefiles: extract and reuse 'standin' variable in overriderevert() diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -764,9 +764,10 @@ def overriderevert(orig, ui, repo, ctx, 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]