diff tests/test-bundle2.t @ 21075:438803e4bd97

bundle2: support for push over the wire We use the new method defined in the past changeset to send a bundle2 stream and receive one in reply. The http version is missing remote output support. This will be done later using a bundle part.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 15 Apr 2014 11:53:10 -0400
parents 0a9cae236738
children 07bcbf326c8d
line wrap: on
line diff
--- a/tests/test-bundle2.t	Tue Apr 15 17:53:52 2014 -0400
+++ b/tests/test-bundle2.t	Tue Apr 15 11:53:10 2014 -0400
@@ -158,6 +158,9 @@
   > bundle2=True
   > [ui]
   > ssh=python "$TESTDIR/dummyssh"
+  > [web]
+  > push_ssl = false
+  > allow_push = *
   > EOF
 
 The extension requires a repo (currently unused)
@@ -711,4 +714,72 @@
   (run 'hg heads .' to see heads, 'hg merge' to merge)
   $ cat main-error.log
 
+push over ssh
 
+  $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8
+  pushing to ssh://user@dummy/other
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 1 changesets with 1 changes to 1 files
+
+push over http
+
+  $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
+  $ cat other.pid >> $DAEMON_PIDS
+
+  $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403
+  pushing to http://localhost:$HGPORT2/
+  searching for changes
+  $ cat other-error.log
+
+Check final content.
+
+  $ hg -R other log -G
+  o  changeset:   7:32af7686d403
+  |  tag:         tip
+  |  user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  |  date:        Sat Apr 30 15:24:48 2011 +0200
+  |  summary:     D
+  |
+  o  changeset:   6:5fddd98957c8
+  |  user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  |  date:        Sat Apr 30 15:24:48 2011 +0200
+  |  summary:     C
+  |
+  o  changeset:   5:42ccdea3bb16
+  |  parent:      0:cd010b8cd998
+  |  user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  |  date:        Sat Apr 30 15:24:48 2011 +0200
+  |  summary:     B
+  |
+  | o  changeset:   4:02de42196ebe
+  | |  parent:      2:24b6387c8c8c
+  | |  user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  | |  date:        Sat Apr 30 15:24:48 2011 +0200
+  | |  summary:     H
+  | |
+  | | o  changeset:   3:eea13746799a
+  | |/|  parent:      2:24b6387c8c8c
+  | | |  parent:      1:9520eea781bc
+  | | |  user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  | | |  date:        Sat Apr 30 15:24:48 2011 +0200
+  | | |  summary:     G
+  | | |
+  | o |  changeset:   2:24b6387c8c8c
+  |/ /   parent:      0:cd010b8cd998
+  | |    user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  | |    date:        Sat Apr 30 15:24:48 2011 +0200
+  | |    summary:     F
+  | |
+  | @  changeset:   1:9520eea781bc
+  |/   user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+  |    date:        Sat Apr 30 15:24:48 2011 +0200
+  |    summary:     E
+  |
+  o  changeset:   0:cd010b8cd998
+     user:        Nicolas Dumazet <nicdumz.commits@gmail.com>
+     date:        Sat Apr 30 15:24:48 2011 +0200
+     summary:     A
+