Bug 6159 - hg pushes bookmarks pointing to secret revisions
Summary: hg pushes bookmarks pointing to secret revisions
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: bookmarks (show other bugs)
Version: 5.0
Hardware: PC Linux
: wish bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-20 16:29 UTC by Mitchell Plamann
Modified: 2019-09-05 00:01 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments
A unified test demonstrating the bug (958 bytes, application/x-perl)
2019-06-20 16:29 UTC, Mitchell Plamann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mitchell Plamann 2019-06-20 16:29 UTC
Created attachment 2051 [details]
A unified test demonstrating the bug

If a repo has a bookmark "some-bookmark" pointing to a secret changeset, running "hg push -r some-bookmark" will push that bookmark, but not the changeset referenced by that bookmark.

This leaves the server's bookmarks in a bad state, because that bookmark now points to a revision that does not exist on the server.

See the attachment for a test demonstrating this bug (tested against hg 5.0.1).
Comment 1 Mitchell Plamann 2019-06-20 16:36 UTC
I would have expected hg to refuse to push the bookmark, since it is not able to push the changeset referenced by the bookmark.
Comment 2 HG Bot 2019-08-28 19:30 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/cf9dbc7377de
Navaneeth Suresh <navaneeths1998@gmail.com>
tests: add test to demonstrate issue6159

Differential Revision: https://phab.mercurial-scm.org/D6740

(please test the fix)
Comment 3 HG Bot 2019-08-28 19:30 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/3332bde53714
Navaneeth Suresh <navaneeths1998@gmail.com>
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

(please test the fix)
Comment 4 Bugzilla 2019-09-05 00:01 UTC
Bug was set to TESTING for 7 days, resolving