[PATCH 2 of 4 STABLE] tests: port value-less unbundle capability test to test-push-http.t

Gregory Szorc gregory.szorc at gmail.com
Sun Feb 18 13:23:05 EST 2018


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1518972777 28800
#      Sun Feb 18 08:52:57 2018 -0800
# Branch stable
# Node ID fefd57bd957314acd20be2558b8fdeb1b9305e7d
# Parent  e978e0c132522bde7cd922a250b0733d7bbf870c
tests: port value-less unbundle capability test to test-push-http.t

This test is present in test-push-http-bundle1.t. Let's add it to
test-push-http.t to further unify the tests.

diff --git a/tests/test-push-http.t b/tests/test-push-http.t
--- a/tests/test-push-http.t
+++ b/tests/test-push-http.t
@@ -117,6 +117,38 @@ expect success, server lacks the unbundl
   $ hg rollback
   repository tip rolled back to revision 0 (undo serve)
 
+expect success, pre-d1b16a746db6 server supports the unbundle capability, but
+has no parameter
+
+  $ cat <<EOF > notcapable-unbundleparam.py
+  > from mercurial import extensions, httppeer
+  > def capable(orig, self, name):
+  >     if name == 'unbundle':
+  >         return True
+  >     return orig(self, name)
+  > def uisetup(ui):
+  >     extensions.wrapfunction(httppeer.httppeer, 'capable', capable)
+  > EOF
+  $ cp $HGRCPATH $HGRCPATH.orig
+  $ cat <<EOF >> $HGRCPATH
+  > [extensions]
+  > notcapable-unbundleparam = `pwd`/notcapable-unbundleparam.py
+  > EOF
+  $ req
+  pushing to http://localhost:$HGPORT/
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 1 changesets with 1 changes to 1 files
+  remote: phase-move: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b:  draft -> public
+  remote: phase-move: ba677d0156c1196c1a699fa53f390dcfc3ce3872:   -> public
+  remote: changegroup hook: * (glob)
+  % serve errors
+  $ hg rollback
+  repository tip rolled back to revision 0 (undo serve)
+  $ mv $HGRCPATH.orig $HGRCPATH
+
 expect push success, phase change failure
 
   $ cat > .hg/hgrc <<EOF


More information about the Mercurial-devel mailing list