hgext/sparse.py
changeset 45565 c1d0f83d62c4
parent 44452 9d2b2df2c2ba
child 45577 5c8230ca37f2
equal deleted inserted replaced
45564:a717de1cb624 45565:c1d0f83d62c4
   135             None,
   135             None,
   136             b"limit to changesets affecting the sparse checkout",
   136             b"limit to changesets affecting the sparse checkout",
   137         )
   137         )
   138     )
   138     )
   139 
   139 
   140     def _initialrevs(orig, repo, opts):
   140     def _initialrevs(orig, repo, wopts):
   141         revs = orig(repo, opts)
   141         revs = orig(repo, wopts)
   142         if opts.get(b'sparse'):
   142         if wopts.opts.get(b'sparse'):
   143             sparsematch = sparse.matcher(repo)
   143             sparsematch = sparse.matcher(repo)
   144 
   144 
   145             def ctxmatch(rev):
   145             def ctxmatch(rev):
   146                 ctx = repo[rev]
   146                 ctx = repo[rev]
   147                 return any(f for f in ctx.files() if sparsematch(f))
   147                 return any(f for f in ctx.files() if sparsematch(f))