log: unroll loop that populates file paths for --patch --follow matcher
We can't handle the first fctx in the same manner as its ancestors. Also,
I think the original code was too tricky.
--- a/mercurial/cmdutil.py Sun Sep 25 12:20:31 2016 -0700
+++ b/mercurial/cmdutil.py Sat Sep 24 19:52:02 2016 +0900
@@ -1949,9 +1949,10 @@
def populate():
for fn in files:
- for i in ((pctx[fn],), pctx[fn].ancestors(followfirst=followfirst)):
- for c in i:
- fcache.setdefault(c.linkrev(), set()).add(c.path())
+ fctx = pctx[fn]
+ fcache.setdefault(fctx.linkrev(), set()).add(fctx.path())
+ for c in fctx.ancestors(followfirst=followfirst):
+ fcache.setdefault(c.linkrev(), set()).add(c.path())
def filematcher(rev):
if not fcacheready[0]: