Patchwork [2,of,3,v2] tests: add more test coverage of phase changes when pushing

login
register
mail settings
Submitter Mads Kiilerich
Date Oct. 14, 2016, 1:17 a.m.
Message ID <24a7ccfb932b134da24e.1476407849@localhost.localdomain>
Download mbox | patch
Permalink /patch/17077/
State Accepted
Headers show

Comments

Mads Kiilerich - Oct. 14, 2016, 1:17 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1471734720 -7200
#      Sun Aug 21 01:12:00 2016 +0200
# Node ID 24a7ccfb932b134da24e58817991943c8bbd63fa
# Parent  426994acbf9c9b78aa6922a279dca4091b6508dc
tests: add more test coverage of phase changes when pushing

Prepare for test coverage of phase updates with future push --readonly option,
both with and without actually pushing changesets.
Yuya Nishihara - Oct. 17, 2016, 2:37 p.m.
On Fri, 14 Oct 2016 03:17:29 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1471734720 -7200
> #      Sun Aug 21 01:12:00 2016 +0200
> # Node ID 24a7ccfb932b134da24e58817991943c8bbd63fa
> # Parent  426994acbf9c9b78aa6922a279dca4091b6508dc
> tests: add more test coverage of phase changes when pushing

The patch 1 is already queued. I've queued this one, too, thanks.

> -  $ killdaemons.py

killdaemons.py might be removed unintentionally, but that's okay because
daemons are killed by run-tests.py anyway.

Patch

diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -1182,10 +1182,40 @@  2. Test that failed phases movement are 
   cannot lock source repo, skipping local public phase update
   [1]
   $ chmod -R +w .hg
-  $ hgph Upsilon
 
   $ cd ..
 
-  $ killdaemons.py
+#endif
 
-#endif
+Test that clone behaves like pull and doesn't
+publish changesets as plain push does
+
+  $ hg -R Upsilon phase -q --force --draft 2
+  $ hg clone -q Upsilon Pi -r 7
+  $ hgph Upsilon -r 'min(draft())'
+  o  2 draft a-C - 54acac6f23ab
+  |
+  ~
+
+  $ hg -R Upsilon push Pi -r 7
+  pushing to Pi
+  searching for changes
+  no changes found
+  [1]
+  $ hgph Upsilon -r 'min(draft())'
+  o  8 draft a-F - b740e3e5c05d
+  |
+  ~
+
+  $ hg -R Upsilon push Pi -r 8
+  pushing to Pi
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+
+  $ hgph Upsilon -r 'min(draft())'
+  o  9 draft a-G - 3e27b6f1eee1
+  |
+  ~