<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 14, 2019 at 5:22 AM Pierre-Yves David <<a href="mailto:pierre-yves.david@ens-lyon.org">pierre-yves.david@ens-lyon.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"># HG changeset patch<br>
# User Pierre-Yves David <<a href="mailto:pierre-yves.david@octobus.net" target="_blank">pierre-yves.david@octobus.net</a>><br>
# Date 1526916515 -7200<br>
#      Mon May 21 17:28:35 2018 +0200<br>
# Node ID e34fc3aba6327af97f2bdf794497e89e7ef2a9ca<br>
# Parent  5ce5915a48297de3f7464e8f149629799da5ca6f<br>
# EXP-Topic hgweb-obsolete<br>
# Available At <a href="https://bitbucket.org/octobus/mercurial-devel/" rel="noreferrer" target="_blank">https://bitbucket.org/octobus/mercurial-devel/</a><br>
#              hg pull <a href="https://bitbucket.org/octobus/mercurial-devel/" rel="noreferrer" target="_blank">https://bitbucket.org/octobus/mercurial-devel/</a> -r e34fc3aba632<br>
repoview: introduce a filter for serving hidden changesets<br>
<br>
There are multiple usecase for being able to explicitly view or pull obsolete<br>
from a server. We need to be able to do so without exposing the secret<br>
changesets. We introduces a dedicated repository "view" to do so. Way to expose<br>
this "view" to the user will come later.<br>
<br>
To keep a behavior consistent with expected client/server behavior, the general<br>
idea is for the obsolete access to be explicitly requested by the code<br>
generating the request. In addition, the will be server side configuration to<br>
restrict the access to this feature.<br>
<br>
diff --git a/tests/test-remote-hidden.t b/tests/test-remote-hidden.t<br>
new file mode 100644<br>
--- /dev/null<br>
+++ b/tests/test-remote-hidden.t<br>
@@ -0,0 +1,98 @@<br>
+========================================================<br>
+Test the ability to access a hidden revision on a server<br>
+========================================================<br>
+<br>
+#require serve<br>
+<br>
+  $ . $TESTDIR/testlib/obsmarker-common.sh<br>
+  $ cat >> $HGRCPATH << EOF<br>
+  > [phases]<br>
+  > # public changeset are not obsolete<br>
+  > publish=false<br>
+  > [experimental]<br>
+  > evolution=all<br>
+  > [ui]<br>
+  > logtemplate='{rev}:{node|short} {desc} [{phase}]\n'<br>
+  > EOF<br>
+<br>
+Setup a simple repository with some hidden revisions<br>
+----------------------------------------------------<br>
+<br>
+Testing the `served.hidden` view<br>
+<br>
+  $ hg init repo-with-hidden<br>
+  $ cd repo-with-hidden<br>
+  $ echo 'internal-phase' >> .hg/requires<br></blockquote><div><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Why do we need this hack?</div></div></div>