[PATCH 02 of 14 "] repoview: introduce a filter for serving hidden changesets

Pulkit Goyal 7895pulkit at gmail.com
Mon Apr 15 18:25:42 EDT 2019


On Sun, Apr 14, 2019 at 5:22 AM Pierre-Yves David <
pierre-yves.david at ens-lyon.org> wrote:

> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> # Date 1526916515 -7200
> #      Mon May 21 17:28:35 2018 +0200
> # Node ID e34fc3aba6327af97f2bdf794497e89e7ef2a9ca
> # Parent  5ce5915a48297de3f7464e8f149629799da5ca6f
> # EXP-Topic hgweb-obsolete
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
> e34fc3aba632
> repoview: introduce a filter for serving hidden changesets
>
> There are multiple usecase for being able to explicitly view or pull
> obsolete
> from a server. We need to be able to do so without exposing the secret
> changesets. We introduces a dedicated repository "view" to do so. Way to
> expose
> this "view" to the user will come later.
>
> To keep a behavior consistent with expected client/server behavior, the
> general
> idea is for the obsolete access to be explicitly requested by the code
> generating the request. In addition, the will be server side configuration
> to
> restrict the access to this feature.
>
> diff --git a/tests/test-remote-hidden.t b/tests/test-remote-hidden.t
> new file mode 100644
> --- /dev/null
> +++ b/tests/test-remote-hidden.t
> @@ -0,0 +1,98 @@
> +========================================================
> +Test the ability to access a hidden revision on a server
> +========================================================
> +
> +#require serve
> +
> +  $ . $TESTDIR/testlib/obsmarker-common.sh
> +  $ cat >> $HGRCPATH << EOF
> +  > [phases]
> +  > # public changeset are not obsolete
> +  > publish=false
> +  > [experimental]
> +  > evolution=all
> +  > [ui]
> +  > logtemplate='{rev}:{node|short} {desc} [{phase}]\n'
> +  > EOF
> +
> +Setup a simple repository with some hidden revisions
> +----------------------------------------------------
> +
> +Testing the `served.hidden` view
> +
> +  $ hg init repo-with-hidden
> +  $ cd repo-with-hidden
> +  $ echo 'internal-phase' >> .hg/requires
>

Why do we need this hack?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190416/917d4a4b/attachment.html>


More information about the Mercurial-devel mailing list