( )⚙ D1735 commands: use the new API to access hidden changesets in various commands

This is an archive of the discontinued Mercurial Phabricator instance.

commands: use the new API to access hidden changesets in various commands
ClosedPublic

Authored by pulkit on Dec 19 2017, 7:10 AM.

Details

Summary

In previous patches, we have added an internal API to unhide hidden changesets.
This patch makes the following command use that api in nowarn mode i.e. there
will be no warning while accessing hidden changesets.

cat, diff, export, files, heads, identify, log, manifest, parents, status

This patch also adds test demonstarting the behaviour.

.. feature:: Accessing hidden changesets

Set config option 'experimental.directaccess = True' to access hidden
changesets from read only commands.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Dec 19 2017, 7:10 AM
yuja added a subscriber: yuja.Dec 19 2017, 9:35 AM
yuja added inline comments.
mercurial/commands.py
1283

Maybe needs if rev:?
Passing revspec=[''] seems not right.

yuja accepted this revision.Dec 26 2017, 8:43 AM
This revision is now accepted and ready to land.Dec 26 2017, 8:43 AM
yuja added inline comments.Dec 26 2017, 8:55 AM
mercurial/commands.py
1283

Can you send a followup?

Passing [''] works because parse('') raises ParseError, but
that doesn't seem legit.

This revision was automatically updated to reflect the committed changes.