mercurial/commands.py
changeset 16657 b6081c2c4647
parent 16648 1388cc711ea7
child 16659 58edd786e96f
equal deleted inserted replaced
16656:4ae3ba9e4d7a 16657:b6081c2c4647
  4376         try:
  4376         try:
  4377             # set phase
  4377             # set phase
  4378             nodes = [ctx.node() for ctx in repo.set('%ld', revs)]
  4378             nodes = [ctx.node() for ctx in repo.set('%ld', revs)]
  4379             if not nodes:
  4379             if not nodes:
  4380                 raise util.Abort(_('empty revision set'))
  4380                 raise util.Abort(_('empty revision set'))
  4381             olddata = repo._phaserev[:]
  4381             olddata = repo._phasecache.getphaserevs(repo)[:]
  4382             phases.advanceboundary(repo, targetphase, nodes)
  4382             phases.advanceboundary(repo, targetphase, nodes)
  4383             if opts['force']:
  4383             if opts['force']:
  4384                 phases.retractboundary(repo, targetphase, nodes)
  4384                 phases.retractboundary(repo, targetphase, nodes)
  4385         finally:
  4385         finally:
  4386             lock.release()
  4386             lock.release()
  4387         if olddata is not None:
  4387         if olddata is not None:
  4388             changes = 0
  4388             changes = 0
  4389             newdata = repo._phaserev
  4389             newdata = repo._phasecache.getphaserevs(repo)
  4390             changes = sum(o != newdata[i] for i, o in enumerate(olddata))
  4390             changes = sum(o != newdata[i] for i, o in enumerate(olddata))
  4391             rejected = [n for n in nodes
  4391             rejected = [n for n in nodes
  4392                         if newdata[repo[n].rev()] < targetphase]
  4392                         if newdata[repo[n].rev()] < targetphase]
  4393             if rejected:
  4393             if rejected:
  4394                 ui.warn(_('cannot move %i changesets to a more permissive '
  4394                 ui.warn(_('cannot move %i changesets to a more permissive '