hgext/narrow/narrowchangegroup.py
changeset 38783 e7aa113b14f7
parent 37340 8cf97e0e1730
child 38794 1d01cf0416a5
equal deleted inserted replaced
38782:7eba8f83129b 38783:e7aa113b14f7
    14     extensions,
    14     extensions,
    15     manifest,
    15     manifest,
    16     match as matchmod,
    16     match as matchmod,
    17     mdiff,
    17     mdiff,
    18     node,
    18     node,
       
    19     pycompat,
    19     revlog,
    20     revlog,
    20     util,
    21     util,
    21 )
    22 )
    22 
    23 
    23 def setup():
    24 def setup():
   330                     # a fact - it works for all the (admittedly
   331                     # a fact - it works for all the (admittedly
   331                     # thorough) cases in our testsuite, but I would be
   332                     # thorough) cases in our testsuite, but I would be
   332                     # somewhat unsurprised to find a case in the wild
   333                     # somewhat unsurprised to find a case in the wild
   333                     # where this breaks down a bit. That said, I don't
   334                     # where this breaks down a bit. That said, I don't
   334                     # know if it would hurt anything.
   335                     # know if it would hurt anything.
   335                     for i in xrange(rev, 0, -1):
   336                     for i in pycompat.xrange(rev, 0, -1):
   336                         if revlog.linkrev(i) == clrev:
   337                         if revlog.linkrev(i) == clrev:
   337                             return i
   338                             return i
   338                     # We failed to resolve a parent for this node, so
   339                     # We failed to resolve a parent for this node, so
   339                     # we crash the changegroup construction.
   340                     # we crash the changegroup construction.
   340                     raise error.Abort(
   341                     raise error.Abort(