mercurial/phases.py
changeset 45116 361a7444bc41
parent 45114 e2d17974a869
child 45117 b1e51ef4e536
equal deleted inserted replaced
45115:672ad1f6eeb8 45116:361a7444bc41
   775     return headsbyphase
   775     return headsbyphase
   776 
   776 
   777 
   777 
   778 def updatephases(repo, trgetter, headsbyphase):
   778 def updatephases(repo, trgetter, headsbyphase):
   779     """Updates the repo with the given phase heads"""
   779     """Updates the repo with the given phase heads"""
   780     # Now advance phase boundaries of all but secret phase
   780     # Now advance phase boundaries of all phases
   781     #
   781     #
   782     # run the update (and fetch transaction) only if there are actually things
   782     # run the update (and fetch transaction) only if there are actually things
   783     # to update. This avoid creating empty transaction during no-op operation.
   783     # to update. This avoid creating empty transaction during no-op operation.
   784 
   784 
   785     for phase in allphases[:-1]:
   785     for phase in allphases:
   786         revset = b'%ln - _phase(%s)'
   786         revset = b'%ln - _phase(%s)'
   787         heads = [c.node() for c in repo.set(revset, headsbyphase[phase], phase)]
   787         heads = [c.node() for c in repo.set(revset, headsbyphase[phase], phase)]
   788         if heads:
   788         if heads:
   789             advanceboundary(repo, trgetter(), phase, heads)
   789             advanceboundary(repo, trgetter(), phase, heads)
   790 
   790