mercurial/revset.py
changeset 25145 3553163bb736
parent 25144 81a395447b34
child 25146 f542a2c89b60
equal deleted inserted replaced
25144:81a395447b34 25145:3553163bb736
  1170     os = getset(repo, fullreposet(repo), l[0])
  1170     os = getset(repo, fullreposet(repo), l[0])
  1171     os.reverse()
  1171     os.reverse()
  1172     result = []
  1172     result = []
  1173     it = iter(os)
  1173     it = iter(os)
  1174     for x in xrange(lim):
  1174     for x in xrange(lim):
  1175         try:
  1175         y = next(it, None)
  1176             y = it.next()
  1176         if y is None:
  1177             if y in ss:
       
  1178                 result.append(y)
       
  1179         except (StopIteration):
       
  1180             break
  1177             break
       
  1178         elif y in ss:
       
  1179             result.append(y)
  1181     return baseset(result)
  1180     return baseset(result)
  1182 
  1181 
  1183 def maxrev(repo, subset, x):
  1182 def maxrev(repo, subset, x):
  1184     """``max(set)``
  1183     """``max(set)``
  1185     Changeset with highest revision number in set.
  1184     Changeset with highest revision number in set.