This is an archive of the discontinued Mercurial Phabricator instance.

bookmarks: add bookmarks to hidden revs if directaccess config is set
ClosedPublic

Authored by pulkit on Jan 5 2018, 12:14 PM.

Details

Summary

This patch adds support to add bookmarks to hidden revs if
experimental.directaccessi=True config is set. A warning is also printed
saying "accessing hidden changeset <revhash>".

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Jan 5 2018, 12:14 PM
yuja requested changes to this revision.Jan 5 2018, 9:36 PM
yuja added a subscriber: yuja.

Needs some warning since a hidden revision may be revived?

This revision now requires changes to proceed.Jan 5 2018, 9:36 PM
pulkit edited the summary of this revision. (Show Details)Jan 6 2018, 1:48 AM
pulkit retitled this revision from bookmarks: add support to specify hidden revs if directaccess config is set to bookmarks: add bookmarks to hidden revs if directaccess config is set.
pulkit updated this revision to Diff 4732.
yuja requested changes to this revision.Jan 10 2018, 7:55 AM
yuja added inline comments.
mercurial/bookmarks.py
856 ↗(On Diff #4732)

_("adding ... changeset")

857 ↗(On Diff #4732)

Accessing hidden revisions here doesn't mean they will be bookmarked.

Perhaps we should instead warn if tgt is a hidden (or obsolete?) revision.

This revision now requires changes to proceed.Jan 10 2018, 7:55 AM
pulkit edited the summary of this revision. (Show Details)Jan 10 2018, 12:48 PM
pulkit updated this revision to Diff 4754.
yuja requested changes to this revision.Jan 11 2018, 7:47 AM
yuja added inline comments.
mercurial/bookmarks.py
859 ↗(On Diff #4754)

Perhaps we can say "bookmarking" or "reviving" instead of "accessing"? I don't know which is better, though.

Another minor problem I found is this warning will be repeated if
you pass more than one bookmark names.

This revision now requires changes to proceed.Jan 11 2018, 7:47 AM
pulkit updated this revision to Diff 4803.Jan 12 2018, 7:36 AM
yuja accepted this revision.Jan 12 2018, 8:27 AM
This revision is now accepted and ready to land.Jan 12 2018, 8:27 AM
yuja added a comment.Jan 12 2018, 8:31 AM

Queued, thanks.

mercurial/bookmarks.py
853 ↗(On Diff #4803)

FYI, it loops over bookmark names with the same rev, so
hiddenrevs would have at most one element, and the second
unhidehashlikerevs() call would be unnecessary.

This revision was automatically updated to reflect the committed changes.