Sun, 16 Apr 2017 02:48:06 +0200 pager: stop using the color extension in tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 16 Apr 2017 02:48:06 +0200] rev 32025
pager: stop using the color extension in tests The feature is in core so let us use the core config knob directly.
Sun, 16 Apr 2017 11:55:08 -0700 bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 16 Apr 2017 11:55:08 -0700] rev 32024
bundle2: ignore errors seeking a bundle after an exception (issue4784) Many have seen a "stream ended unexpectedly" error. This message is raised from changegroup.readexactly() when a read(n) operation fails to return exactly N bytes. I believe most occurrences of this error in the wild stem from the code changed in this patch. Before, if bundle2's part applicator raised an Exception when processing/applying parts, the exception handler would attempt to iterate the remaining parts. If I/O during this iteration failed, it would likely raise the "stream ended unexpectedly" exception. The problem with this approach is that if we already encountered an I/O error iterating the bundle2 data during application, then any further I/O would almost certainly fail. If the original stream were closed, changegroup.readexactly() would obtain an empty string, triggering "stream ended unexpectedly" with "got 0." This is the error message that users would see. What's worse is that the original I/O related exception would be lost since a new exception would be raised. This made debugging the actual I/O failure effectively impossible. This patch changes the exception handler for bundle2 application to ignore errors when seeking the underlying stream. When the underlying error is I/O related, the seek should fail fast and the original exception will be re-raised. The output changes in test-http-bad-server.t demonstrate this. When the underlying error is not I/O related and the stream can be seeked, the old behavior is preserved.
Sun, 16 Apr 2017 11:12:37 -0700 error: rename RichIOError to PeerTransportError
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 16 Apr 2017 11:12:37 -0700] rev 32023
error: rename RichIOError to PeerTransportError This is a more descriptive name. RichIOError was introduced just hours ago, so it doesn't need to be marked as BC.
Sun, 16 Apr 2017 11:28:02 -0700 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 16 Apr 2017 11:28:02 -0700] rev 32022
httppeer: don't send empty Vary request header As part of writing test-http-bad-server.t, I noticed that some requests include an empty Vary HTTP request header. The Vary HTTP request header indicates which headers should be taken into account when determining if a cached response can be used. It also accepts the special value of "*". The previous code unconditionally added a Vary header. This could lead to an empty header value. While I don't believe this violates the HTTP spec, this is weird and just wastes bytes. So this patch changes behavior to only send a Vary header when it has a value. Some low-level wire protocol byte reporting tests changed. In some cases, the exact point of data termination changed. However, the behavior being tested - that clients react when the connection is closed in the middle of an HTTP request line or header - remains unchanged.
Sun, 16 Apr 2017 21:25:16 -0400 badserverext: explicitly flush each log write
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Apr 2017 21:25:16 -0400] rev 32021
badserverext: explicitly flush each log write No idea why, but without this, there was no content in the error logs that are `cat`d in the test on Windows.
Sun, 16 Apr 2017 21:00:22 -0400 test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Apr 2017 21:00:22 -0400] rev 32020
test-http-bad-server: conditionalize error output for Windows
Sun, 16 Apr 2017 20:59:14 -0400 test-tag: make hook runnable on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Apr 2017 20:59:14 -0400] rev 32019
test-tag: make hook runnable on Windows Simply setting the hook to *.sh causes Windows to open a dialog asking how to open *.sh files.
Sat, 15 Apr 2017 02:54:36 +0200 obsolescence: add test for the "branch replacement" logic during push, case D7
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:54:36 +0200] rev 32018
obsolescence: add test for the "branch replacement" logic during push, case D7 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:54:27 +0200 obsolescence: add test for the "branch replacement" logic during push, case D5
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:54:27 +0200] rev 32017
obsolescence: add test for the "branch replacement" logic during push, case D5 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:54:20 +0200 obsolescence: add test for the "branch replacement" logic during push, case D3
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:54:20 +0200] rev 32016
obsolescence: add test for the "branch replacement" logic during push, case D3 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:57 +0200 obsolescence: add test for the "branch replacement" logic during push, case B8
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:57 +0200] rev 32015
obsolescence: add test for the "branch replacement" logic during push, case B8 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:51 +0200 obsolescence: add test for the "branch replacement" logic during push, case B7
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:51 +0200] rev 32014
obsolescence: add test for the "branch replacement" logic during push, case B7 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:42 +0200 obsolescence: add test for the "branch replacement" logic during push, case B6
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:42 +0200] rev 32013
obsolescence: add test for the "branch replacement" logic during push, case B6 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:31 +0200 obsolescence: add test for the "branch replacement" logic during push, case B5
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:31 +0200] rev 32012
obsolescence: add test for the "branch replacement" logic during push, case B5 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:24 +0200 obsolescence: add test for the "branch replacement" logic during push, case B4
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:24 +0200] rev 32011
obsolescence: add test for the "branch replacement" logic during push, case B4 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:53:09 +0200 obsolescence: add test for the "branch replacement" logic during push, case B2
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:53:09 +0200] rev 32010
obsolescence: add test for the "branch replacement" logic during push, case B2 Mercurial checks for the introduction of new heads on push. Evolution comes into play to detect if existing branches on the server are being replaced by some of the new one we push. This changeset adds test for the improved "branch replacement" logic introduce in an earlier commits. This tests initially lived in the evolve extensions. Since we now have the code handling this logic in core, it make sense to have the tests in core too. See inline documentation for details about the test case added in this changeset.
Sat, 15 Apr 2017 02:55:18 +0200 checkheads: upgrade the obsolescence postprocessing logic (issue4354)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 02:55:18 +0200] rev 32009
checkheads: upgrade the obsolescence postprocessing logic (issue4354) The previous logic had many shortcoming (eg: looking at the head only, not handling prune, etc...), the new logic use a more robust approach: For each head, we check if after the push all changesets exclusive to this heads will be obsolete. If they are, the branch considered be "replaced". To check if a changeset will be obsolete, we simply checks: * the changeset phase * the existence of a marker relevant to the "pushed set" that affects the changesets.. This fixes two major issues of the previous algorithm: * branch partially rewritten (eg: head but not root) are no longer detected as replaced, * Prune are now properly handled. (This implementation was introduction in the evolve extension, version 6.0.0.) This new algorithm has an extended number of tests, a basic one is provided in this patch. The others will be introduced in their own changeset for clarity. In addition, we stop trying to process heads unknown locally, we do not have enough data to take an informed decision so we should stop pretending we do. This reflect a test that is now update.
Sun, 16 Apr 2017 00:37:31 -0400 test-http: add a (glob) for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Apr 2017 00:37:31 -0400] rev 32008
test-http: add a (glob) for Windows I'm not sure why the glob was ineffective with $TESTTMP here, but replacing it with '*' works.
Sun, 16 Apr 2017 00:29:38 -0400 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 16 Apr 2017 00:29:38 -0400] rev 32007
testlib: move the prune alias into a shell script for Windows Cramming all of this directly into an alias doesn't play nicely on Windows. Various test-exchange-obsmarkers-case-XX.t were failing with: abort: cannot select revision when creating marker It turned out that inside debugcommands.debugobsolete(), the following differed from Linux (where they were empty, at least in the case I debugged): 'rev': ['.`;'], 'template': "'{node}\\n'"
Sat, 15 Apr 2017 18:13:10 +0200 hidden: extract the code generating "filtered rev" error for wrapping
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 15 Apr 2017 18:13:10 +0200] rev 32006
hidden: extract the code generating "filtered rev" error for wrapping The goal is to help experimentation in extensions (ie: evolve) around more advance messages.
Sat, 15 Apr 2017 18:05:40 -0400 serve: add support for Mercurial subrepositories
Matt Harbison <matt_harbison@yahoo.com> [Sat, 15 Apr 2017 18:05:40 -0400] rev 32005
serve: add support for Mercurial subrepositories I've been using `hg serve --web-conf ...` with a simple '/=projects/**' [paths] configuration for awhile without issue. Let's ditch the need for the manual configuration in this case, and limit the repos served to the actual subrepos. This doesn't attempt to handle the case where a new subrepo appears while the server is running. That could probably be handled with a hook if somebody wants it. But it's such a rare case, it probably doesn't matter for the temporary serves. The main repo is served at '/', just like a repository without subrepos. I'm not sure why the duplicate 'adding ...' lines appear on Linux. They don't appear on Windows (see 594dd384803c), so they are optional. Subrepositories that are configured with '../path' or absolute paths are not cloneable from the server. (They aren't cloneable locally either, unless they also exist at their configured source, perhaps via the share extension.) They are still served, so that they can be browsed, or cloned individually. If we care about that cloning someday, we can probably just add the extra entries to the webconf dictionary. Even if the entries use '../' to escape the root, only the related subrepositories would end up in the dictionary.
Fri, 31 Mar 2017 23:00:41 -0400 hgwebdir: allow a repository to be hosted at "/"
Matt Harbison <matt_harbison@yahoo.com> [Fri, 31 Mar 2017 23:00:41 -0400] rev 32004
hgwebdir: allow a repository to be hosted at "/" This can be useful in general, but will also be useful for hosting subrepos, with the main repo at /.
Fri, 14 Apr 2017 00:03:30 -0700 httppeer: eliminate decompressresponse() proxy
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 14 Apr 2017 00:03:30 -0700] rev 32003
httppeer: eliminate decompressresponse() proxy Now that the response instance itself is wrapped with error handling, we no longer need this code. This code became dead with the previous patch because the added code catches HTTPException and re-raises as something else.
Fri, 14 Apr 2017 00:33:56 -0700 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 14 Apr 2017 00:33:56 -0700] rev 32002
httppeer: wrap HTTPResponse.read() globally There were a handful of places in the code where HTTPResponse.read() was called with no explicit error handling or with inconsistent error handling. In order to eliminate this class of bug, we globally swap out HTTPResponse.read() with a unified error handler. I initially attempted to fix all call sites. However, after going down that rabbit hole, I figured it was best to just change read() to do what we want. This appears to be a worthwhile change, as the tests demonstrate many of our uncaught exceptions go away. To better represent this class of failure, we introduce a new error type. The main benefit over IOError is it can hold a hint. I'm receptive to tweaking its name or inheritance.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 +10000 tip