mercurial/phases.py
branchstable
changeset 38772 c89e2fb207a1
parent 38683 ddd2165438cd
child 38773 f736fdbe546a
equal deleted inserted replaced
38771:1732db2f8210 38772:c89e2fb207a1
   662 def newheads(repo, heads, roots):
   662 def newheads(repo, heads, roots):
   663     """compute new head of a subset minus another
   663     """compute new head of a subset minus another
   664 
   664 
   665     * `heads`: define the first subset
   665     * `heads`: define the first subset
   666     * `roots`: define the second we subtract from the first"""
   666     * `roots`: define the second we subtract from the first"""
       
   667     if not heads or not roots:
       
   668         return heads
   667     repo = repo.unfiltered()
   669     repo = repo.unfiltered()
   668     revs = repo.revs('heads(::%ln - (%ln::%ln))', heads, roots, heads)
   670     revs = repo.revs('heads(::%ln - (%ln::%ln))', heads, roots, heads)
   669     return pycompat.maplist(repo.changelog.node, revs)
   671     return pycompat.maplist(repo.changelog.node, revs)
   670 
   672 
   671 def newcommitphase(ui):
   673 def newcommitphase(ui):