diff tests/test-phases.t @ 16535:39d1f83eb05d stable

branchmap: server should not advertise secret changeset in branchmap (Issue3303) Discovery now use an overlay above branchmap to prune invisible "secret" changeset from branchmap. To minimise impact on the code during the code freeze, this is achieve by recomputing non-secret heads on the fly when any secret changeset exists. This is a computation heavy approach similar to the one used for visible heads. But few sever should contains secret changeset anyway. See comment in code for more robust approach. On local repo the wrapper is applied explicitly while the wire-protocol take care of wrapping branchmap call in a transparent way. This could be unified by the Peter Arrenbrecht and Sune Foldager proposal of a `peer` object. An inappropriate `(+i heads)` may still appear when pushing new changes on a repository with secret changeset. (see Issue3394 for details)
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Tue, 24 Apr 2012 16:32:44 +0200
parents 8dc573a9c5e5
children e4451d7432fa
line wrap: on
line diff
--- a/tests/test-phases.t
+++ b/tests/test-phases.t
@@ -135,6 +135,39 @@
   2 1 C
   1 0 B
   0 0 A
+
+(Issue3303)
+Check that remote secret changeset are ignore when checking creation of remote heads
+
+We add a secret head into the push destination.  This secreat head shadow a
+visible shared between the initial repo and the push destination.
+
+  $ hg up -q 4 # B'
+  $ mkcommit Z --config phases.new-commit=secret
+  $ hg phase .
+  5: secret
+
+# We now try to push a new public changeset that descend from the common public
+# head shadowed by the remote secret head.
+
+  $ cd ../initialrepo
+  $ hg up -q 6 #B'
+  $ mkcommit I
+  created new head
+  $ hg push ../push-dest
+  pushing to ../push-dest
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+
+:note: The "(+1 heads)" is wrong as we do not had any visible head
+
+
+Restore condition prior extra insertion.
+  $ hg -q --config extensions.mq= strip .
+  $ hg up -q 7
   $ cd ..
 
 Test secret changeset are not pull