Commit Graph

10 Commits

Author SHA1 Message Date
Augie Fackler
ee537483fc tests: update test-bundle2-pushback to pass the import checker 2017-08-22 15:04:36 -04:00
Augie Fackler
3112944d5b tests: replace yet more calls to python with $PYTHON
These are some simple cases. More to come in a future change.

Reviewers: krbullock

Reviewed By: krbullock

Differential Revision: https://phab.mercurial-scm.org/D4
2017-07-05 11:10:11 -05:00
Pierre-Yves David
a7ac53500f tests: remove initial bundle2 enabling in various bundle2 tests
Bundle 2 is enable by default since 3.6 so we don't need this anymore.

The remaining use of 'experimental.bundle2-exp' are there to test legacy behavior
with bundle 1. Future patches will introduce a way outside of experimental to
test that.
2016-08-02 14:54:06 +02:00
Matt Harbison
de473412b1 tests: restore 'python' and '$TESTDIR/' for dummyssh invocation
This is a backout of 93589179c542, and a partial backout of 9b1628b91e74.

Windows won't execute 'dummyssh' directly, presumably because CreateProcess()
doesn't know how to execute a bash script:

   $ hg clone -e "dummyssh" ssh://user@dummy/cloned sshclone
   remote: 'dummyssh' is not recognized as an internal or external command,
   remote: operable program or batch file.
   abort: no suitable response from remote hg!
   [255]

With the restoration of python as the executable, $TESTDIR needs to be restored
for these invocations, because python won't search $PATH for 'dummyssh':

   $ hg clone -e "python dummyssh" ssh://user@dummy/cloned sshclone
   remote: python: can't open file 'dummyssh': [Errno 2] No such file or directory
   abort: no suitable response from remote hg!
   [255]
2015-06-09 21:39:33 -04:00
Matt Mackall
c64d336faa tests: simplify calls to dummyssh
dummyssh is marked executable and is in the path, no need for python,
TESTDIR, or quotes.
2015-06-08 15:02:49 -05:00
Pierre-Yves David
289c8c97de bundle2: stop capturing output for ssh again
This backout 668da6e015fd since we can have real time output with ssh
again. The tests change is not backed-out because it was a test output
fix.
2015-05-20 11:44:06 -05:00
Pierre-Yves David
c99cb9e546 push: acquire local 'wlock' if "pushback" is expected (BC) (issue4596)
If the client allows "pushback", the bundle2 served back by the server may
contains parts that will write to the repository. Such parts may require the
'wlock' (eg: bookmark) so we acquire it in advance to make sure it got acquired
before the 'lock'.
2015-04-15 10:36:21 -04:00
Pierre-Yves David
93e144e4f3 run-test: enable the devel warning during tests
This should help us to catch new locking order issues as soon as possible.

There are two harmless test updates (from the config change). Moreover, some
bundle2 tests are displaying warning for a legitimate reason. The use of pushkey
during the unbundle process may requires the 'wlock' after 'lock' (around the
whole unbundle process was taken). This is non-trivial to fix, so I better have
the check on, with the warning in the test than the check off. See issue4596 for
details.
2015-04-12 09:46:03 -04:00
Pierre-Yves David
af7d20b000 bundle2: rename format, parts and config to final names
It is finally time to freeze the bundle2 format! To do so we:
- rename HG2Y to HG20,
- drop "b2x:" prefix from all part names,
- rename capability to "bundle2-exp" to "bundle2"
- rename the hook flag from 'bundle2-exp' to 'bundle2'
2015-04-09 16:25:48 -04:00
Eric Sumner
973f0c3522 bundle2-push: provide transaction to reply unbundler
This patch series is intended to allow bundle2 push reply part handlers to
make changes to the local repository; it has been developed in parallel with
an extension that allows the server to rebase incoming changesets while applying
them.

This diff adds an experimental config option "bundle2.pushback" which provides
a transaction to the reply unbundler during a push operation.  This behavior is
opt-in because of potential security issues: the response can contain any part
type that has a handler defined, allowing the server to make arbitrary changes
to the local repository.
2014-11-21 15:50:38 -08:00