mercurial/cmdutil.py
changeset 30015 96b2dd3b184d
parent 30004 5aaa3d6b7e92
child 30016 2963fba2d18a
equal deleted inserted replaced
30014:d34cf260d15b 30015:96b2dd3b184d
  1947     fcacheready = [False]
  1947     fcacheready = [False]
  1948     pctx = repo['.']
  1948     pctx = repo['.']
  1949 
  1949 
  1950     def populate():
  1950     def populate():
  1951         for fn in files:
  1951         for fn in files:
  1952             for i in ((pctx[fn],), pctx[fn].ancestors(followfirst=followfirst)):
  1952             fctx = pctx[fn]
  1953                 for c in i:
  1953             fcache.setdefault(fctx.linkrev(), set()).add(fctx.path())
  1954                     fcache.setdefault(c.linkrev(), set()).add(c.path())
  1954             for c in fctx.ancestors(followfirst=followfirst):
       
  1955                 fcache.setdefault(c.linkrev(), set()).add(c.path())
  1955 
  1956 
  1956     def filematcher(rev):
  1957     def filematcher(rev):
  1957         if not fcacheready[0]:
  1958         if not fcacheready[0]:
  1958             # Lazy initialization
  1959             # Lazy initialization
  1959             fcacheready[0] = True
  1960             fcacheready[0] = True