mercurial/rewriteutil.py
changeset 47019 c4dbbaecaad3
parent 47018 7a90fddb13b0
child 47020 ba6881c6a178
equal deleted inserted replaced
47018:7a90fddb13b0 47019:c4dbbaecaad3
    42     if any(util.safehasattr(r, 'rev') for r in revs):
    42     if any(util.safehasattr(r, 'rev') for r in revs):
    43         repo.ui.develwarn(b"rewriteutil.precheck called with ctx not revs")
    43         repo.ui.develwarn(b"rewriteutil.precheck called with ctx not revs")
    44         revs = (r.rev() for r in revs)
    44         revs = (r.rev() for r in revs)
    45 
    45 
    46     if len(repo[None].parents()) > 1:
    46     if len(repo[None].parents()) > 1:
    47         raise error.StateError(_(b"cannot %s while merging") % action)
    47         raise error.StateError(_(b"cannot %s changesets while merging") % action)
    48 
    48 
    49     publicrevs = repo.revs(b'%ld and public()', revs)
    49     publicrevs = repo.revs(b'%ld and public()', revs)
    50     if publicrevs:
    50     if publicrevs:
    51         msg = _(b"cannot %s public changesets") % action
    51         msg = _(b"cannot %s public changesets") % action
    52         hint = _(b"see 'hg help phases' for details")
    52         hint = _(b"see 'hg help phases' for details")