Mercurial > hg
changeset 39945:85c8ff26d698
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 21 Jun 2018 22:07:34 -0700 |
parents | 75b53b809e87 |
children | 2b4c8fa08504 |
files | mercurial/copies.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)