# HG changeset patch # User Martin von Zweigbergk # Date 1529644054 25200 # Node ID 85c8ff26d698eb585cef18bed0a7fe646274b57e # Parent 75b53b809e87a2fbeed81e77e8f77915c5928969 copies: inline a variable that's used only once By inlining it, we also avoid calculating the value when "if of in seen" is false (probably not significant). Differential Revision: https://phab.mercurial-scm.org/D4831 diff -r 75b53b809e87 -r 85c8ff26d698 mercurial/copies.py --- a/mercurial/copies.py Sat Sep 15 22:56:57 2018 -0700 +++ b/mercurial/copies.py Thu Jun 21 22:07:34 2018 -0700 @@ -816,11 +816,10 @@ of = None seen = {f} for oc in getsrcfctx(f, msrc[f]).ancestors(): - ocr = oc.linkrev() of = oc.path() if of in seen: # check limit late - grab last rename before - if ocr < limit: + if oc.linkrev() < limit: break continue seen.add(of)