changeset 47021:45dcb63f8ead

branch: delete obsolete message about changing branch of obsolete commit We now rely on `rewriteutil.precheck()` to check for divergence, so we don't need the extra check in `cmdutil.changebranch()`. The former check is a little less strict in that it allows you to rewrite a commit without non-obsolete successors. Differential Revision: https://phab.mercurial-scm.org/D10519
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 27 Apr 2021 14:36:52 -0700
parents ba6881c6a178
children ec081d7f0009
files mercurial/cmdutil.py
diffstat 1 files changed, 0 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue Feb 23 10:28:42 2021 -0800
+++ b/mercurial/cmdutil.py	Tue Apr 27 14:36:52 2021 -0700
@@ -997,11 +997,6 @@
                 _(b"a branch of the same name already exists")
             )
 
-        if repo.revs(b'obsolete() and %ld', revs):
-            raise error.InputError(
-                _(b"cannot change branch of a obsolete changeset")
-            )
-
         # make sure only topological heads
         if repo.revs(b'heads(%ld) - head()', revs):
             raise error.InputError(