comparison hgext/largefiles/overrides.py @ 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
comparison
equal deleted inserted replaced
24436:66a69da9cde4 24437:2703eb73a3af
762 # this invocation of match. 762 # this invocation of match.
763 lfdirstate = lfutil.openlfdirstate(mctx.repo().ui, mctx.repo(), 763 lfdirstate = lfutil.openlfdirstate(mctx.repo().ui, mctx.repo(),
764 False) 764 False)
765 765
766 def tostandin(f): 766 def tostandin(f):
767 if lfutil.standin(f) in mctx: 767 standin = lfutil.standin(f)
768 return lfutil.standin(f) 768 if standin in mctx:
769 elif lfutil.standin(f) in repo[None] or lfdirstate[f] == 'r': 769 return standin
770 elif standin in repo[None] or lfdirstate[f] == 'r':
770 return None 771 return None
771 return f 772 return f
772 m._files = [tostandin(f) for f in m._files] 773 m._files = [tostandin(f) for f in m._files]
773 m._files = [f for f in m._files if f is not None] 774 m._files = [f for f in m._files if f is not None]
774 m._fmap = set(m._files) 775 m._fmap = set(m._files)