mercurial/rewriteutil.py
changeset 50928 d718eddf01d9
parent 50643 cbcbf63b6dbf
equal deleted inserted replaced
50927:7a8ea1397816 50928:d718eddf01d9
    19     node,
    19     node,
    20     obsolete,
    20     obsolete,
    21     obsutil,
    21     obsutil,
    22     revset,
    22     revset,
    23     scmutil,
    23     scmutil,
    24     util,
       
    25 )
    24 )
    26 
    25 
    27 
    26 
    28 NODE_RE = re.compile(br'\b[0-9a-f]{6,64}\b')
    27 NODE_RE = re.compile(br'\b[0-9a-f]{6,64}\b')
    29 
    28 
    75     if nullrev in revs:
    74     if nullrev in revs:
    76         msg = _(b"cannot %s the null revision") % action
    75         msg = _(b"cannot %s the null revision") % action
    77         hint = _(b"no changeset checked out")
    76         hint = _(b"no changeset checked out")
    78         raise error.InputError(msg, hint=hint)
    77         raise error.InputError(msg, hint=hint)
    79 
    78 
    80     if any(util.safehasattr(r, 'rev') for r in revs):
    79     if any(hasattr(r, 'rev') for r in revs):
    81         repo.ui.develwarn(b"rewriteutil.precheck called with ctx not revs")
    80         repo.ui.develwarn(b"rewriteutil.precheck called with ctx not revs")
    82         revs = (r.rev() for r in revs)
    81         revs = (r.rev() for r in revs)
    83 
    82 
    84     if len(repo[None].parents()) > 1:
    83     if len(repo[None].parents()) > 1:
    85         raise error.StateError(
    84         raise error.StateError(