D10519: branch: delete obsolete message about changing branch of obsolete commit
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Apr 28 15:08:25 UTC 2021
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
pulkit accepted this revision.
This revision is now accepted and ready to land.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D10519
AFFECTED FILES
mercurial/cmdutil.py
CHANGE DETAILS
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -998,11 +998,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(
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list