mercurial/commands.py
changeset 18210 f730ed2e093d
parent 18209 6a91cbb67907
child 18254 2dfe519d435d
equal deleted inserted replaced
18209:6a91cbb67907 18210:f730ed2e093d
  4627             phases.advanceboundary(repo, targetphase, nodes)
  4627             phases.advanceboundary(repo, targetphase, nodes)
  4628             if opts['force']:
  4628             if opts['force']:
  4629                 phases.retractboundary(repo, targetphase, nodes)
  4629                 phases.retractboundary(repo, targetphase, nodes)
  4630         finally:
  4630         finally:
  4631             lock.release()
  4631             lock.release()
  4632         newdata = repo._phasecache.getphaserevs(repo)
  4632         # moving revision from public to draft may hide them
  4633         cl = repo.changelog
  4633         # We have to check result on an unfiltered repository
       
  4634         unfi = repo.unfiltered()
       
  4635         newdata = repo._phasecache.getphaserevs(unfi)
  4634         changes = sum(o != newdata[i] for i, o in enumerate(olddata))
  4636         changes = sum(o != newdata[i] for i, o in enumerate(olddata))
       
  4637         cl = unfi.changelog
  4635         rejected = [n for n in nodes
  4638         rejected = [n for n in nodes
  4636                     if newdata[cl.rev(n)] < targetphase]
  4639                     if newdata[cl.rev(n)] < targetphase]
  4637         if rejected:
  4640         if rejected:
  4638             ui.warn(_('cannot move %i changesets to a more permissive '
  4641             ui.warn(_('cannot move %i changesets to a more permissive '
  4639                       'phase, use --force\n') % len(rejected))
  4642                       'phase, use --force\n') % len(rejected))