Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 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 | d55b71393907 |
children | 4c041c71ec01 |
comparison
equal
deleted
inserted
replaced
47020:ba6881c6a178 | 47021:45dcb63f8ead |
---|---|
993 and label not in rpb | 993 and label not in rpb |
994 and label in repo.branchmap() | 994 and label in repo.branchmap() |
995 ): | 995 ): |
996 raise error.InputError( | 996 raise error.InputError( |
997 _(b"a branch of the same name already exists") | 997 _(b"a branch of the same name already exists") |
998 ) | |
999 | |
1000 if repo.revs(b'obsolete() and %ld', revs): | |
1001 raise error.InputError( | |
1002 _(b"cannot change branch of a obsolete changeset") | |
1003 ) | 998 ) |
1004 | 999 |
1005 # make sure only topological heads | 1000 # make sure only topological heads |
1006 if repo.revs(b'heads(%ld) - head()', revs): | 1001 if repo.revs(b'heads(%ld) - head()', revs): |
1007 raise error.InputError( | 1002 raise error.InputError( |