Mercurial > hg-stable
diff tests/test-bookmarks-pushpull.t @ 42670:3332bde53714 stable
exchange: abort on pushing bookmarks pointing to secret changesets (issue6159)
Until now, if there is a bookmark points to a changeset which is in secret
phase, hg will push the bookmark, but not the changeset referenced by that
bookmark. This leaves the server bookmarks in a bad state, because that
bookmark now points to a revision that does not exist on the server. This
patch makes hg to abort on such cases.
Differential Revision: https://phab.mercurial-scm.org/D6731
author | Navaneeth Suresh <navaneeths1998@gmail.com> |
---|---|
date | Sat, 17 Aug 2019 01:49:28 +0530 |
parents | cf9dbc7377de |
children | 34a46d48d24e |
line wrap: on
line diff
--- a/tests/test-bookmarks-pushpull.t Sun Aug 18 02:47:32 2019 +0530 +++ b/tests/test-bookmarks-pushpull.t Sat Aug 17 01:49:28 2019 +0530 @@ -1344,39 +1344,9 @@ $ hg commit -qAm_ --config phases.new-commit=secret Pushing the bookmark "foo" now fails as it contains a secret changeset -#if b2-pushkey - $ hg push -r foo - pushing to $TESTTMP/issue6159remote - searching for changes - no changes found (ignored 1 secret changesets) - abort: updating bookmark foo failed! - [255] -#endif - -#if b2-binary $ hg push -r foo pushing to $TESTTMP/issue6159remote searching for changes no changes found (ignored 1 secret changesets) - updating bookmark foo - [1] -#endif - -Now the "remote" repo contains a bookmark pointing to a nonexistent revision - $ cd ../issue6159remote -#if b2-pushkey - $ hg bookmark - * foo 0:1599bc8b897a - $ hg log -r 1599bc8b897a - 0:1599bc8b897a _ (no-eol) -#endif - -#if b2-binary - $ hg bookmark - no bookmarks set - $ cat .hg/bookmarks - cf489fd8a374cab73c2dc19e899bde6fe3a43f8f foo - $ hg log -r cf489fd8a374 - abort: unknown revision 'cf489fd8a374'! + abort: cannot push bookmark foo as it points to a secret changeset [255] -#endif