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
--- 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)