- Dec 24, 2016
-
-
Gregory Szorc authored
Now that servers expose a capability indicating they support application/mercurial-0.2 and compression, clients can key off this to say they support responses that are compressed with various compression formats. After this commit, the HTTP wire protocol client now sends an "X-HgProto-<N>" request header indicating its support for "application/mercurial-0.2" media type and various compression formats. This commit also implements support for handling "application/mercurial-0.2" responses. It simply reads the header compression engine identifier then routes the remainder of the response to the appropriate decompressor. There were some test changes, but only to logging. That points to an obvious gap in our test coverage. This will be addressed in a subsequent commit once server support is in place (it is hard to test without server support).
-
- Oct 28, 2016
-
-
Katsunori FUJIWARA authored
On Windows platform, invoking printenv.py directly via hook is problematic, because: - unless binding between *.py suffix and python runtime, application selector dialog is displayed, and running test is blocked at each printenv.py invocations - it isn't safe to assume binding between *.py suffix and python runtime, because application binding is easily broken For example, installing IDE (VisualStudio with Python Tools, or so) often requires binding between source files and IDE itself. This patch invokes printenv.py via sh -c for test portability. This is a kind of follow up for d19787db6fe0, which eliminated explicit "python" for printenv.py. There are already other 'sh -c "printenv.py"' in *.t files, and this fix should be reasonable. This changes were confirmed in cases below: - without any application binding for *.py suffix - with binding between *.py suffix and VisualStudio This patch also replaces "echo + redirection" style with "heredoc" style, because: - hook command line is parsed by cmd.exe as shell at first, and - single quotation can't quote arguments on cmd.exe, therefore, - "printenv.py foobar" should be quoted by double quotation, but - nested quoting (or tricky escaping) isn't readable
-
- Aug 03, 2016
-
-
Pierre-Yves David authored
The new option will stay around. The experimental option was only meant to be temporary.
-
- Jul 15, 2016
-
-
Augie Fackler authored
Some systems (like FreeBSD jails) use something other than 127.0.0.1 for localhost, and it's not safe to assume it'll always be the same width. Using sed with a replacement like this sidesteps the problem.
-
- Apr 21, 2016
-
-
timeless authored
You can run tests like this: run-tests.py -l --extra-config-opt ui.usehttp2=true And ideally, no tests should fail...
-
- Mar 15, 2016
-
-
Jun Wu authored
chg currently does not support hg serve -d. It has a quick path testing if the command is hg serve -d and fallbacks to hg if so. But the test only works if "serve" is the first argument since the test wants to avoid false positives (for example, "-r serve" is different). This patch reorders "hg server" commands in tests, making them chg friendly.
-
- Jan 06, 2016
-
-
Mateusz Kwapich authored
Sometimes a txnclose or changegroup hook wants to iterate through all the changesets in transaction: in that situation usually the revset `$HG_NODE:` is used to select the revisions. Unfortunately this revset sometimes may contain too many changesets because we don't have the write lock while the hook runs newer changes may be added to repository in the meantime. That's why there is a need for extra variable carrying the information about the last change in the transaction.
-
- Jun 08, 2015
-
-
Matt Mackall authored
Make printenv executable so that we don't need python, TESTDIR, or quoting.
-
- May 27, 2015
-
-
Pierre-Yves David authored
We want to keep both code paths tested. The test is a bit too extensive to simply introduce dual testing in it so we make a copy for each protocol version.
-
- May 15, 2015
-
-
Gilles Moris authored
This is obsolete now that Python < 2.6 is no more supported. This is thus a backout of c499fff76440.
-
- Apr 15, 2015
-
-
Pierre-Yves David authored
The transaction ID is built from the object ID and creation time stamp to make sure it is unique.
-
- Dec 12, 2014
-
-
Siddharth Agarwal authored
Without this patch, if the server sets preferuncompressed, there's no way for clients to override that and force a non-streaming clone. With this patch, we extend the meaning of --pull to also override preferuncompressed and force a non-streaming clone.
-
- Oct 31, 2014
-
-
Durham Goode authored
ef62c66bee1b broke bookmarks getting copied during uncompressed clones. Since most of the pull logic has been moved into exchange.py, lets just call exchange.pull to fix up the repo with the latest bits after the streaming clone has bootstrapped the repo. This keeps us from having to duplicate the bookmark logic.
-
- Oct 16, 2014
-
-
Mike Hommey authored
addchangegroup creates a runhook function that is used to invoke the changegroup and incoming hooks, but at the time the function is called, the contents of hookargs associated with the transaction may have been modified externally. For instance, bundle2 code affects it with obsolescence markers and bookmarks info. It also creates problems when a single transaction is used with multiple changegroups added (as per an upcoming change), whereby the contents of hookargs are that of after adding a latter changegroup when invoking the hook for the first changegroup.
-
- Oct 12, 2014
-
-
Pierre-Yves David authored
We do not have enough information to provide finer data, but this is still useful information.
-
- Sep 26, 2014
-
-
Pierre-Yves David authored
Now that all clone methods (copy, pull and push) also transport bookmarks, we can safely drop the manual pulling that was performed during clone.
-
- Aug 16, 2014
-
-
Pierre-Yves David authored
The discovery of necessary bookmark updates is now done within the "discovery phase". This opens the door to the inclusion of bookmarks in a unified bundle2 push.
-
- Aug 06, 2014
-
-
Matt Mackall authored
-
- Jul 31, 2014
-
-
Pierre-Yves David authored
This will allow including phase information in the same bundle2 as the changesets.
-
- Apr 08, 2014
-
-
Pierre-Yves David authored
When a changegroup is added by a push on a publishing server, we ensure they are added as public. This is used to enforce publishing on server when the client is not aware of phases. It also prevents race conditions where a reader could see the changesets as draft before they get turned public by the client. Finally, this save rounds trip as the client does not need additional request to turn them public. However, this logic was only enforced when the changegroup was from a "push" source. And "push" is used for local pushes only. Wireprotocol push uses "serve" as source since Mercurial 1.9. We now enforce this logic for both "push" and "serve" sources. One could note that this logic was mainly useful during wireprotocol exchanges. So this code is finally put into good use, 9 versions after its introduction.
-
- Dec 20, 2013
-
-
Stéphane Klein authored
[This was applied in 181108726ea5 but backed out again in af02783dea65 because of Python 2.4 issues. This edition and test-http.t works with Python 2.4.] Context: mercurial access to repository server with http access, and this server is protected by basic auth. Before patch: * mercurial try an anonymous access to server, server return 401 response and mercurial resend request with login / password information After patch: * mercurial try an anonymous access to server, server return 401 response. For all next requests, mercurial keep in memory this information (this server need basic auth information). This patch reduce the number of http access against mercurial server. Example, before patch: 10.10.168.170 - - [25/Oct/2013:15:44:51 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:44:52 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:00 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:01 +0200] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:03 +0200] "GET /hg/testagt?cmd=batch HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:04 +0200] "GET /hg/testagt?cmd=batch HTTP/1.1" 200 42 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:06 +0200] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:07 +0200] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:09 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:10 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 15 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [25/Oct/2013:15:45:12 +0200] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 - "-" "mercurial/proto-1.0" Example after patch: 10.10.168.170 - - [28/Oct/2013:11:49:14 +0100] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 401 260 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:15 +0100] "GET /hg/testagt?cmd=capabilities HTTP/1.1" 200 147 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:17 +0100] "GET /hg/testagt?cmd=batch HTTP/1.1" 200 42 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:19 +0100] "GET /hg/testagt?cmd=getbundle HTTP/1.1" 200 61184 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:22 +0100] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 15 "-" "mercurial/proto-1.0" 10.10.168.170 - - [28/Oct/2013:11:49:24 +0100] "GET /hg/testagt?cmd=listkeys HTTP/1.1" 200 - "-" "mercurial/proto-1.0" In this last example, you can see only one 401 response.
-
- Feb 05, 2014
-
-
Mads Kiilerich authored
Dump the access log to verify that the client gets the 401s it deserves and handles them correctly. This establishes a baseline for Basic authentication protocol.
-
Mads Kiilerich authored
As mentioned on http://bz.selenic.com/show_bug.cgi?id=2739#c17 , b3083042bdda left test-http.t failing on Python < 2.4.3. That has not been noticed because most 2.4 testing has been done with a patched 2.4.2. This makes sure that the tests only are run for Python >= 2.4.3. That makes it possible to verify that everything else works with Python 2.4.
-
- Jan 16, 2014
-
-
Lucas Moscovicz authored
When users are using a revset they can get multiple password prompts. This prompts have no extra information about which password is being requested so I added the authuri to the prompt to make it recognizable. As in: $ hg log -r "outgoing('https://bitbucket.org/mg/test') - outgoing('https://bitbucket.org/nesneros/test')" http authorization required realm: Bitbucket.org HTTP user: interrupted! I changed it to describe the url when prompting for password. As in: $ hg log -r "outgoing('https://bitbucket.org/mg/test') - outgoing('https://bitbucket.org/nesneros/test')" http authorization required for https://bitbucket.org/mg/test realm: Bitbucket.org HTTP user: interrupted!
-
- Aug 08, 2012
-
-
durin42 authored
This was broken by 5884812686f7 due to lack of test coverage. This adds a test and fixes the defect.
-
- Jun 06, 2012
-
-
Brad Hall authored
Also fixed the tests that were doing this and expected it to work
-
- Jun 19, 2012
-
-
Adrian Buehlmann authored
-
- Jun 21, 2012
-
-
kiilerix authored
This will remove some reasons some tests are disabled on Windows.
-
- Jun 16, 2012
-
-
Adrian Buehlmann authored
-
- Apr 03, 2012
-
-
Benoit Allard authored
This makes the client use the uncompressed protocol.
-
- Nov 07, 2011
-
-
kiilerix authored
-
- Aug 26, 2011
-
- Aug 04, 2011
-
-
kiilerix authored
The extension hack is based on Henrik Stuart's hg-textauth.
-
- May 02, 2011
-
-
Peter Arrenbrecht authored
Fixes the regression where incoming could show local changes introduced by rev 72c84f24b420.
-
- Apr 29, 2011
-
-
Thomas Arendsen Hein authored
I just had: transferred 606 bytes in 2.9 seconds (211 bytes/sec)
-
- Feb 20, 2011
-
-
kiilerix authored
Invalid requests could give an unhandled ErrorResponse. Now this ErrorResponse is handled like other ErrorResponses so the client gets an error message which also is logged on the server.
-
- Feb 18, 2011
-
-
kiilerix authored
stdout could have content in its buffer while a subprocess ran and emitted output. Flushing stdout ensures that output now comes in the right order.
-
- Feb 15, 2011
-
-
kiilerix authored
-
- Oct 09, 2010
-
-
kiilerix authored
This reduces the number of patterns that must be adjusted when writing tests.
-
- Sep 26, 2010
-
-
Matt Mackall authored
-