Commit Graph

15 Commits

Author SHA1 Message Date
Durham Goode
21faf618dc changegroup: replace getchangegroup with makechangegroup
As part of reducing the number of changegroup creation APIs, let's replace
getchangegroup with calls to makechangegroup. This is mostly a drop in
replacement, but it does change the version specifier to be required, so it's
more obvious which callers are creating old version 1 changegroups still.

Differential Revision: https://phab.mercurial-scm.org/D669
2017-09-10 18:50:12 -07:00
Augie Fackler
aa7e7bad35 tests: clean up even more direct python calls with $PYTHON
This time ones that are prefixed with =, ", ', or `. This appears to
be the last of them.

Differential Revision: https://phab.mercurial-scm.org/D14
2017-06-20 17:31:18 -04:00
Augie Fackler
82b2cf516f tests: capitalize Python when it's not used as a command name
This avoids some false positives in an upcoming check-code rule.

Reviewers: krbullock

Reviewed By: krbullock

Differential Revision: https://phab.mercurial-scm.org/D3
2017-07-05 11:09:55 -05:00
Augie Fackler
e5d7bd82c5 cleanup: use $PYTHON to run python in many more tests
Spotted one of these, then wrote a check-code rule that caught them
all. It will be the next change.
2017-06-20 09:45:02 -04:00
Pierre-Yves David
dfb3fbad15 test-bundle2-remote-changegroup: directly use repo.vfs.join
The 'repo.join' method is about to be deprecated.
2017-03-08 16:53:55 -08:00
Pierre-Yves David
1b40b7e1c5 getchangegroup: take an 'outgoing' object as argument (API)
There is various version of this function that differ mostly by the way they
define the bundled set. The flexibility is now available in the outgoing object
itself so we move the complexity into the caller themself. This will allow use
to remove a good share of the similar function to obtains a changegroup in the
'changegroup.py' module.

An important side effect is that we stop calling 'computeoutgoing' in
'getchangegroup'. This is fine as code that needs such argument processing
is actually going through the 'exchange' module which already all this function
itself.
2016-08-09 17:00:38 +02: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
Pierre-Yves David
ede81c8447 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
This bundle command is meant to generate a bundle1, we enforce that to avoid
test's misbehavior when moving to general-delta by default.
2015-10-16 02:53:57 +01: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
Matt Mackall
b709208c37 tests: drop DAEMON_PIDS from killdaemons calls 2015-06-08 14:55:40 -05:00
Matt Mackall
3ad28905f6 tests: drop explicit $TESTDIR from executables
$TESTDIR is added to the path, so this is superfluous. Also,
inconsistent use of quotes means we might have broken on tests with
paths containing spaces.
2015-06-08 14:44:30 -05: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
9823f2cb56 bundle2: lowercase part types
Since the capitalization no longer carries any meaning (previous diff), this
patch normalizes all of the bundle2 part type strings to lower case.
2014-12-17 15:11:26 -08:00
Mike Hommey
a290d1f800 bundle2: client side support for a part to import external bundles
Bundle2 opens doors to advanced features allowing to reduce load on
mercurial servers, and improve clone experience for users on unstable or
slow networks.

For instance, it could be possible to pre-generate a bundle of a
repository, and give a pointer to it to clients cloning the repository,
followed by another changegroup with the remainder. For significantly
big repositories, this could come as several base bundles with e.g. 10k
changesets, which, combined with checkpoints (not part of this change),
would prevent users with flaky networks from starting over any time
their connection fails.

While the server-side support for those features doesn't exist yet, it
is preferable to have client-side support for this early-on, allowing
experiments on servers only requiring a vanilla client with bundle2
enabled.
2014-10-17 09:57:05 +09:00