[PATCH 11 of 14] streamclone: tests phase exchange during stream clone
Boris Feld
boris.feld at octobus.net
Thu Jan 18 11:21:37 UTC 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1516238924 -3600
# Thu Jan 18 02:28:44 2018 +0100
# Node ID d3bfe88b1b56dc7bae6fbd302e5cf345f4e43bfa
# Parent 59f1588dd7164161aeb734cacaade4c6ae6827c9
# EXP-Topic b2-stream
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r d3bfe88b1b56
streamclone: tests phase exchange during stream clone
We add a test dedicated to phases. As reported in issue 5648 stream from a non publishing
server is currently broken (does not preserve the phase). We'll fix it with 'v2'
support in the next changesets.
diff --git a/tests/test-clone-uncompressed.t b/tests/test-clone-uncompressed.t
--- a/tests/test-clone-uncompressed.t
+++ b/tests/test-clone-uncompressed.t
@@ -262,3 +262,65 @@ clone it
#endif
$ hg -R with-bookmarks bookmarks
some-bookmark 1:c17445101a72
+
+Stream repository with phases
+-----------------------------
+
+Clone as publishing
+
+ $ hg -R server phase -r 'all()'
+ 0: draft
+ 1: draft
+
+#if stream-legacy
+ $ hg clone --stream http://localhost:$HGPORT phase-publish
+ streaming all changes
+ 1027 files to transfer, 96.3 KB of data
+ transferred 96.3 KB in * seconds (*) (glob)
+ searching for changes
+ no changes found
+ updating to branch default
+ 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
+#endif
+#if stream-bundle2
+ $ hg clone --stream http://localhost:$HGPORT phase-publish
+ streaming all changes
+ 1027 files to transfer, 96.3 KB of data
+ transferred 96.3 KB in * seconds (* */sec) (glob)
+ updating to branch default
+ 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
+#endif
+ $ hg -R phase-publish phase -r 'all()'
+ 0: public
+ 1: public
+
+Clone as non publishing
+
+ $ cat << EOF >> server/.hg/hgrc
+ > [phases]
+ > publish = False
+ > EOF
+#if stream-legacy
+ $ hg clone --stream http://localhost:$HGPORT phase-no-publish
+ streaming all changes
+ 1027 files to transfer, 96.3 KB of data
+ transferred 96.3 KB in * seconds (*) (glob)
+ searching for changes
+ no changes found
+ updating to branch default
+ 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg -R phase-no-publish phase -r 'all()'
+ 0: public
+ 1: public
+#endif
+#if stream-bundle2
+ $ hg clone --stream http://localhost:$HGPORT phase-no-publish
+ streaming all changes
+ 1027 files to transfer, 96.3 KB of data
+ transferred 96.3 KB in * seconds (* */sec) (glob)
+ updating to branch default
+ 1025 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg -R phase-no-publish phase -r 'all()'
+ 0: public
+ 1: public
+#endif
More information about the Mercurial-devel
mailing list