mercurial/revlog.py
changeset 43106 d783f945a701
parent 43089 c59eb1560c44
child 43117 8ff1ecfadcd1
equal deleted inserted replaced
43105:649d3ac37a12 43106:d783f945a701
   442             self._srmingapsize = opts[b'sparse-read-min-gap-size']
   442             self._srmingapsize = opts[b'sparse-read-min-gap-size']
   443         if opts.get(b'enableellipsis'):
   443         if opts.get(b'enableellipsis'):
   444             self._flagprocessors[REVIDX_ELLIPSIS] = ellipsisprocessor
   444             self._flagprocessors[REVIDX_ELLIPSIS] = ellipsisprocessor
   445 
   445 
   446         # revlog v0 doesn't have flag processors
   446         # revlog v0 doesn't have flag processors
   447         for flag, processor in opts.get(b'flagprocessors', {}).iteritems():
   447         for flag, processor in pycompat.iteritems(
       
   448             opts.get(b'flagprocessors', {})
       
   449         ):
   448             flagutil.insertflagprocessor(flag, processor, self._flagprocessors)
   450             flagutil.insertflagprocessor(flag, processor, self._flagprocessors)
   449 
   451 
   450         if self._chunkcachesize <= 0:
   452         if self._chunkcachesize <= 0:
   451             raise error.RevlogError(
   453             raise error.RevlogError(
   452                 _(b'revlog chunk cache size %r is not ' b'greater than 0')
   454                 _(b'revlog chunk cache size %r is not ' b'greater than 0')
  1139                     # will eventually remove it.
  1141                     # will eventually remove it.
  1140                     heads[n] = True
  1142                     heads[n] = True
  1141                     # But, obviously its parents aren't.
  1143                     # But, obviously its parents aren't.
  1142                     for p in self.parents(n):
  1144                     for p in self.parents(n):
  1143                         heads.pop(p, None)
  1145                         heads.pop(p, None)
  1144         heads = [head for head, flag in heads.iteritems() if flag]
  1146         heads = [head for head, flag in pycompat.iteritems(heads) if flag]
  1145         roots = list(roots)
  1147         roots = list(roots)
  1146         assert orderedout
  1148         assert orderedout
  1147         assert roots
  1149         assert roots
  1148         assert heads
  1150         assert heads
  1149         return (orderedout, roots, heads)
  1151         return (orderedout, roots, heads)