mercurial/pvec.py
changeset 24339 bcc319d936a3
parent 18918 5093d2a87ff6
child 27501 983e93d88193
equal deleted inserted replaced
24338:ca1365078c86 24339:bcc319d936a3
   140     bit = (hash(node) & 0xffffffff) % _vecbits
   140     bit = (hash(node) & 0xffffffff) % _vecbits
   141     return v ^ (1<<bit)
   141     return v ^ (1<<bit)
   142 
   142 
   143 def ctxpvec(ctx):
   143 def ctxpvec(ctx):
   144     '''construct a pvec for ctx while filling in the cache'''
   144     '''construct a pvec for ctx while filling in the cache'''
   145     r = ctx._repo
   145     r = ctx.repo()
   146     if not util.safehasattr(r, "_pveccache"):
   146     if not util.safehasattr(r, "_pveccache"):
   147         r._pveccache = {}
   147         r._pveccache = {}
   148     pvc = r._pveccache
   148     pvc = r._pveccache
   149     if ctx.rev() not in pvc:
   149     if ctx.rev() not in pvc:
   150         cl = r.changelog
   150         cl = r.changelog