mercurial/copies.py
changeset 52649 d903647abbd3
parent 51859 f4733654f144
child 52654 f19a3f1437f3
equal deleted inserted replaced
52648:abc327f9628b 52649:d903647abbd3
   305         #
   305         #
   306         # An interesting property of `children_count` is that it only contains
   306         # An interesting property of `children_count` is that it only contains
   307         # revision that will be relevant for a edge of the graph. So if a
   307         # revision that will be relevant for a edge of the graph. So if a
   308         # children has parent not in `children_count`, that edges should not be
   308         # children has parent not in `children_count`, that edges should not be
   309         # processed.
   309         # processed.
   310         children_count = dict((r, 0) for r in roots)
   310         children_count = {r: 0 for r in roots}
   311         for r in revs:
   311         for r in revs:
   312             for p in cl.parentrevs(r):
   312             for p in cl.parentrevs(r):
   313                 if p == nullrev:
   313                 if p == nullrev:
   314                     continue
   314                     continue
   315                 children_count[r] = 0
   315                 children_count[r] = 0
   327                 multi_thread,
   327                 multi_thread,
   328             )
   328             )
   329     else:
   329     else:
   330         # When not using side-data, we will process the edges "from" the parent.
   330         # When not using side-data, we will process the edges "from" the parent.
   331         # so we need a full mapping of the parent -> children relation.
   331         # so we need a full mapping of the parent -> children relation.
   332         children = dict((r, []) for r in roots)
   332         children = {r: [] for r in roots}
   333         for r in revs:
   333         for r in revs:
   334             for p in cl.parentrevs(r):
   334             for p in cl.parentrevs(r):
   335                 if p == nullrev:
   335                 if p == nullrev:
   336                     continue
   336                     continue
   337                 children[r] = []
   337                 children[r] = []