mercurial/destutil.py
changeset 37390 b95992605ef1
parent 37375 a973bb92ab71
child 37452 2b38c80557a4
equal deleted inserted replaced
37389:bef863a09acd 37390:b95992605ef1
   348         revs = stack.getstack(repo)
   348         revs = stack.getstack(repo)
   349     elif default:
   349     elif default:
   350         revs = scmutil.revrange(repo, [default])
   350         revs = scmutil.revrange(repo, [default])
   351 
   351 
   352     if revs:
   352     if revs:
   353         # The revset supplied by the user may not be in ascending order nor
   353         # Take the first revision of the revset as the root
   354         # take the first revision. So do this manually.
   354         return revs.min()
   355         revs.sort()
       
   356         return revs.first()
       
   357 
   355 
   358     return None
   356     return None
   359 
   357 
   360 def stackbase(ui, repo):
   358 def stackbase(ui, repo):
   361     revs = stack.getstack(repo)
   359     revs = stack.getstack(repo)