diff tests/test-phases-exchange.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 40cc20042fb4
children 249542ded278
line wrap: on
line diff
--- a/tests/test-phases-exchange.t	Fri Apr 27 13:18:09 2012 -0500
+++ b/tests/test-phases-exchange.t	Tue Apr 24 16:32:44 2012 +0200
@@ -833,12 +833,20 @@
   o  0 public a-A - 054250a37db4
   
 
-pushing a locally public and draft changesets remotly secret should make them appear on the remote side
+pushing a locally public and draft changesets remotly secret should make them
+appear on the remote side.
+
 
   $ hg -R ../mu phase --secret --force 967b449fbc94
   $ hg push -r 435b5d83910c ../mu
   pushing to ../mu
   searching for changes
+  abort: push creates new remote head 435b5d83910c!
+  (did you forget to merge? use push -f to force)
+  [255]
+  $ hg push -fr 435b5d83910c ../mu # because the push will create new visible head
+  pushing to ../mu
+  searching for changes
   adding changesets
   adding manifests
   adding file changes