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.
Thu, 13 Apr 2017 22:19:28 -0700 tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 13 Apr 2017 22:19:28 -0700] rev 32001
tests: add tests for poorly behaving HTTP server I've spent several hours over the past few weeks investigating networking failures involving hg.mozilla.org. As part of this, it has become clear that the Mercurial client's error handling when it encounters network failures is far from robust. To prove this is true, I've devised a battery of tests simulating various network failures, notably premature connection closes. To achieve this, I've implemented an extension that monkeypatches the built-in HTTP server and hooks in at the socket level and allows various events to occur based on config options. For example, you can refuse to accept() a client socket or you can close() the socket after N bytes have been sent or received. The latter effectively simulates an unexpected connection drop (and these occur all the time in the real world). The new test file launches servers exhibiting various "bad" behaviors and points a client at them. As the many TODO comments in the test call attention to, Mercurial often displays unhelpful errors when network-related failures occur. This makes it difficult for users to understand what's going on and difficult for server administrators to pinpoint root causes without packet tracing. Upcoming patches will attempt to fix these error handling deficiencies.
Thu, 13 Apr 2017 22:12:04 -0700 phases: emit phases to pushkey protocol in deterministic order
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 13 Apr 2017 22:12:04 -0700] rev 32000
phases: emit phases to pushkey protocol in deterministic order An upcoming test will report exact bytes sent over the wire protocol. Without this change, the ordering of phases listkey data is non-deterministic.
Thu, 13 Apr 2017 18:04:38 -0700 keepalive: send HTTP request headers in a deterministic order
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 13 Apr 2017 18:04:38 -0700] rev 31999
keepalive: send HTTP request headers in a deterministic order An upcoming patch will add low-level testing of the bytes being sent over the wire. As part of developing that test, I discovered that the order of headers in HTTP requests wasn't deterministic. This patch makes the order deterministic to make things easier to test.
Sat, 15 Apr 2017 11:29:42 +0200 revset: properly parse "descend" argument of followlines()
Denis Laxalde <denis@laxalde.org> [Sat, 15 Apr 2017 11:29:42 +0200] rev 31998
revset: properly parse "descend" argument of followlines() We parse "descend" symbol as a Boolean using getboolean (prior extraction by getargsdict already checked that it is a symbol). In tests, check for error cases and vary Boolean values here and there.
Sat, 15 Apr 2017 11:26:09 +0200 revsetlang: add a getboolean helper function
Denis Laxalde <denis@laxalde.org> [Sat, 15 Apr 2017 11:26:09 +0200] rev 31997
revsetlang: add a getboolean helper function This will be used to parse followlines's "descend" argument.
Tue, 28 Mar 2017 10:15:02 +0200 track-tags: write all tag changes to a file
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 10:15:02 +0200] rev 31996
track-tags: write all tag changes to a file The tag changes information we compute is now written to disk. This gives hooks full access to that data. The format picked for that file uses a 2 characters prefix for the action: -R: tag removed +A: tag added -M: tag moved (old value) +M: tag moved (new value) This format allows hooks to easily select the line that matters to them without having to post process the file too much. Here is a couple of examples: * to select all newly tagged changeset, match "^+", * to detect tag move, match "^.M", * to detect tag deletion, match "-R". Once again we rely on the fact the tag tests run through all possible situations to test this change.
Tue, 28 Mar 2017 10:14:55 +0200 track-tags: compute the actual differences between tags pre/post transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 10:14:55 +0200] rev 31995
track-tags: compute the actual differences between tags pre/post transaction We now compute the proper actuall differences between tags before and after the transaction. This catch a couple of false positives in the tests. The compute the full difference since we are about to make this data available to hooks in the next changeset.
Tue, 28 Mar 2017 06:38:09 +0200 track-tags: introduce first bits of tags tracking during transaction
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:38:09 +0200] rev 31994
track-tags: introduce first bits of tags tracking during transaction This changeset introduces detection of tags changes during transaction. When this happens a 'tag_moved=1' argument is set for hooks, similar to what we do for bookmarks and phases. This code is disabled by default as there are still various performance concerns. Some require a smarter use of our existing tag caches and some other require rework around the transaction logic to skip execution when unneeded. These performance improvements have been delayed, I would like to be able to experiment and stabilize the feature behavior first. Later changesets will push the concept further and provide a way for hooks to know what are the actual changes introduced by the transaction. Similar work is needed for the other families of changes (bookmark, phase, obsolescence, etc). Upgrade of the transaction logic will likely be performed at the same time. The current code can report some false positive when .hgtags file changes but resulting tags are unchanged. This will be fixed in the next changeset. For testing, we simply globally enable a hook in the tag test as all the possible tag update cases should exist there. A couple of them show the false positive mentioned above. See in code documentation for more details.
Tue, 28 Mar 2017 05:06:56 +0200 tags: introduce a function to return a valid fnodes list from revs
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 05:06:56 +0200] rev 31993
tags: introduce a function to return a valid fnodes list from revs This will get used to compare tags between two set of revisions during a transaction (pre and post heads). The end goal is to be able to track tags movement in transaction hooks.
Fri, 14 Apr 2017 14:25:06 +0200 context: possibly yield initial fctx in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 14:25:06 +0200] rev 31992
context: possibly yield initial fctx in blockdescendants() If initial 'fctx' has changes in line range with respect to its parents, we yield it first. This makes 'followlines(..., descend=True)' consistent with 'descendants()' revset which yields the starting revision. We reuse one iteration of blockancestors() which does exactly what we want. In test-annotate.t, adjust 'startrev' in one case to cover the situation where the starting revision does not touch specified line range.
Fri, 14 Apr 2017 14:09:26 +0200 context: add an assertion checking linerange consistency in blockdescendants()
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 14 Apr 2017 14:09:26 +0200] rev 31991
context: add an assertion checking linerange consistency in blockdescendants() If this assertion fails, this indicates a flaw in the algorithm. So fail fast instead of possibly producing wrong results. Also extend the target line range in test to catch a merge changeset with all its parents.
Fri, 14 Apr 2017 12:34:26 -0700 windows: add win32com.shell to demandimport ignore list
Kostia Balytskyi <ikostia@fb.com> [Fri, 14 Apr 2017 12:34:26 -0700] rev 31990
windows: add win32com.shell to demandimport ignore list Module 'appdirs' tries to import win32com.shell (and catch ImportError as an indication of failure) to check whether some further functionality should be implemented one or another way [1]. Of course, demandimport lets it down, so if we want appdirs to work we have to add it to demandimport's ignore list. The reason we want appdirs to work is becuase it is used by setuptools [2] to determine egg cache location. Only fairly recent versions of setuptools depend on this so people don't see this often. [1] https://github.com/ActiveState/appdirs/blob/master/appdirs.py#L560 [2] https://github.com/pypa/setuptools/blob/aae0a928119d2a178882c32bded02270e30d0273/pkg_resources/__init__.py#L1369
Thu, 13 Apr 2017 16:28:15 +0200 obsolescence: add test for the "branch replacement" logic during push, case D6
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:28:15 +0200] rev 31989
obsolescence: add test for the "branch replacement" logic during push, case D6 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:27:54 +0200 obsolescence: add test dor the "branch replacement" logic during push, case D4
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:27:54 +0200] rev 31988
obsolescence: add test dor the "branch replacement" logic during push, case D4 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:27:42 +0200 obsolescence: add test for the "branch replacement" logic during push, case D2
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:27:42 +0200] rev 31987
obsolescence: add test for the "branch replacement" logic during push, case D2 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:27:28 +0200 obsolescence: add test for the "branch replacement" logic during push, case D1
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:27:28 +0200] rev 31986
obsolescence: add test for the "branch replacement" logic during push, case D1 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:27:05 +0200 obsolescence: add test for the "branch replacement" logic during push, case C4
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:27:05 +0200] rev 31985
obsolescence: add test for the "branch replacement" logic during push, case C4 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:26:51 +0200 obsolescence: add test for the "branch replacement" logic during push, case C3
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:26:51 +0200] rev 31984
obsolescence: add test for the "branch replacement" logic during push, case C3 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:26:37 +0200 obsolescence: add test for the "branch replacement" logic during push, case C2
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:26:37 +0200] rev 31983
obsolescence: add test for the "branch replacement" logic during push, case C2 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:25:59 +0200 obsolescence: add test for the "branch replacement" logic during push, case B3
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:25:59 +0200] rev 31982
obsolescence: add test for the "branch replacement" logic during push, case B3 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:25:44 +0200 obsolescence: add test for the "branch replacement" logic during push, case A8
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:25:44 +0200] rev 31981
obsolescence: add test for the "branch replacement" logic during push, case A8 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:25:26 +0200 obsolescence: add test for the "branch replacement" logic during push, case A7
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:25:26 +0200] rev 31980
obsolescence: add test for the "branch replacement" logic during push, case A7 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:25:11 +0200 obsolescence: add test for the "branch replacement" logic during push, case A6
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:25:11 +0200] rev 31979
obsolescence: add test for the "branch replacement" logic during push, case A6 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:24:57 +0200 obsolescence: add test for the "branch replacement" logic during push, case A5
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:24:57 +0200] rev 31978
obsolescence: add test for the "branch replacement" logic during push, case A5 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:23:39 +0200 obsolescence: add test for the "branch replacement" logic during push, case A4
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:23:39 +0200] rev 31977
obsolescence: add test for the "branch replacement" logic during push, case A4 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test cases. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:23:18 +0200 obsolescence: add test for the "branch replacement" logic during push, case A3
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:23:18 +0200] rev 31976
obsolescence: add test for the "branch replacement" logic during push, case A3 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test case. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:23:01 +0200 obsolescence: add test for the "branch replacement" logic during push, case A2
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:23:01 +0200] rev 31975
obsolescence: add test for the "branch replacement" logic during push, case A2 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test case. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:22:46 +0200 obsolescence: add test for the "branch replacement" logic during push, case A1
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:22:46 +0200] rev 31974
obsolescence: add test for the "branch replacement" logic during push, case A1 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test case. See inline documentation for details about the test case added in this changeset.
Thu, 13 Apr 2017 16:22:25 +0200 obsolescence: add test utility for the "branch replacement" logic during push
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 13 Apr 2017 16:22:25 +0200] rev 31973
obsolescence: add test utility for the "branch replacement" logic during push 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. The current code for this logic is very basic (eg: issue4354) and was poorly tested. We have a better implementation coming in the evolve extension fixing these issues and with more serious tests coverage. In the process of upstreaming this improved logic, we start with adding the test case that are already passing with the current implementation. Once they are all in, we'll upstream the better implementation and the extra test case. This changeset introduce the common setup script used by these tests.
Mon, 10 Apr 2017 16:55:16 +0200 obsolescence: add test case D-4 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:55:16 +0200] rev 31972
obsolescence: add test case D-4 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce case D-4: unknown changeset in between known on Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:54:43 +0200 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:54:43 +0200] rev 31971
obsolescence: add test case D-3 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce case D3: missing prune target (prune not in "pushed set") Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:54:19 +0200 obsolescence: add test case D-2 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:54:19 +0200] rev 31970
obsolescence: add test case D-2 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce D-2: missing prune target (prune in "pushed set") Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:53:37 +0200 obsolescence: add test case D-1 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:53:37 +0200] rev 31969
obsolescence: add test case D-1 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce case D-1: Pruned changeset based on missing precursor of something not present Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:53:12 +0200 obsolescence: add test case C-4 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:53:12 +0200] rev 31968
obsolescence: add test case C-4 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce C.4: multiple successors, one is pruned Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:52:25 +0200 obsolescence: add test case C-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:52:25 +0200] rev 31967
obsolescence: add test case C-3 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce case C-3: Pruned changeset on precursors of another pruned one Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:51:06 +0200 obsolescence: add test case C-2 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:51:06 +0200] rev 31966
obsolescence: add test case C-2 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce C-2: Pruned changeset on precursors Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Mon, 10 Apr 2017 16:50:41 +0200 obsolescence: add test case C-1 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:50:41 +0200] rev 31965
obsolescence: add test case C-1 for obsolescence markers exchange About 3 years ago, in August 2014, the logic to select what markers to select on push was ported from the evolve extension to Mercurial core. However, for some unclear reasons, the tests for that logic were not ported alongside. I realised it a couple of weeks ago while working on another push related issue. I've made a clean up pass on the tests and they are now ready to integrate the core test suite. This series of changesets do not change any logic. I just adds test for logic that has been around for about 10 versions of Mercurial. They are a patch for each test case. It makes it easier to review and postpone one with documentation issues without rejecting the wholes series. This patch introduce C-1: Multiple pruned changeset atop each other Each test case comes it in own test file. It help parallelism and does not introduce a significant overhead from having a single unified giant test file. Here are timing to support this claim. # Multiple test files version: # run-tests.py --local -j 1 test-exchange-*.t 53.40s user 6.82s system 85% cpu 1:10.76 total 52.79s user 6.97s system 85% cpu 1:09.97 total 52.94s user 6.82s system 85% cpu 1:09.69 total # Single test file version: # run-tests.py --local -j 1 test-exchange-obsmarkers.t 52.97s user 6.85s system 85% cpu 1:10.10 total 52.64s user 6.79s system 85% cpu 1:09.63 total 53.70s user 7.00s system 85% cpu 1:11.17 total
Tue, 11 Apr 2017 14:54:12 -0700 stdio: add Linux-specific tests for error checking
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31964
stdio: add Linux-specific tests for error checking
Tue, 11 Apr 2017 14:54:12 -0700 stdio: raise StdioError if something goes wrong in ui.flush
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31963
stdio: raise StdioError if something goes wrong in ui.flush The prior code used to ignore all errors, which was intended to deal with a decade-old problem with writing to broken pipes on Windows. However, that code inadvertantly went a lot further, making it impossible to detect *all* I/O errors on stdio ... but only sometimes. What actually happened was that if Mercurial wrote less than a stdio buffer's worth of output (the overwhelmingly common case for most commands), any error that occurred would get swallowed here. But if the buffering strategy changed, an unhandled IOError could be raised from any number of other locations. Because we now have a top-level StdioError handler, and ui._write and ui._write_err (and now flush!) will raise that exception, we have one rational place to detect and handle these errors.
Tue, 11 Apr 2017 14:54:12 -0700 stdio: raise StdioError if something goes wrong in ui._write_err
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31962
stdio: raise StdioError if something goes wrong in ui._write_err The prior code used to ignore certain classes of error, which was not the right thing to do.
Tue, 11 Apr 2017 14:54:12 -0700 stdio: raise StdioError if something goes wrong in ui._write
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31961
stdio: raise StdioError if something goes wrong in ui._write
Tue, 11 Apr 2017 14:54:12 -0700 stdio: catch StdioError in dispatch.run and clean up appropriately
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31960
stdio: catch StdioError in dispatch.run and clean up appropriately We attempt to report what went wrong, and more importantly exit the program with an error code. (The exception we catch is not yet raised anywhere in the code.)
Tue, 11 Apr 2017 14:54:12 -0700 stdio: add machinery to identify failed stdout/stderr writes
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31959
stdio: add machinery to identify failed stdout/stderr writes Mercurial currently fails to notice failures to write to stdout or stderr. A correctly functioning command line tool should detect this and exit with an error code. To achieve this, we need a little extra plumbing, which we start adding here.
Tue, 11 Apr 2017 14:54:12 -0700 atexit: switch to home-grown implementation
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31958
atexit: switch to home-grown implementation
Tue, 11 Apr 2017 14:54:12 -0700 atexit: test failing handlers
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31957
atexit: test failing handlers
Tue, 11 Apr 2017 14:54:12 -0700 ui: add special-purpose atexit functionality
Bryan O'Sullivan <bryano@fb.com> [Tue, 11 Apr 2017 14:54:12 -0700] rev 31956
ui: add special-purpose atexit functionality In spite of its longstanding use, Python's built-in atexit code is not suitable for Mercurial's purposes, for several reasons: * Handlers run after application code has finished. * Because of this, the code that runs handlers swallows exceptions (since there's no possible stacktrace to associate errors with). If we're lucky, we'll get something spat out to stderr (if stderr still works), which of course isn't any use in a big deployment where it's important that exceptions get logged and aggregated. * Mercurial's current atexit handlers make unfortunate assumptions about process state (specifically stdio) that, coupled with the above problems, make it impossible to deal with certain categories of error (try "hg status > /dev/full" on a Linux box). * In Python 3, the atexit implementation is completely hidden, so we can't hijack the platform's atexit code to run handlers at a time of our choosing. As a result, here's a perfectly cromulent atexit-like implementation over which we have control. This lets us decide exactly when the handlers run (after each request has completed), and control what the process state is when that occurs (and afterwards).
Fri, 14 Apr 2017 08:55:18 +0200 context: follow all branches in blockdescendants()
Denis Laxalde <denis@laxalde.org> [Fri, 14 Apr 2017 08:55:18 +0200] rev 31955
context: follow all branches in blockdescendants() In the initial implementation of blockdescendants (and thus followlines(..., descend=True) revset), only the first branch encountered in descending direction was followed. Update the algorithm so that all children of a revision ('x' in code) are considered. Accordingly, we need to prevent a child revision to be yielded multiple times when it gets visited through different path, so we skip 'i' when this occurs. Finally, since we now consider all parents of a possible child touching a given line range, we take care of yielding the child if it has a diff in specified line range with at least one of its parent (same logic as blockancestors()).
Thu, 13 Apr 2017 08:27:19 -0700 pager: set some environment variables if they're not set
Jun Wu <quark@fb.com> [Thu, 13 Apr 2017 08:27:19 -0700] rev 31954
pager: set some environment variables if they're not set Git did this already [1] [2]. We want this behavior too [3]. This provides a better default user experience (like, supporting colors) if users have things like "PAGER=less" set, which is not uncommon. The environment variables are provided by a method so extensions can override them on demand. [1]: https://github.com/git/git/blob/6a5ff7acb5965718cc7016c0ab6c601454fd7cde/pager.c#L87 [2]: https://github.com/git/git/blob/6a5ff7acb5965718cc7016c0ab6c601454fd7cde/Makefile#L1545 [3]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/094780.html
Thu, 13 Apr 2017 14:48:18 -0400 sshpeer: fix docstring typo
Augie Fackler <augie@google.com> [Thu, 13 Apr 2017 14:48:18 -0400] rev 31953
sshpeer: fix docstring typo
Thu, 13 Apr 2017 13:12:49 -0400 util: pass sysstrs to warnings.filterwarnings
Augie Fackler <augie@google.com> [Thu, 13 Apr 2017 13:12:49 -0400] rev 31952
util: pass sysstrs to warnings.filterwarnings Un-breaks the Python 3 build.
Mon, 03 Apr 2017 14:21:38 +0200 vfs: deprecate all old classes in scmutil
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 03 Apr 2017 14:21:38 +0200] rev 31951
vfs: deprecate all old classes in scmutil Now that all vfs class moved to the vfs module, we can deprecate the old one.
Tue, 04 Apr 2017 11:03:29 +0200 util: add a way to issue deprecation warning without a UI object
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 04 Apr 2017 11:03:29 +0200] rev 31950
util: add a way to issue deprecation warning without a UI object Our current deprecation warning mechanism relies on ui object. They are case where we cannot have access to the UI object. On a general basis we avoid using the python mechanism for deprecation warning because up to Python 2.6 it is exposing warning to unsuspecting user who cannot do anything to deal with them. So we build a "safe" strategy to hide this warnings behind a flag in an environment variable. The test runner set this flag so that tests show these warning. This will help us marker API as deprecated for extensions to update their code.
Thu, 13 Apr 2017 09:49:48 +0200 gitweb: plug followlines UI in filerevision view
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 13 Apr 2017 09:49:48 +0200] rev 31949
gitweb: plug followlines UI in filerevision view Mostly copy CSS rules from style-paper.css into style-gitweb.css. The only modification is addition of !important on "background-color" rule for "pre.sourcelines > span.followlines-selected" selector as the background color is otherwise overriden by "pre.sourcelines.stripes > :nth-child(4n+4)" rule.
Thu, 13 Apr 2017 10:04:09 +0200 gitweb: handle "patch" query parameter in filelog view
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 13 Apr 2017 10:04:09 +0200] rev 31948
gitweb: handle "patch" query parameter in filelog view As for paper style, in f36dc643ffdc, we display "diff" data as an additional row in the table of revision entries for the gitweb template. Also, as these additional diff rows have a white background, they may be confused with log entry rows ("age", "author", "description", "links") of even parity (parity0 also have a white background). So we disable parity colors for log entry rows when diff is displayed and fix the color to the "dark" parity (i.e. parity1 #f6f6f0) so that it's always distinguishable from
Thu, 13 Apr 2017 09:59:58 +0200 gitweb: add information about "linerange" filtering in filelog view
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 13 Apr 2017 09:59:58 +0200] rev 31947
gitweb: add information about "linerange" filtering in filelog view As for paper style, in 5e6d44511317, we display a "(following lines <fromline>:<toline> <a href='...'>back to filelog</a>)" message alongside the file name when "linerange" query parameter is present.
Mon, 10 Apr 2017 18:16:30 +0200 util: fix human-readable printing of negative byte counts
Gábor Stefanik <gabor.stefanik@nng.com> [Mon, 10 Apr 2017 18:16:30 +0200] rev 31946
util: fix human-readable printing of negative byte counts Apply the same human-readable printing rules to negative byte counts as to positive ones. Fixes output of debugupgraderepo.
Thu, 13 Apr 2017 03:17:53 -0700 show: make template option actually show up in help
Ryan McElroy <rmcelroy@fb.com> [Thu, 13 Apr 2017 03:17:53 -0700] rev 31945
show: make template option actually show up in help Previously, the --template/-T option didn't show up in help because it's marked as experimental. It's not really experimental for show, and its quite important for show's funcationality, so let's make sure it always shows up.
Wed, 12 Apr 2017 20:31:15 -0700 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 12 Apr 2017 20:31:15 -0700] rev 31944
show: implement underway view This is the beginning of a wip/smartlog view. It is basically a manually constructed (read: fast) revset function to collect "relevant" changesets combined with a custom template and a graph displayer. It obviously needs a lot of work. I'd like to get *something* usable in 4.2 so `hg show` has some value to end-users. Let the bikeshedding begin.
Wed, 12 Apr 2017 20:28:44 -0700 show: fix formatting of multiple commands
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 12 Apr 2017 20:28:44 -0700] rev 31943
show: fix formatting of multiple commands Because we're formatting to RST, short lines wrap and there needs to be an extra line break between paragraphs to prevent that. In addition, the indentation in the old code was a bit off. Refactor the code to a function (so we don't leak variables outside the module) and modify it so it renders more correctly.
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip