Mon, 16 Jan 2017 09:24:47 +0100 revset: add a 'descend' argument to followlines to return descendants
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 16 Jan 2017 09:24:47 +0100] rev 31938
revset: add a 'descend' argument to followlines to return descendants This is useful to follow changes in a block of lines forward in the history (for instance, when one wants to find out how a function evolved from a point in history). We added a 'descend' parameter to followlines(), which defaults to False. If True, followlines() returns descendants of startrev. Because context.blockdescendants() does not follow renames, these are not followed by the revset either, so history will end when a rename occurs (as can be seen in tests).
Mon, 10 Apr 2017 15:11:36 +0200 context: add a blockdescendants function
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 10 Apr 2017 15:11:36 +0200] rev 31937
context: add a blockdescendants function This is symmetrical with blockancestors() and yields descendants of a filectx with changes in the given line range. The noticeable difference is that the algorithm does not follow renames (probably because filelog.descendants() does not), so we are missing branches with renames.
Thu, 09 Mar 2017 22:40:52 -0800 url: support auth.cookiesfile for adding cookies to HTTP requests
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 22:40:52 -0800] rev 31936
url: support auth.cookiesfile for adding cookies to HTTP requests Mercurial can't currently send cookies as part of HTTP requests. Some authentication systems use cookies. So, it seems like adding support for sending cookies seems like a useful feature. This patch implements support for reading cookies from a file and automatically sending them as part of the request. We rely on the "cookiejar" Python module to do the heavy lifting of parsing cookies files. We currently only support the Mozilla (really Netscape-era) cookie format. There is another format supported by cookielib and we may want to consider using that, especially since the Netscape cookie parser can't parse ports. It wasn't immediately obvious to me what the format of the other parser is, so I didn't know how to test it. I /think/ it might be literal "Cookie" header values, but I'm not sure. If it is more robust than the Netscape format, we may want to just support it.
Thu, 09 Mar 2017 22:35:10 -0800 httpconnection: allow a global auth.cookiefile config entry
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 22:35:10 -0800] rev 31935
httpconnection: allow a global auth.cookiefile config entry This foreshadows support for defining a cookies file.
Thu, 09 Mar 2017 21:35:21 -0800 util: make cookielib module available
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 21:35:21 -0800] rev 31934
util: make cookielib module available In preparation for supporting sending cookies on HTTP requests.
Thu, 06 Apr 2017 11:28:25 +0200 crecord: avoid setting non-existing SIGTSTP signal on windows (issue5512)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 06 Apr 2017 11:28:25 +0200] rev 31933
crecord: avoid setting non-existing SIGTSTP signal on windows (issue5512) Windows do not have a SIGTSTP so we avoid setting the handler if the signal is unknown.
Thu, 06 Apr 2017 11:25:13 +0200 crecord: ensure we reinstall the SIGTSTP handler
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 06 Apr 2017 11:25:13 +0200] rev 31932
crecord: ensure we reinstall the SIGTSTP handler Previous, exceptions would prevent the reinstallation of the signal.
Thu, 06 Apr 2017 11:25:33 +0200 crecord: avoid setting non-existing signal SIGWINCH on windows
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 06 Apr 2017 11:25:33 +0200] rev 31931
crecord: avoid setting non-existing signal SIGWINCH on windows Windows do not have a SIGWINCH so we avoid setting the handler if the signal is unknown.
Sun, 26 Mar 2017 15:06:09 +0200 crecord: ensure we reinstall the SIGWINCH handler
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 26 Mar 2017 15:06:09 +0200] rev 31930
crecord: ensure we reinstall the SIGWINCH handler Previous, exception in _main(...) would prevent the reinstallation of the signal.
Sun, 26 Mar 2017 15:05:12 +0200 crecord: extract most of 'main' into a sub function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 26 Mar 2017 15:05:12 +0200] rev 31929
crecord: extract most of 'main' into a sub function There are some setup and cleanup necessary around the main code, that setup/cleanup code needs multiple adjustments so we extract the core code into its own function first for clarity.
Mon, 03 Apr 2017 23:13:49 +0900 templater: add shorthand for building a dict like {"key": key}
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 23:13:49 +0900] rev 31928
templater: add shorthand for building a dict like {"key": key} Like field init shorthand of Rust. This is convenient for building a JSON object from selected keywords. This means dict() won't support Python-like dict(iterable) syntax because it's ambiguous. Perhaps it could be implemented as 'mapdict(xs % (k, v))'.
Sat, 08 Apr 2017 23:33:32 +0900 templater: find keyword name more thoroughly on filtering error
Yuya Nishihara <yuya@tcha.org> [Sat, 08 Apr 2017 23:33:32 +0900] rev 31927
templater: find keyword name more thoroughly on filtering error Before, it could spill an internal representation of compiled template such as [(<function runsymbol at 0x....>, 'extras'), ...]. Show less cryptic message if no symbol found. New findsymbolicname() function will be also used by dict() constructor.
Mon, 03 Apr 2017 22:54:06 +0900 templater: add dict() constructor
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 22:54:06 +0900] rev 31926
templater: add dict() constructor It's troublesome to build JSON by template, so let's add programmatic way.
Wed, 05 Apr 2017 22:28:09 +0900 templatekw: add public function to wrap a dict by _hybrid object
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Apr 2017 22:28:09 +0900] rev 31925
templatekw: add public function to wrap a dict by _hybrid object
Wed, 05 Apr 2017 22:25:36 +0900 templatekw: add public function to wrap a list by _hybrid object
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Apr 2017 22:25:36 +0900] rev 31924
templatekw: add public function to wrap a list by _hybrid object
Wed, 12 Apr 2017 21:10:47 +0900 templatekw: add default implementation of _hybrid.gen
Yuya Nishihara <yuya@tcha.org> [Wed, 12 Apr 2017 21:10:47 +0900] rev 31923
templatekw: add default implementation of _hybrid.gen This is convenient for new template keyword, which doesn't need to support the legacy list hack (provided by _showlist()), but still wants to have a string representation.
Sun, 09 Apr 2017 11:58:27 +0900 parser: preserve order of keyword arguments
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Apr 2017 11:58:27 +0900] rev 31922
parser: preserve order of keyword arguments This helps building dict(key1=value1, ...) in deterministic way.
Mon, 03 Apr 2017 22:07:09 +0900 parser: extend buildargsdict() to support arbitrary number of **kwargs
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 22:07:09 +0900] rev 31921
parser: extend buildargsdict() to support arbitrary number of **kwargs Prepares for adding dict(key1=value1, ...) template function. More tests will be added later.
Sat, 08 Apr 2017 20:07:37 +0900 parser: verify excessive number of args excluding kwargs in buildargsdict()
Yuya Nishihara <yuya@tcha.org> [Sat, 08 Apr 2017 20:07:37 +0900] rev 31920
parser: verify excessive number of args excluding kwargs in buildargsdict() This makes the next patch slightly simpler. We don't need to check the excessive number of keyword arguments since unknown and duplicated kwargs are rejected.
Mon, 10 Apr 2017 16:50:23 +0200 obsolescence: add test case B-7 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:50:23 +0200] rev 31919
obsolescence: add test case B-7 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 B-7: Prune above non-targeted common changeset 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:49:38 +0200 obsolescence: add test case B-6 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:49:38 +0200] rev 31918
obsolescence: add test case B-6 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 B6: Pruned changeset with precursors 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:49:10 +0200 obsolescence: add test case B-5 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:49:10 +0200] rev 31917
obsolescence: add test case B-5 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 B-5: Push of a children of changeset which successors 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:47:16 +0200 obsolescence: add test case B-4 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:47:16 +0200] rev 31916
obsolescence: add test case B-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 B4: Pruned changeset on common part of history 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:46:53 +0200 obsolescence: add test case B-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:46:53 +0200] rev 31915
obsolescence: add test case B-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 B3: Pruned changeset on non-pushed part of the history 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:46:31 +0200 obsolescence: add test case B-2 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:46:31 +0200] rev 31914
obsolescence: add test case B-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 case B-2: Prune on targeted common changeset 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:46:03 +0200 obsolescence: add test case B-1 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:46:03 +0200] rev 31913
obsolescence: add test case B-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 B-1: Prune on non-targeted common changeset 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:44:39 +0200 obsolescence: add test case A-7 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:44:39 +0200] rev 31912
obsolescence: add test case A-7 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 A-7: non targeted common changeset 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:44:19 +0200 obsolescence: add test case A-6 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:44:19 +0200] rev 31911
obsolescence: add test case A-6 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 A6: new markers between changesets already known on both side 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:43:49 +0200 obsolescence: add test case A-5 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:43:49 +0200] rev 31910
obsolescence: add test case A-5 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 A-5: partial reordering 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:43:26 +0200 obsolescence: add test case A-4 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:43:26 +0200] rev 31909
obsolescence: add test case A-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 A-4: Push in the middle of the obsolescence chain 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:42:49 +0200 obsolescence: add test case A-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:42:49 +0200] rev 31908
obsolescence: add test case A-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 A3: new branchs created, one pushed 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:41:46 +0200 obsolescence: add test case A-2 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:41:46 +0200] rev 31907
obsolescence: add test case A-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 case A-2: Two heads, only one of them pushed 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:41:21 +0200 obsolescence: add test case A-1 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:41:21 +0200] rev 31906
obsolescence: add test case A-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 A-1: pushing a single head 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:40:40 +0200 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 16:40:40 +0200] rev 31905
obsolescence: add setup script for obsolescence markers exchange tests 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 the common script that setup the basic environment for the test cases. Once this script is in. We can accept the other patches in any order. 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 00:03:11 +0200 upgrade: simplify the "origin" dispatch in dry run
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 11 Apr 2017 00:03:11 +0200] rev 31904
upgrade: simplify the "origin" dispatch in dry run We could compute the final set we need directly.
Mon, 10 Apr 2017 23:11:45 +0200 upgrade: use 'improvement' object for action too
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 23:11:45 +0200] rev 31903
upgrade: use 'improvement' object for action too This simplify multiple pieces of code. For now we restrict this upgrade to the top level function to keep this patch simple.
Mon, 10 Apr 2017 23:10:03 +0200 upgrade: implement equality for 'improvement' object
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 23:10:03 +0200] rev 31902
upgrade: implement equality for 'improvement' object Through the code, we use a mix of 'improvement' object and string. Having a single type would be simpler. For this we need the object to be comparable.
Mon, 10 Apr 2017 22:15:17 +0200 upgrade: simplify some of the initial dispatch for dry run
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 22:15:17 +0200] rev 31901
upgrade: simplify some of the initial dispatch for dry run Since we already have the list of deficiencies, we can use it directly.
Fri, 07 Apr 2017 18:39:27 +0200 upgrade: simplify 'determineactions'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 07 Apr 2017 18:39:27 +0200] rev 31900
upgrade: simplify 'determineactions' Since we only takes 'deficiencies', we can simplify the function and clarify its arguments.
Tue, 11 Apr 2017 23:46:16 +0200 upgrade: filter optimizations outside of 'determineactions'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 11 Apr 2017 23:46:16 +0200] rev 31899
upgrade: filter optimizations outside of 'determineactions' This sounds like higher level logic to process arguments. Moving it out of 'determineactions' will allow passing only deficiencies to the function. Then, in a future changeset, we will remove dispatch on "improvement type" within the function. See next changeset for details.
Fri, 07 Apr 2017 18:46:27 +0200 upgrade: directly iterate over optimisations
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 07 Apr 2017 18:46:27 +0200] rev 31898
upgrade: directly iterate over optimisations Since we already have the list of optimisations independent from the deficiencies, we can use it directly. (we make a dual assignement in this changeset to simplify the next one)
Mon, 10 Apr 2017 21:01:06 +0200 upgrade: simplify optimisations validation
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 21:01:06 +0200] rev 31897
upgrade: simplify optimisations validation Since we fetch optimizations distinctly from the deficiencies, we can simplify some code.
Mon, 10 Apr 2017 21:00:52 +0200 upgrade: split finding deficiencies from finding optimisations
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 21:00:52 +0200] rev 31896
upgrade: split finding deficiencies from finding optimisations Our ultimate goal is to make it easier to get a diagnostic of the repository format. A first important and step for that is to separate part related to repository format from the optimisation. We start by having two different functions returning the two categories of possible "improvement".
Tue, 11 Apr 2017 22:07:40 +0200 upgrade: update the copyright statement
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 11 Apr 2017 22:07:40 +0200] rev 31895
upgrade: update the copyright statement
Tue, 11 Apr 2017 22:07:15 +0200 upgrade: update the header comment
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 11 Apr 2017 22:07:15 +0200] rev 31894
upgrade: update the header comment
Tue, 11 Apr 2017 22:01:13 +0200 upgrade: import 'localrepo' globally
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 11 Apr 2017 22:01:13 +0200] rev 31893
upgrade: import 'localrepo' globally The in-function imports mention a cycle that seems to no longer be relevant. As a result, we just import it globally.
Tue, 11 Apr 2017 20:54:50 -0400 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com> [Tue, 11 Apr 2017 20:54:50 -0400] rev 31892
largefiles: set the extension as enabled locally after a share requiring it This has been done for clone since e1dbe0b215ae, so it makes sense here for the same reasons.
Tue, 11 Apr 2017 21:38:11 -0400 windows: add context manager support to mixedfilemodewrapper
Matt Harbison <matt_harbison@yahoo.com> [Tue, 11 Apr 2017 21:38:11 -0400] rev 31891
windows: add context manager support to mixedfilemodewrapper I stumbled into this in the next patch. The difference between getting a context manager capable object or not from vfs classes was as subtle as adding a '+' to the file mode.
Tue, 11 Apr 2017 18:31:40 -0700 chg: always wait for pager
Jun Wu <quark@fb.com> [Tue, 11 Apr 2017 18:31:40 -0700] rev 31890
chg: always wait for pager Previously, when runcommand raises, chg aborts with, and does not wait for pager. The call stack is like: hgc_runcommand -> handleresponse -> readchannel -> debugmsg("failed to read channel") -> exit(255) That means, chg returns to the shell, then both the pager and the shell will read from the terminal at the same time, causing problems. This patch fixes that by using "atexit" to register the pager cleanup function so chg will always wait for pager even if runcommand raises.
Sun, 09 Apr 2017 19:09:07 +0200 bundle2: move 'seek' and 'tell' methods off the unpackermixin class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 19:09:07 +0200] rev 31889
bundle2: move 'seek' and 'tell' methods off the unpackermixin class These methods are unrelated to unpacking. They are used internally by the 'unbundlepart' class only. So me move them there as private methods. In the same go, we clarify their internal role in the their docstring.
Mon, 10 Apr 2017 15:32:09 -0700 shelve: rename nodestoprune to nodestoremove
Kostia Balytskyi <ikostia@fb.com> [Mon, 10 Apr 2017 15:32:09 -0700] rev 31888
shelve: rename nodestoprune to nodestoremove As per feedback from the community.
Mon, 03 Apr 2017 22:23:52 +0900 templater: port pad() to take keyword arguments
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 22:23:52 +0900] rev 31887
templater: port pad() to take keyword arguments This is another example where keyword arguments can be actually useful.
Mon, 03 Apr 2017 21:22:39 +0900 templater: add support for keyword arguments
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 21:22:39 +0900] rev 31886
templater: add support for keyword arguments Unlike revset, function arguments are pre-processed in templater. That's why we need to define argspec per function. An argspec field looks somewhat redundant in @templatefunc definition as a name field contains human-readable list of arguments. I'll make function doc be built from argspec later. Ported separate() function as an example.
Mon, 03 Apr 2017 20:55:55 +0900 templater: add parsing rule for key-value pair
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 20:55:55 +0900] rev 31885
templater: add parsing rule for key-value pair Based on the revset implementation, 70a2082f855a. This patch also adjusts the test as '=' is now a valid token.
Mon, 03 Apr 2017 20:44:05 +0900 templater: adjust binding strengths to make room for key-value operator
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 20:44:05 +0900] rev 31884
templater: adjust binding strengths to make room for key-value operator Changed as follows: - template ops (%, |): +10 - arithmetic ops: +1 (but "negate" should be greater than "%")
Mon, 03 Apr 2017 20:37:25 +0900 templater: sort token table by binding strength
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Apr 2017 20:37:25 +0900] rev 31883
templater: sort token table by binding strength Just for readability.
Tue, 04 Apr 2017 22:31:59 +0900 templater: make _hybrid provide more list/dict-like methods
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:31:59 +0900] rev 31882
templater: make _hybrid provide more list/dict-like methods So the JSON filter works.
Tue, 04 Apr 2017 22:20:06 +0900 templater: hide private variable of _hybrid
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:20:06 +0900] rev 31881
templater: hide private variable of _hybrid
Tue, 04 Apr 2017 22:19:02 +0900 templater: remove __iter__() from _hybrid, resolve it explicitly
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Apr 2017 22:19:02 +0900] rev 31880
templater: remove __iter__() from _hybrid, resolve it explicitly The goal is to fix "{hybrid_obj|json}" output. A _hybrid object must act as a list or a dict as well as a generator of legacy template strings. Before, _hybrid.__iter__() was assigned for legacy template, which conflicted with list.__iter__() API. This patch drops _hybrid.__iter__() and makes stringify/flatten functions unwrap a generator instead.
Sun, 24 Apr 2016 19:15:34 +0900 templater: rewrite doc of _hybrid class as docstring
Yuya Nishihara <yuya@tcha.org> [Sun, 24 Apr 2016 19:15:34 +0900] rev 31879
templater: rewrite doc of _hybrid class as docstring
Sun, 09 Apr 2017 11:57:09 +0900 sortdict: fix .pop() to return a value
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Apr 2017 11:57:09 +0900] rev 31878
sortdict: fix .pop() to return a value My future patch will need it.
Mon, 10 Apr 2017 17:05:54 +0200 checkcode: only match pushd/popd as word
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:05:54 +0200] rev 31877
checkcode: only match pushd/popd as word otherwise it partially match common words like "pushdestination".
Mon, 10 Apr 2017 13:07:47 -0700 treemanifest: add walksubtrees api
Durham Goode <durham@fb.com> [Mon, 10 Apr 2017 13:07:47 -0700] rev 31876
treemanifest: add walksubtrees api Adds a new function to treemanifest that allows walking over the directories in the tree. Currently it only accepts a matcher to prune the walk, but in the future it will also accept a list of trees and will only walk over subtrees that differ from the versions in the list. This will be useful for identifying what parts of the tree are new to this revision, which is useful when deciding the minimal set of trees to send to a client given that they have a certain tree already. Since this is intended for an extension to use, the only current consumer is a test. In the future this function may be useful for implementing other algorithms like diff and changegroup generation.
Tue, 11 Apr 2017 23:12:14 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Tue, 11 Apr 2017 23:12:14 +0900] rev 31875
merge with stable
Mon, 10 Apr 2017 18:06:22 +0200 upgrade: drop the prefix to the '_finishdatamigration' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:06:22 +0200] rev 31874
upgrade: drop the prefix to the '_finishdatamigration' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:06:12 +0200 upgrade: drop the prefix to the '_filterstorefile' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:06:12 +0200] rev 31873
upgrade: drop the prefix to the '_filterstorefile' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:05:57 +0200 upgrade: drop the prefix to the 'determineactions' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:05:57 +0200] rev 31872
upgrade: drop the prefix to the 'determineactions' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:05:42 +0200 upgrade: drop the prefix to the 'findimprovements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:05:42 +0200] rev 31871
upgrade: drop the prefix to the 'findimprovements' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:04:50 +0200 upgrade: drop the prefix to the 'supporteddestrequirements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:04:50 +0200] rev 31870
upgrade: drop the prefix to the 'supporteddestrequirements' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:03:11 +0200 upgrade: drop the prefix to the 'allowednewrequirements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:03:11 +0200] rev 31869
upgrade: drop the prefix to the 'allowednewrequirements' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:01:29 +0200 upgrade: drop the prefix to the 'improvement' class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:01:29 +0200] rev 31868
upgrade: drop the prefix to the 'improvement' class Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 18:00:27 +0200 upgrade: drop the prefix to the 'supportremovedrequirements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 18:00:27 +0200] rev 31867
upgrade: drop the prefix to the 'supportremovedrequirements' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 17:56:29 +0200 upgrade: drop the prefix to the 'blocksourcerequirements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:56:29 +0200] rev 31866
upgrade: drop the prefix to the 'blocksourcerequirements' function Now that we are in the 'upgrade' module we can simplify the name.
Mon, 10 Apr 2017 17:55:47 +0200 upgrade: drop the prefix to the 'requiredsourcerequirements' function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 10 Apr 2017 17:55:47 +0200] rev 31865
upgrade: drop the prefix to the 'requiredsourcerequirements' function Now that we are in the 'upgrade' module we can simplify the name.
Fri, 07 Apr 2017 18:53:17 +0200 upgrade: extract code in its own module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 07 Apr 2017 18:53:17 +0200] rev 31864
upgrade: extract code in its own module Given about 2/3 or 'mercurial.repair' is now about repository upgrade, I think it is fair to move it into its own module. An expected benefit is the ability to drop the 'upgrade' prefix of many functions. This will be done in coming changesets.
Sun, 09 Apr 2017 19:08:24 +0200 bundle2: move the 'close' method off the unpackermixin
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 19:08:24 +0200] rev 31863
bundle2: move the 'close' method off the unpackermixin This method is unrelated to unpacking and only used by the unbundle20 class. We move it there for clarity.
Sun, 09 Apr 2017 18:12:54 +0200 bundle2: clarify the docstring of unpackermixin methods
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 18:12:54 +0200] rev 31862
bundle2: clarify the docstring of unpackermixin methods The unpackermixin is a utility used to implement the bundle2 protocol. It should not be used when writing part handlers. We update the docstring to clarify this.
Sun, 09 Apr 2017 18:16:09 +0200 bundle2: add documention to 'part.addparams'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 09 Apr 2017 18:16:09 +0200] rev 31861
bundle2: add documention to 'part.addparams' There are some non-obvious limitations on the parameters of this method. Add some documentation where people will likely look to understand how to use this API.
Mon, 10 Apr 2017 21:12:54 -0400 test-patchbomb: disable sendmail tests on Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 10 Apr 2017 21:12:54 -0400] rev 31860
test-patchbomb: disable sendmail tests on Windows These tests were failing, and there isn't a trivial way to execute a script on Windows [1]. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096497.html
Fri, 07 Apr 2017 10:46:32 -0700 show: fix corrupt json output with no bookmarks
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 10:46:32 -0700] rev 31859
show: fix corrupt json output with no bookmarks
Fri, 07 Apr 2017 10:26:13 -0700 show: tweak plain abort language for clarity
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 10:26:13 -0700] rev 31858
show: tweak plain abort language for clarity
Sun, 09 Apr 2017 22:19:27 -0400 tests: print Unix style paths in *.py tests
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Apr 2017 22:19:27 -0400] rev 31857
tests: print Unix style paths in *.py tests These tests don't support (glob). I didn't audit all tests, but these ones were failing.
Sun, 09 Apr 2017 12:53:31 -0700 revlog: make "size" diverge from "rawsize"
Jun Wu <quark@fb.com> [Sun, 09 Apr 2017 12:53:31 -0700] rev 31856
revlog: make "size" diverge from "rawsize" Previously, revlog.size equals to revlog.rawsize. However, the flag processor framework could make a difference - "size" could mean the length of len(revision(raw=False)), while "rawsize" means len(revision(raw=True)). This patch makes it so. This corrects "hg status" output when flag processor is involved. The call stack looks like: basectx.status -> workingctx._buildstatus -> workingctx._dirstatestatus -> workingctx._checklookup -> filectx.cmp -> filelog.cmp -> filelog.size -> revlog.size
Fri, 07 Apr 2017 10:56:53 -0700 test-flagprocessor: add a case about hg status
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 10:56:53 -0700] rev 31855
test-flagprocessor: add a case about hg status This shows how "hg status" is wrong - nothing changed but the file is labeled as "M".
Sat, 08 Apr 2017 15:06:45 -0400 test-http-proxy: add the Windows variant of "connection refused"
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 15:06:45 -0400] rev 31854
test-http-proxy: add the Windows variant of "connection refused" The full error is "No connection could be made because the target machine actively refused it".
Sat, 08 Apr 2017 15:01:49 -0400 test-fileset: eliminate a duplicate test that was conditionalized for output
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 15:01:49 -0400] rev 31853
test-fileset: eliminate a duplicate test that was conditionalized for output
Sat, 08 Apr 2017 14:55:44 -0400 test-fileset: glob away hash differences
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 14:55:44 -0400] rev 31852
test-fileset: glob away hash differences There are various files committed above that can't be used on Windows because of the name, or being a symlink.
Sat, 08 Apr 2017 14:46:39 -0400 test-bundle: glob away a URL protocol separator
Matt Harbison <matt_harbison@yahoo.com> [Sat, 08 Apr 2017 14:46:39 -0400] rev 31851
test-bundle: glob away a URL protocol separator MSYS thinks the ':' is a Unix path separator, and replaces it with ';'.
Sun, 09 Apr 2017 00:10:54 -0400 templatekw: clarify the result of {latesttag} when no tag exists
Matt Harbison <matt_harbison@yahoo.com> [Sun, 09 Apr 2017 00:10:54 -0400] rev 31850
templatekw: clarify the result of {latesttag} when no tag exists My initial expectation was that the list would be empty, and therefore detectable with {if()}. The map for {latesttag()} is populated with real values in this case (except {tag}), so it probably doesn't make any sense to change this to an empty list.
Thu, 06 Apr 2017 19:24:04 +0200 hgweb: position the "followlines" box close to latest cursor position
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Apr 2017 19:24:04 +0200] rev 31849
hgweb: position the "followlines" box close to latest cursor position
Thu, 06 Apr 2017 19:15:09 +0200 hgweb: add a floating tooltip to invite on followlines action
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 06 Apr 2017 19:15:09 +0200] rev 31848
hgweb: add a floating tooltip to invite on followlines action In followlines.js, we create a <div id="followlines-tooltip"> element to draw attention of users on "followlines" feature. The element shows up on hover of source lines after one second and follows the cursor. After first click (start line selection), the text changes and indicates that next click will terminate selection.
Sat, 08 Apr 2017 14:33:20 -0700 zstd: vendor python-zstandard 0.8.1
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 14:33:20 -0700] rev 31847
zstd: vendor python-zstandard 0.8.1 This contains a fix for compilation on BSDs. #no-check-commit
Wed, 08 Mar 2017 09:03:42 -0500 fsmonitor: match watchman and filesystem encoding
Olivier Trempe <oliviertrempe@gmail.com> [Wed, 08 Mar 2017 09:03:42 -0500] rev 31846
fsmonitor: match watchman and filesystem encoding watchman's paths encoding can differ from filesystem encoding. For example, on Windows, it's always utf-8. Before this patch, on Windows, mismatch in path comparison between fsmonitor state and osutil.statfiles would yield a clean status for added/modified files. In addition to status reporting wrong results, this leads to files being discarded from changesets while doing history editing operations such as rebase. Benchmark: There is a little overhead at module import: python -m timeit "import hgext.fsmonitor" Windows before patch: 1000000 loops, best of 3: 0.563 usec per loop Windows after patch: 1000000 loops, best of 3: 0.583 usec per loop Linx before patch: 1000000 loops, best of 3: 0.579 usec per loop Linux after patch: 1000000 loops, best of 3: 0.588 usec per loop 10000 calls to _watchmantofsencoding: python -m timeit -s "from hgext.fsmonitor import _watchmantofsencoding, _fixencoding" "fname = '/path/to/file'" "for i in range(10000):" " if _fixencoding: fname = _watchmantofsencoding(fname)" Windows (_fixencoding is True): 100 loops, best of 3: 19.5 msec per loop Linux (_fixencoding is False): 100 loops, best of 3: 3.08 msec per loop
Fri, 07 Apr 2017 06:31:50 -0700 pull: abort pull --update if config requires destination (issue5528)
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 06:31:50 -0700] rev 31845
pull: abort pull --update if config requires destination (issue5528)
Fri, 07 Apr 2017 05:41:03 -0700 tests: move update requiredest test to own test file
Ryan McElroy <rmcelroy@fb.com> [Fri, 07 Apr 2017 05:41:03 -0700] rev 31844
tests: move update requiredest test to own test file More tests for this flag are coming in upcoming patches.
Fri, 07 Apr 2017 23:35:51 +0530 py3: add pycompat.unicode and add it to importer
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 23:35:51 +0530] rev 31843
py3: add pycompat.unicode and add it to importer On python 3, builtins.unicode does not exist.
Fri, 07 Apr 2017 16:00:44 +0530 py3: add a bytes version of urllib.parse.urlencode() to pycompat.py
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 16:00:44 +0530] rev 31842
py3: add a bytes version of urllib.parse.urlencode() to pycompat.py urllib.parse.urlencode() returns unicodes on Python 3. This commit adds a method which will take its output and encode it to bytes so that we can use bytes consistently.
Fri, 07 Apr 2017 13:46:35 +0530 py3: replace str() with bytes()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 13:46:35 +0530] rev 31841
py3: replace str() with bytes()
Fri, 07 Apr 2017 11:02:43 -0700 metadataonlyctx: replace "changeset()[0]" to "manifestnode()"
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 11:02:43 -0700] rev 31840
metadataonlyctx: replace "changeset()[0]" to "manifestnode()" As Yuya pointed out [1], "changeset()[0]" could be simplified to "manifestnode()". I didn't notice that method earlier. It should definitely be used - it's easier to read, and faster. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095716.html
Fri, 07 Apr 2017 11:09:54 -0700 test-check-pylint: match its output
Jun Wu <quark@fb.com> [Fri, 07 Apr 2017 11:09:54 -0700] rev 31839
test-check-pylint: match its output "pylint --version" shows: pylint 2.0.0, astroid 1.5.0 Python 2.7.13 (default, Dec 21 2016, 07:16:46) [GCC 6.2.1 20160830] I got "Your code has been rated at 10.00/10" every time and didn't know how to turn it off. Therefore the fix.
Thu, 06 Apr 2017 19:01:51 -0700 test-flagprocessor: remove unnecessary greps
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 19:01:51 -0700] rev 31838
test-flagprocessor: remove unnecessary greps The "2>&1 | egrep ..." code is used for removing uninteresting parts from tracebacks. Now the test does not dump tracebacks, they can be removed.
Mon, 03 Apr 2017 09:31:39 -0700 bundlerepo: use raw revision in revdiff()
Jun Wu <quark@fb.com> [Mon, 03 Apr 2017 09:31:39 -0700] rev 31837
bundlerepo: use raw revision in revdiff() This is similar to "revlog: use raw revisions in revdiff". revdiff() generates raw text used in revlog directly. This makes test-flagprocessor.t happy.
Thu, 06 Apr 2017 17:45:47 -0700 bundlerepo: fix raw handling in revision()
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:45:47 -0700] rev 31836
bundlerepo: fix raw handling in revision() Similar to fixes in revlog.py, this patch uses "rawtext" to explicitly label contents expected to be raw, and makes sure content stored in _cache is raw text. Now test-flagprocessor.t points us to another issue.
Thu, 06 Apr 2017 18:06:42 -0700 bundlerepo: build revlog index with flags
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 18:06:42 -0700] rev 31835
bundlerepo: build revlog index with flags This fixes bundlerevlog.flags(rev) for any revisions provided by the bundle. Now test-flagprocessor.t points us to another issue.
Thu, 06 Apr 2017 17:43:29 -0700 bundlerepo: make baserevision return raw text
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:43:29 -0700] rev 31834
bundlerepo: make baserevision return raw text "baserevision" returns the text that will be used to apply deltas. Since deltas are against raw texts, "baserevision" should return raw text. Now test-flagprocessor.t points us to a new error.
Thu, 06 Apr 2017 17:24:36 -0700 test-flagprocessor: add tests about bundlerepo
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:24:36 -0700] rev 31833
test-flagprocessor: add tests about bundlerepo This shows flag processor is broken with a bundle repo. The test creates non-liner history to exercise code path where the deltaparent cannot be reused.
Thu, 06 Apr 2017 17:23:20 -0700 test-flagprocessor: use changegroup3 in bundle2
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:23:20 -0700] rev 31832
test-flagprocessor: use changegroup3 in bundle2 This will force "hg bundle" to use changegroup3 in the test. It is important since only changegroup3 preserves revlog flags.
Thu, 06 Apr 2017 17:01:58 -0700 bundle: allow bundle command to use changegroup3 in tests
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 17:01:58 -0700] rev 31831
bundle: allow bundle command to use changegroup3 in tests Since bundle2 writes changegroup version, we can just reuse the bundle2 format for changegroup3. This won't enable the bundle command to write changegroup3 in the wild, since exchange.parsebundlespec only returns changegroup2. It unlocks tests to override exchange.parsebundlespec and get "hg bundle" write changegroup3.
Wed, 05 Apr 2017 23:44:22 -0400 tests: add per-line output conditionals for Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 23:44:22 -0400] rev 31830
tests: add per-line output conditionals for Windows
Wed, 05 Apr 2017 23:17:27 -0400 run-tests: support per-line conditional output in tests
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 23:17:27 -0400] rev 31829
run-tests: support per-line conditional output in tests Duplicating entire tests just because the output is different is both error prone and can make the tests harder to read. This harnesses the existing '(?)' infrastructure, both to improve readability, and because it seemed like the path of least resistance. The form is: $ test_cmd output (hghave-feature !) # required if hghave.has_feature(), else optional out2 (no-hghave-feature2 !) # req if not hghave.has_feature2(), else optional I originally extended the '(?)' syntax. For example, this: 2 r4/.hg/cache/checkisexec (execbit ?) pretty naturally reads as "checkisexec, if execbit". In some ways though, this inverts the meaning of '?'. For '(?)', the line is purely optional. In the example, it is mandatory iff execbit. Otherwise, it is carried forward as optional, to preserve the test output. I tried it the other way, (listing 'no-exec' in the example), but that is too confusing to read. Kostia suggested using '!', and that seems fine.
Wed, 05 Apr 2017 22:59:44 -0400 test-run-tests: pad the failure test to preserve the run order
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 22:59:44 -0400] rev 31828
test-run-tests: pad the failure test to preserve the run order Test size seems to dictate the order in which the tests are run, and the next patch will add to test-success.t. Similar to c0cecc153d25.
Wed, 05 Apr 2017 22:00:33 -0400 run-tests: prevent a (glob) declaration from reordering (?) lines
Matt Harbison <matt_harbison@yahoo.com> [Wed, 05 Apr 2017 22:00:33 -0400] rev 31827
run-tests: prevent a (glob) declaration from reordering (?) lines Previously, if a series of optional output lines marked with '(?)' had a (glob) in one of the first lines, the output would be reordered such that it came last if none of the lines were output. The (re) declaration wasn't affected, which was helpful in figuring this out. There were no tests for '(re) (?)' so add that to make sure everything plays nice.
Fri, 07 Apr 2017 13:45:33 +0530 py3: use pycompat.byteskwargs() to convert opts to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 07 Apr 2017 13:45:33 +0530] rev 31826
py3: use pycompat.byteskwargs() to convert opts to bytes We have converted opts to unicodes before passing them.
Thu, 06 Apr 2017 22:10:46 -0700 test-check-code: do not use xargs
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 22:10:46 -0700] rev 31825
test-check-code: do not use xargs We have too many files, and passing them via arguments could cause strange errors on some platforms [1]. Since check-code.py can now take "-" and read file names from stdin, use it instead of xargs to avoid the argv size limit. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-April/096346.html
Thu, 06 Apr 2017 22:08:23 -0700 check-code: use "-" to specify a list of files from stdin
Jun Wu <quark@fb.com> [Thu, 06 Apr 2017 22:08:23 -0700] rev 31824
check-code: use "-" to specify a list of files from stdin This will be used by the next patch.
Thu, 06 Apr 2017 14:41:42 +0200 perf: add historical portability for util.timer
Philippe Pepiot <philippe.pepiot@logilab.fr> [Thu, 06 Apr 2017 14:41:42 +0200] rev 31823
perf: add historical portability for util.timer util.timer has been introduced in ae5d60bb and used in perf.py since 22fbca1d. For historical portability, forcibly define util.timer in perf.py
Wed, 05 Apr 2017 15:31:08 -0700 diff: add --binary option for git mode diffs
Alexander Fomin <afomin@fb.com> [Wed, 05 Apr 2017 15:31:08 -0700] rev 31822
diff: add --binary option for git mode diffs This patch adds --binary option to `hg diff` and `hg export` to allow more control about when binary diffs are displayed in Git mode as well as some tests to verify it behaves correctly (issue5510).
Wed, 05 Apr 2017 15:15:06 -0700 patch: make diff in git mode respect --text option (issue5510)
Alexander Fomin <afomin@fb.com> [Wed, 05 Apr 2017 15:15:06 -0700] rev 31821
patch: make diff in git mode respect --text option (issue5510) This changeset makes patch respect -a/--text option in --git mode by aligning its behaviour with git itself.
Wed, 05 Apr 2017 00:34:58 +0900 py3: have registrar process docstrings in bytes
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Apr 2017 00:34:58 +0900] rev 31820
py3: have registrar process docstrings in bytes Mixing bytes and unicode creates a mess. Do things in bytes as possible. New sysbytes() helper only takes care of ASCII characters, but avoids raising nasty unicode exception. This is the same design principle as sysstr().
Tue, 04 Apr 2017 16:49:12 +0200 localrepo: fix deprecation version for 'repo._link'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 04 Apr 2017 16:49:12 +0200] rev 31819
localrepo: fix deprecation version for 'repo._link' The patch lingered for a while and nobody noticed when it was resubmitted.
Tue, 04 Apr 2017 16:48:58 +0200 localrepo: fix deprecation version for 'repo.join'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 04 Apr 2017 16:48:58 +0200] rev 31818
localrepo: fix deprecation version for 'repo.join' The patch lingered for a while and nobody noticed when it was resubmitted.
Mon, 03 Apr 2017 19:45:09 -0400 tests: make zstd-related output optional
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 19:45:09 -0400] rev 31817
tests: make zstd-related output optional Caught by the buildbot with --pure, fix suggested by indygreg.
Mon, 03 Apr 2017 18:58:00 -0400 check-code: update test IP address enforcement checks
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:58:00 -0400] rev 31816
check-code: update test IP address enforcement checks Instead of mentioning 127.0.0.1, we should use $LOCALIP. Anytime $LOCALIP appears in output, we should make sure we use (glob) on that line of output so that weird environments that do remapping jiggery pokery (such as our FreeBSD buildbot that's in a jail) don't get spurious test failures.
Mon, 03 Apr 2017 18:56:44 -0400 tests: fix missing (glob) annotations in test-push-http.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:44 -0400] rev 31815
tests: fix missing (glob) annotations in test-push-http.t
Mon, 03 Apr 2017 18:56:29 -0400 tests: fix missing (glob) annotations in test-push-http-bundle1.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:29 -0400] rev 31814
tests: fix missing (glob) annotations in test-push-http-bundle1.t
Mon, 03 Apr 2017 18:56:08 -0400 tests: fix missing (glob) annotations in test-https.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:56:08 -0400] rev 31813
tests: fix missing (glob) annotations in test-https.t
Mon, 03 Apr 2017 18:55:55 -0400 tests: fix missing (glob) annotations in test-bundle2-exchange.t
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 18:55:55 -0400] rev 31812
tests: fix missing (glob) annotations in test-bundle2-exchange.t
Mon, 03 Apr 2017 19:03:34 -0400 util: fix %-formatting on docstring by moving a closing parenthesis
Augie Fackler <augie@google.com> [Mon, 03 Apr 2017 19:03:34 -0400] rev 31811
util: fix %-formatting on docstring by moving a closing parenthesis We have to do the % formatting over the sysstr, since the things we're going to splat into it are themselves sysstrs. This is probably technically wrong-ish, since bt is probably actually a bytestr here, but this fixes the immediate issue, which was that hg was broken on Python 3.
Sun, 02 Apr 2017 22:16:03 +0900 revset: stop supporting plain list as input set (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:16:03 +0900] rev 31810
revset: stop supporting plain list as input set (API) There was no deprecwarn(), but this is the same kind of API compatibility as the one removed by the previous patch.
Sun, 02 Apr 2017 22:01:32 +0900 revset: stop supporting predicate that returns plain list (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:01:32 +0900] rev 31809
revset: stop supporting predicate that returns plain list (API) It's said to be removed after 3.9.
Sat, 01 Apr 2017 12:24:59 +0200 mdiff: add a hunkinrange helper function
Denis Laxalde <denis@laxalde.org> [Sat, 01 Apr 2017 12:24:59 +0200] rev 31808
mdiff: add a hunkinrange helper function This factors out hunk filtering logic by line range that is similar in mdiff.blocksinrange() and hgweb.webutil.diffs().
Fri, 22 Apr 2016 21:46:33 +0900 templater: provide loop counter as "index" keyword
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:46:33 +0900] rev 31807
templater: provide loop counter as "index" keyword This was originally written for JSON templating where we would have to be careful to not add extra comma, but seems generally useful. Inner loop started by % operator has its own counter.
Fri, 22 Apr 2016 21:45:06 +0900 templater: rename variable "i" to "v" in runmap()
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:45:06 +0900] rev 31806
templater: rename variable "i" to "v" in runmap() I want to reuse "i" for index.
Sun, 02 Apr 2017 22:43:18 +0900 formatter: reorder code that builds template mapping
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 22:43:18 +0900] rev 31805
formatter: reorder code that builds template mapping This makes the future patch slightly simpler.
Sun, 02 Apr 2017 18:40:13 -0700 revlog: avoid applying delta chain on cache hit
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:40:13 -0700] rev 31804
revlog: avoid applying delta chain on cache hit Previously, revlog.revision(raw=False) may try to apply the delta chain on _cache hit. That happens if flags are non-empty. This patch makes rawtext reused so delta chain application is avoided. "_cache" and "rev" are moved a bit to avoid unnecessary assignments.
Sun, 02 Apr 2017 18:29:24 -0700 revlog: indent block to make review easier
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:29:24 -0700] rev 31803
revlog: indent block to make review easier
Sun, 02 Apr 2017 18:25:12 -0700 revlog: avoid calculating "flags" twice in revision()
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:25:12 -0700] rev 31802
revlog: avoid calculating "flags" twice in revision() This is more consistent with other code in "revision()" - prefer performance to code length.
Sun, 02 Apr 2017 18:57:03 -0700 revlog: use raw revision for rawsize
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:57:03 -0700] rev 31801
revlog: use raw revision for rawsize When writing the revlog-ng index, the third field is len(rawtext). See revlog._addrevision: textlen = len(rawtext) .... e = (offset_type(offset, flags), l, textlen, base, link, p1r, p2r, node) self.index.insert(-1, e) Therefore, revlog.index[rev][2] returned by revlog.rawsize should be len(rawtext), where "rawtext" is revlog.revision(raw=True). Unfortunately it's hard to add a test for this code path because "if l >= 0" catches most cases.
Sat, 14 May 2016 20:51:57 +0900 revsetlang: enable optimization of 'x + y' expression
Yuya Nishihara <yuya@tcha.org> [Sat, 14 May 2016 20:51:57 +0900] rev 31800
revsetlang: enable optimization of 'x + y' expression It's been disabled since 4d1e56b29a91, but it can be enabled now as the ordering requirement is resolved at analyze().
Sat, 08 Apr 2017 11:36:39 -0700 repair: use rawvfs when copying extra store files stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:36:39 -0700] rev 31799
repair: use rawvfs when copying extra store files If we use the normal vfs, store encoding will be applied when we .join() the path to be copied. This results in attempting to copy a file that (likely) doesn't exist. Using the rawvfs operates on the raw file path, which is returned by vfs.readdir(). Users at Mozilla are encountering this, as I've instructed them to run `hg debugupgraderepo` to upgrade to generaldelta. While Mercurial shouldn't deposit any files under .hg/store that require encoding, it is possible for e.g. .DS_Store files to be created by the operating system.
Sat, 08 Apr 2017 11:35:29 -0700 tests: add test demonstrating buggy path handling stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:35:29 -0700] rev 31798
tests: add test demonstrating buggy path handling `hg debugupgraderepo` is currently buggy with regards to path handling when copying files in .hg/store/. Specifically, it applies the store filename encoding to paths instead of operating on raw files. This commit adds a test demonstrating the buggy behavior.
Sat, 08 Apr 2017 11:35:00 -0700 repair: iterate store files deterministically stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 08 Apr 2017 11:35:00 -0700] rev 31797
repair: iterate store files deterministically An upcoming test will add a 2nd file. Since readdir() is non-deterministic, add a sorted() to make traversal deterministic.
Sat, 01 Apr 2017 15:24:03 -0700 zstd: vendor python-zstandard 0.8.0
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 15:24:03 -0700] rev 31796
zstd: vendor python-zstandard 0.8.0 Commit 81e1f5bbf1fc54808649562d3ed829730765c540 from https://github.com/indygreg/python-zstandard is imported without modifications (other than removing unwanted files). Updates relevant to Mercurial include: * Support for multi-threaded compression (we can use this for bundle and wire protocol compression). * APIs for batch compression and decompression operations using multiple threads and optimal memory allocation mechanism. (Can be useful for revlog perf improvements.) * A ``BufferWithSegments`` type that models a single memory buffer containing N discrete items of known lengths. This type can be used for very efficient 0-copy data operations. # no-check-commit
Sat, 01 Apr 2017 13:43:52 -0700 commands: update help for "unbundle"
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:43:52 -0700] rev 31795
commands: update help for "unbundle" Similar to the recent change to "bundle," this command no longer just deals with "changegroup" data.
Sat, 01 Apr 2017 13:43:43 -0700 commands: update help for "bundle"
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:43:43 -0700] rev 31794
commands: update help for "bundle" We now have a dedicated help topic to describe bundle specification strings. Let's update `hg bundle`'s documentation to reflect its existence. While I was hear, I also tweaked some wording which I felt was out of date and needed tweaking. Specifically, `hg bundle` no longer just deals with "changegroup" data: it can also generate files that have non-changegroup data.
Sat, 01 Apr 2017 13:42:06 -0700 help: document bundle specifications
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:42:06 -0700] rev 31793
help: document bundle specifications I softly formalized the concept of a "bundle specification" a while ago when I was working on clone bundles and stream clone bundles and wanted a more robust way to define what exactly is in a bundle file. The concept has existed for a while. Since it is part of the clone bundles feature and exposed to the user via the "-t" argument to `hg bundle`, it is something we need to support for the long haul. After the 4.1 release, I heard a few people comment that they didn't realize you could generate zstd bundles with `hg bundle`. I'm partially to blame for not documenting it in bundle's docstring. Additionally, I added a hacky, experimental feature for controlling the compression level of bundles in 76104a4899ad. As the commit message says, I went with a quick and dirty solution out of time constraints. Furthermore, I wanted to eventually store this configuration in the "bundlespec" so it could be made more flexible. Given: a) bundlespecs are here to stay b) we don't have great documentation over what they are, despite being a user-facing feature c) the list of available compression engines and their behavior isn't exposed d) we need an extensible place to modify behavior of compression engines I want to move forward with formalizing bundlespecs as a user-facing feature. This commit does that by introducing a "bundlespec" help page. Leaning on the just-added compression engine documentation and API, the topic also conveniently lists available compression engines and details about them. This makes features like zstd bundle compression more discoverable. e.g. you can now `hg help -k zstd` and it lists the "bundlespec" topic.
Sat, 01 Apr 2017 13:29:01 -0700 util: document bundle compression
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 13:29:01 -0700] rev 31792
util: document bundle compression An upcoming patch will add support for documenting bundle specifications in more detail. As part of this, we'd like to enumerate available bundle compression formats. In order to do this, we need to provide the help mechanism a dict of names and objects with docstrings. This patch adds docstrings to compengine.bundletype and adds a function for retrieving a dict of them. The code is not yet used.
Sat, 01 Apr 2017 00:21:52 -0700 tests: store ETag when using --headeronly
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 01 Apr 2017 00:21:52 -0700] rev 31791
tests: store ETag when using --headeronly Previously, --headeronly would prevent --twice from working because the ETag wasn't stored when --headeronly was used. This feels like a bug. That feeling is reaffirmed by the fact that this change doesn't regress any tests.
Fri, 31 Mar 2017 21:47:26 -0700 hgweb: extract path traversal checking into standalone function
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Mar 2017 21:47:26 -0700] rev 31790
hgweb: extract path traversal checking into standalone function A common exploit in web applications that access paths is to insert path separator strings like ".." to try to get the server to serve up files it shouldn't. We have code for detecting this in staticfile(). A subsequent commit will need to perform this test as well. Since this is security code, let's factor the check so we don't have to reinvent the wheel.
Fri, 31 Mar 2017 22:30:38 -0700 hgweb: use context manager for file I/O
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Mar 2017 22:30:38 -0700] rev 31789
hgweb: use context manager for file I/O
Mon, 03 Apr 2017 10:01:38 -0700 tags: rename "head" to "node" where we don't care
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 10:01:38 -0700] rev 31788
tags: rename "head" to "node" where we don't care Followup to 5eb4d206202b (tags: extract fnode retrieval into its own function, 2017-03-28) in which the "for head in head" became "for head in nodes".
Mon, 03 Apr 2017 08:45:24 -0700 manifest: update comment to be about bytearray
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 08:45:24 -0700] rev 31787
manifest: update comment to be about bytearray Looks like a leftover from 2a18e9e6ca43 (py3: use bytearray() instead of array('c', ...) constructions, 2017-03-12).
Mon, 03 Apr 2017 11:30:51 -0700 check-code: fix "covert" typo
Martin von Zweigbergk <martinvonz@google.com> [Mon, 03 Apr 2017 11:30:51 -0700] rev 31786
check-code: fix "covert" typo
Mon, 03 Apr 2017 10:02:55 +0200 hgweb: rename linerangelog.js as followlines.js
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 10:02:55 +0200] rev 31785
hgweb: rename linerangelog.js as followlines.js So that the file name matches both the feature name and user facing vocabulary (e.g. the revset function).
Mon, 03 Apr 2017 09:58:36 +0200 hgweb: rely on a specific class to change cursor type in followlines UI
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 09:58:36 +0200] rev 31784
hgweb: rely on a specific class to change cursor type in followlines UI The previous CSS rule would also apply in pages where followlines UI was not available (e.g. "changeset" view at /rev/<node>/). We insert a "followlines-select" class in JavaScript on actually selectable lines and restrict the CSS selector to use it.
Mon, 03 Apr 2017 09:40:25 +0200 hgweb: use a function expression for the install listener of followlines UI
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 03 Apr 2017 09:40:25 +0200] rev 31783
hgweb: use a function expression for the install listener of followlines UI We define the listener of document's "DOMContentLoaded" inline in registration and use a function expression (anonymous) with everything inside. This makes it clearer that this file is not a library of JavaScript functions but rather an executable script. (Most of changes consists of reindenting the "followlinesBox" function, so mostly white space changes.)
Sun, 02 Apr 2017 12:02:17 +0900 formatter: use templatefilters.json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 12:02:17 +0900] rev 31782
formatter: use templatefilters.json() Now _jsonifyobj() is identical to templatefilters.json(paranoid=False).
Sun, 02 Apr 2017 11:54:24 +0900 templatefilters: use list comprehension in json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:54:24 +0900] rev 31781
templatefilters: use list comprehension in json() Not important, but the code slightly looks better.
Sun, 02 Apr 2017 11:51:25 +0900 templatefilters: unroll handling of None/False/True
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:51:25 +0900] rev 31780
templatefilters: unroll handling of None/False/True It doesn't make sense to use a dict here.
Sun, 02 Apr 2017 11:46:49 +0900 templatefilters: drop callable support from json()
Yuya Nishihara <yuya@tcha.org> [Sun, 02 Apr 2017 11:46:49 +0900] rev 31779
templatefilters: drop callable support from json() This backs out ae5447de4c11. A callable should be evaluated beforehand by templater.runsymbol().
Wed, 29 Mar 2017 21:43:38 +0900 ui: use bytes IO and convert EOL manually in ui.editor()
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:43:38 +0900] rev 31778
ui: use bytes IO and convert EOL manually in ui.editor() Text IO sucks on Python 3 as it must be a unicode stream. We could introduce a wrapper that converts unicode back to bytes, but it wouldn't be simple to handle offsets transparently from/to underlying IOBase API. Fortunately, we don't need to process huge text files, so let's stick to bytes IO and convert EOL in memory.
Wed, 29 Mar 2017 21:40:15 +0900 util: add helper to convert between LF and native EOL
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:40:15 +0900] rev 31777
util: add helper to convert between LF and native EOL See the next patch for why.
Wed, 29 Mar 2017 21:28:54 +0900 util: extract pure tolf/tocrlf() functions from eol extension
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:28:54 +0900] rev 31776
util: extract pure tolf/tocrlf() functions from eol extension This can be used for EOL conversion of text files.
Wed, 29 Mar 2017 21:23:28 +0900 pycompat: provide bytes os.linesep
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:23:28 +0900] rev 31775
pycompat: provide bytes os.linesep
Wed, 29 Mar 2017 21:13:55 +0900 pycompat: introduce identity function as a compat stub
Yuya Nishihara <yuya@tcha.org> [Wed, 29 Mar 2017 21:13:55 +0900] rev 31774
pycompat: introduce identity function as a compat stub I was sometimes too lazy to use 'str' instead of 'lambda a: a'. Let's add a named function for that purpose.
Sun, 02 Apr 2017 02:29:51 -0400 test-blackbox: glob away quoting differences on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 02:29:51 -0400] rev 31773
test-blackbox: glob away quoting differences on Windows Windows uses double quotes in these places.
Sun, 02 Apr 2017 02:24:09 -0400 test-subrepo: update output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 02:24:09 -0400] rev 31772
test-subrepo: update output for Windows
Sun, 02 Apr 2017 01:51:07 -0400 test-serve: disable unfixable tests on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 01:51:07 -0400] rev 31771
test-serve: disable unfixable tests on Windows These tests would run if hghave.has_serve() were enabled on Windows. Windows has no issue allowing an unpriviledged process to open port 13, so it doesn't abort. The other tests are related to how MSYS tries to be helpful and converts Unix constructs to the Windows equivalent. There isn't any way to disable this behavior, though it supposedly doesn't happen if the exe is linked against the MSYS library.
Sun, 02 Apr 2017 01:28:05 -0400 test-serve: kill daemons before deleting the access and error logs
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 01:28:05 -0400] rev 31770
test-serve: kill daemons before deleting the access and error logs On Windows, `rm` will fail with 'Permission denied' if another process has it open. It looks like the rollback test was missing the kill entirely.
Sun, 02 Apr 2017 00:56:52 -0400 test-serve: make the 'listening at *' lines optional
Matt Harbison <matt_harbison@yahoo.com> [Sun, 02 Apr 2017 00:56:52 -0400] rev 31769
test-serve: make the 'listening at *' lines optional The daemonized serve process doesn't print these lines out (see 448d0c452140). I was able to get it to with the following hack: diff --git a/mercurial/win32.py b/mercurial/win32.py --- a/mercurial/win32.py +++ b/mercurial/win32.py @@ -418,6 +418,11 @@ return str(ppid) def spawndetached(args): + + import subprocess + return subprocess.Popen(args, cwd=pycompat.getcwd(), env=encoding.environ, + creationflags=subprocess.CREATE_NEW_PROCESS_GROUP).pid + # No standard library function really spawns a fully detached # process under win32 because they allocate pipes or other objects # to handle standard streams communications. Passing these objects However, MSYS translates --prefixes starting with '/' to 'C:/MinGW/msys/1.0', which changes the output. The output isn't so important that I want to spend a bunch of time on this, and risk breaking some subtle behavior of `hg serve -d` with the more complicated code.
Sat, 01 Apr 2017 18:30:51 -0400 test-http: update output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 18:30:51 -0400] rev 31768
test-http: update output for Windows The http test simply wasn't updated in 161ab32b44a1 for Windows. It looks like the https test meant to glob away the error message in 3e2d8120528b, but forgot the '*', and was subsequently removed in 408f2202bd80.
Sat, 01 Apr 2017 15:23:26 -0400 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 15:23:26 -0400] rev 31767
tests: quote paths in shell script hooks Without the quoting, MSYS will remove the '\' directory separators, and the repo can't be opened.
Sat, 01 Apr 2017 14:48:39 -0400 tests: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 14:48:39 -0400] rev 31766
tests: add globs for Windows
Fri, 24 Mar 2017 19:19:00 -0700 show: new extension for displaying various repository data
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Mar 2017 19:19:00 -0700] rev 31765
show: new extension for displaying various repository data Currently, Mercurial has a number of commands to show information. And, there are features coming down the pipe that will introduce more commands for showing information. Currently, when introducing a new class of data or a view that we wish to expose to the user, the strategy is to introduce a new command or overload an existing command, sometimes both. For example, there is a desire to formalize the wip/smartlog/underway/mine functionality that many have devised. There is also a desire to introduce a "topics" concept. Others would like views of "the current stack." In the current model, we'd need a new command for wip/smartlog/etc (that behaves a lot like a pre-defined alias of `hg log`). For topics, we'd likely overload `hg topic[s]` to both display and manipulate topics. Adding new commands for every pre-defined query doesn't scale well and pollutes `hg help`. Overloading commands to perform read-only and write operations is arguably an UX anti-pattern: while having all functionality for a given concept in one command is nice, having a single command doing multiple discrete operations is not. Furthermore, a user may be surprised that a command they thought was read-only actually changes something. We discussed this at the Mercurial 4.0 Sprint in Paris and decided that having a single command where we could hang pre-defined views of various data would be a good idea. Having such a command would: * Help prevent an explosion of new query-related commands * Create a clear separation between read and write operations (mitigates footguns) * Avoids overloading the meaning of commands that manipulate data (bookmark, tag, branch, etc) (while we can't take away the existing behavior for BC reasons, we now won't introduce this behavior on new commands) * Allows users to discover informational views more easily by aggregating them in a single location * Lowers the barrier to creating the new views (since the barrier to creating a top-level command is relatively high) So, this commit introduces the `hg show` command via the "show" extension. This command accepts a positional argument of the "view" to show. New views can be registered with a decorator. To prove it works, we implement the "bookmarks" view, which shows a table of bookmarks and their associated nodes. We introduce a new style to hold everything used by `hg show`. For our initial bookmarks view, the output varies from `hg bookmarks`: * Padding is performed in the template itself as opposed to Python * Revision integers are not shown * shortest() is used to display a 5 character node by default (as opposed to static 12 characters) I chose to implement the "bookmarks" view first because it is simple and shouldn't invite too much bikeshedding that detracts from the evaluation of `hg show` itself. But there is an important point to consider: we now have 2 ways to show a list of bookmarks. I'm not a fan of introducing multiple ways to do very similar things. So it might be worth discussing how we wish to tackle this issue for bookmarks, tags, branches, MQ series, etc. I also made the choice of explicitly declaring the default show template not part of the standard BC guarantees. History has shown that we make mistakes and poor choices with output formatting but can't fix these mistakes later because random tools are parsing output and we don't want to break these tools. Optimizing for human consumption is one of my goals for `hg show`. So, by not covering the formatting as part of BC, the barrier to future change is much lower and humans benefit. There are some improvements that can be made to formatting. For example, we don't yet use label() in the templates. We obviously want this for color. But I'm not sure if we should reuse the existing log.* labels or invent new ones. I figure we can punt that to a follow-up. At the aforementioned Sprint, we discussed and discarded various alternatives to `hg show`. We considered making `hg log <view>` perform this behavior. The main reason we can't do this is because a positional argument to `hg log` can be a file path and if there is a conflict between a path name and a view name, behavior is ambiguous. We could have introduced `hg log --view` or similar, but we felt that required too much typing (we don't want to require a command flag to show a view) and wasn't very discoverable. Furthermore, `hg log` is optimized for showing changelog data and there are things that `hg display` could display that aren't changelog centric. There were concerns about using "show" as the command name. Some users already have a "show" alias that is similar to `hg export`. There were also concerns that Git users adapted to `git show` would be confused by `hg show`'s different behavior. The main difference here is `git show` prints an `hg export` like view of the current commit by default and `hg show` requires an argument. `git show` can also display any Git object. `git show` does not support displaying more complex views: just single objects. If we implemented `hg show <hash>` or `hg show <identifier>`, `hg show` would be a superset of `git show`. Although, I'm hesitant to do that at this time because I view `hg show` as a higher-level querying command and there are namespace collisions between valid identifiers and registered views. There is also a prefix collision with `hg showconfig`, which is an alias of `hg config`. We also considered `hg view`, but that is already used by the "hgk" extension. `hg display` was also proposed at one point. It has a prefix collision with `hg diff`. General consensus was "show" or "view" are the best verbs. And since "view" was taken, "show" was chosen. There are a number of inline TODOs in this patch. Some of these represent decisions yet to be made. Others represent features requiring non-trivial complexity. Rather than bloat the patch or invite additional bikeshedding, I figured I'd document future enhancements via TODO so we can get a minimal implmentation landed. Something is better than nothing.
Sun, 02 Apr 2017 18:13:03 -0700 test-revlog-raw: remove duplicated option
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:13:03 -0700] rev 31764
test-revlog-raw: remove duplicated option
Sun, 02 Apr 2017 18:12:47 -0700 test-revlog-raw: fix "genbits" implementation
Jun Wu <quark@fb.com> [Sun, 02 Apr 2017 18:12:47 -0700] rev 31763
test-revlog-raw: fix "genbits" implementation The "genbits" implementation is actually incorrect. This patch fixes it. A good "genbits" implementation should pass the below assertion: n = 3 # or other number l = list(genbits(n)) assert 2**(n*2) == len(set((l[i]<<n)+l[i+1] for i in range(len(l)-1))) An assertion is added to make sure "genbits" won't work unexpectedly.
Wed, 29 Mar 2017 14:49:14 -0700 verify: fix length check
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:49:14 -0700] rev 31762
verify: fix length check According to the document added above, we should check L1 == L2, and the only way to get L1 in all cases is to call "rawsize()", and the only way to get L2 is to call "revision(raw=True)". Therefore the fix. Meanwhile there are still a lot of things about flagprocessor broken in revlog.py. Tests will be added after revlog.py gets fixed.
Wed, 29 Mar 2017 14:45:01 -0700 verify: document corner cases
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 14:45:01 -0700] rev 31761
verify: document corner cases It seems a good idea to list all kinds of "surprises" and expected behavior to make the upcoming changes easier to understand. Note: the comment added does not reflect the actual behavior of the current code.
Mon, 03 Apr 2017 17:34:24 -0400 Added signature for changeset ed5b25874d99 stable
Augie Fackler <raf@durin42.com> [Mon, 03 Apr 2017 17:34:24 -0400] rev 31760
Added signature for changeset ed5b25874d99
Mon, 03 Apr 2017 17:34:22 -0400 Added tag 4.1.2 for changeset ed5b25874d99 stable
Augie Fackler <raf@durin42.com> [Mon, 03 Apr 2017 17:34:22 -0400] rev 31759
Added tag 4.1.2 for changeset ed5b25874d99
Wed, 29 Mar 2017 22:26:16 +0200 hgweb: expose a followlines UI in filerevision view
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 22:26:16 +0200] rev 31758
hgweb: expose a followlines UI in filerevision view In filerevision view (/file/<rev>/<fname>) we add some event listeners on mouse clicks of <span> elements in the <pre class="sourcelines"> block. Those listeners will capture a range of lines selected between two mouse clicks and a box inviting to follow the history of selected lines will then show up. Selected lines (i.e. the block of lines) get a CSS class which make them highlighted. Selection can be cancelled (and restarted) by either clicking on the cancel ("x") button in the invite box or clicking on any other source line. Also clicking twice on the same line will abort the selection and reset event listeners to restart the process. As a first step, this action is only advertised by the "cursor: cell" CSS rule on source lines elements as any other mechanisms would make the code significantly more complicated. This might be improved later. All JavaScript code lives in a new "linerangelog.js" file, sourced in filerevision template (only in "paper" style for now).
Wed, 29 Mar 2017 05:31:31 -0700 shelve: move ui.quiet manipulations to configoverride
Kostia Balytskyi <ikostia@fb.com> [Wed, 29 Mar 2017 05:31:31 -0700] rev 31757
shelve: move ui.quiet manipulations to configoverride
Thu, 30 Mar 2017 21:21:15 -0700 revlog: add a fast path for revision(raw=False)
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 21:21:15 -0700] rev 31756
revlog: add a fast path for revision(raw=False) If cache hit and flags are empty, no flag processor runs and "text" equals to "rawtext". So we check flags, and return rawtext. This resolves performance issue introduced by a previous patch.
Thu, 30 Mar 2017 18:38:03 -0700 revlog: make _addrevision only accept rawtext
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:38:03 -0700] rev 31755
revlog: make _addrevision only accept rawtext All 3 users of _addrevision use raw: - addrevision: passing rawtext to _addrevision - addgroup: passing rawtext and raw=True to _addrevision - clone: passing rawtext to _addrevision There is no real user using _addrevision(raw=False). On the other hand, _addrevision is low-level code dealing with raw revlog deltas and rawtexts. It should not transform rawtext to non-raw text. This patch removes the "raw" parameter from "_addrevision", and does some rename and doc change to make it clear that "_addrevision" expects rawtext. Archeology shows 2df983125d37 added "raw" flag to "_addrevision", follow-ups e12c0fa1f65b and c1b7b2285522 seem to make the flag unnecessary. test-revlog-raw.py no longer complains.
Thu, 30 Mar 2017 18:24:23 -0700 revlog: use raw revisions in clone
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:24:23 -0700] rev 31754
revlog: use raw revisions in clone test-revlog-raw.py now shows "clone test passed", but there is more to fix.
Thu, 30 Mar 2017 18:23:27 -0700 revlog: use raw revisions in revdiff
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 18:23:27 -0700] rev 31753
revlog: use raw revisions in revdiff See the added comment. revdiff is meant to output the raw delta that will be written to revlog. It should use raw. test-revlog-raw.py now shows "addgroupcopy test passed", but there is more to fix.
Thu, 30 Mar 2017 17:58:03 -0700 revlog: use raw content when building delta
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 17:58:03 -0700] rev 31752
revlog: use raw content when building delta Using external content provided by flagprocessor when building revlog delta is wrong, because deltas are applied to raw contents in revlog. This patch fixes the above issue by adding "raw=True". test-revlog-raw.py now shows "local test passed", but there is more to fix.
Thu, 30 Mar 2017 15:34:08 -0700 revlog: fix _cache usage in revision()
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 15:34:08 -0700] rev 31751
revlog: fix _cache usage in revision() As documented at revlog.__init__, revlog._cache stores raw text. The current read and write usage of "_cache" in revlog.revision lacks of raw=True check. This patch fixes that by adding check about raw, and storing rawtext explicitly in _cache. Note: it may slow down cache hit code path when raw=False and flags=0. That performance issue will be fixed in a later patch. test-revlog-raw now points us to a new problem.
Thu, 30 Mar 2017 14:56:09 -0700 revlog: rename some "text"s to "rawtext"
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 14:56:09 -0700] rev 31750
revlog: rename some "text"s to "rawtext" This makes code easier to understand. "_addrevision" is left untouched - it will be changed in a later patch.
Thu, 30 Mar 2017 07:59:48 -0700 revlog: clarify flagprocessor documentation
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 07:59:48 -0700] rev 31749
revlog: clarify flagprocessor documentation The words "text", "newtext", "bool" could be confusing. Use explicit "text" or "rawtext" and document more about the "bool".
Thu, 30 Mar 2017 20:48:57 -0700 revlog: add a stronger test for raw processing
Jun Wu <quark@fb.com> [Thu, 30 Mar 2017 20:48:57 -0700] rev 31748
revlog: add a stronger test for raw processing There are some issues about revlog raw processing (flag processor). The test is relatively strong covering many cases. It will verify fixes.
Fri, 31 Mar 2017 11:53:56 +0200 hook: add hook name information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:53:56 +0200] rev 31747
hook: add hook name information to external hook While we are here, we can also add the hook name information to external hook.
Fri, 31 Mar 2017 11:08:11 +0200 hook: provide hook type information to external hook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:08:11 +0200] rev 31746
hook: provide hook type information to external hook The python hooks have access to the hook type information. There is not reason for external hook to not be aware of it too. For the record my use case is to make sure a hook script is configured for the right type.
Fri, 31 Mar 2017 11:06:42 +0200 hook: use 'htype' in 'hook'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:06:42 +0200] rev 31745
hook: use 'htype' in 'hook' Same rational as for 'runhooks', we fix the naming in another function.
Fri, 31 Mar 2017 11:03:23 +0200 hook: use 'htype' in 'runhooks'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:03:23 +0200] rev 31744
hook: use 'htype' in 'runhooks' Same rational as for '_pythonhook', 'htype' is more accurate and less error prone. We just fixed an error from the 'name'/'hname' confusion and this should prevent them in the future.
Fri, 31 Mar 2017 11:02:05 +0200 hook: fix name used in untrusted message
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 11:02:05 +0200] rev 31743
hook: fix name used in untrusted message The name used in the message we issue when a hook is untrusted was using "name" which is actually the hook type and not the name of the hook.
Fri, 31 Mar 2017 10:59:37 +0200 hook: use "htype" as variable name in _pythonhook
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 31 Mar 2017 10:59:37 +0200] rev 31742
hook: use "htype" as variable name in _pythonhook We rename 'name' to 'htype' because it fits the variable content better. Multiple python hooks already use 'htype' as a name for the argument. This makes the difference with "hname" clearer and the code less error prone.
Thu, 30 Mar 2017 17:29:03 +0200 run-tests: auto-replace 'TXNID' output
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 30 Mar 2017 17:29:03 +0200] rev 31741
run-tests: auto-replace 'TXNID' output Hooks related to the transaction are aware of the transaction id. By definition this txn-id is unique and different for each transaction. As a result it can never be predicted in test and always needs matching. As a result, touching any like with this data is annoying. We solve the problem once and for all by installing an automatic replacement. In test, this will now show as: TXNID=TXN:$ID$
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: use readasstandin() to read hex hash directly from filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31740
largefiles: use readasstandin() to read hex hash directly from filectx BTW, C implementation of hexdigest() for SHA-1/256/512 returns hex hash in lower case, and doctest in Python standard hashlib assumes that, too. But it isn't explicitly described in API document or so. Therefore, we can't assume that hexdigest() always returns hex hash in lower case, for any hash algorithms, on any Python runtimes and versions. From point of view of that, it is reasonable for portability that 40800668e019 applies lower() on hex hash in overridefilemerge(). But on the other hand, in largefiles extension, there are still many code paths comparing between hex hashes or storing hex hash into standin file, without lower(). Switching to hash algorithm other than SHA-1 may be good chance to clarify our policy about hexdigest()-ed hash value string. - assume that hexdigest() always returns hex hash in lower case, or - apply lower() on hex hash in appropriate layers to ensure lower-case-ness of it for portability
Sat, 01 Apr 2017 02:32:49 +0900 largefiles: remove unused readstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:49 +0900] rev 31739
largefiles: remove unused readstandin() Now, there is no client of readstandin().
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: make copytostore() accept only changectx as the 2nd argument (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31738
largefiles: make copytostore() accept only changectx as the 2nd argument (API) As the name describes, the 2nd argument 'revorctx' of copytostore() can accept non-changectx value, for historical reason, But, since 10561eb97c7f, copyalltostore(), the only one copytostore() client in Mercurial source tree, always passes changectx as 'revorctx'. Therefore, it is reasonable to make copytostore() accept only changectx as the 2nd argument, now.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: remove unused keyword argument of copytostore() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31737
largefiles: remove unused keyword argument of copytostore() (API) AFAIK, 'uploaded' argument of copytostore() (or copytocache(), before renaming at c65f5b6e26d4) has been never used both on caller and callee sides, since official release of bundled largefiles extension.
Sat, 01 Apr 2017 02:32:48 +0900 largefiles: add copytostore() fstandin argument to replace readstandin() (API)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:48 +0900] rev 31736
largefiles: add copytostore() fstandin argument to replace readstandin() (API) copyalltostore(), only one caller of copytostore(), already knows standin file name of the target largefile. Therefore, passing it to copytostore() is more efficient than calculating it in copytostore() or readstandin().
Sat, 01 Apr 2017 02:32:47 +0900 largefiles: replace readstandin() by readasstandin()
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:47 +0900] rev 31735
largefiles: replace readstandin() by readasstandin() These code paths already (or should, for efficiency at repetition) know the target changectx and path of standin file.
Sat, 01 Apr 2017 02:32:31 +0900 largefiles: introduce readasstandin() to read hex hash from given filectx
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 01 Apr 2017 02:32:31 +0900] rev 31734
largefiles: introduce readasstandin() to read hex hash from given filectx This will be used to centralize and encapsulate the logic to read hash from given (filectx of) standin file. readstandin() isn't suitable for this purpose, because there are some code paths, which want to read hex hash directly from filectx.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31733
rebase: abort hg pull --rebase if rebase.requiredest is set (issue5514) Previously, the pull would succeed, but the subsequent rebase would fail due to the rebase.requiredest flag. Now abort earlier with a more useful error message.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: demonstrate behavior with requiredest and pull --rebase
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31732
rebase: demonstrate behavior with requiredest and pull --rebase
Thu, 30 Mar 2017 03:50:10 -0700 rebase: allow destination-free continue and abort (issue5513)
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31731
rebase: allow destination-free continue and abort (issue5513)
Thu, 30 Mar 2017 03:50:10 -0700 rebase: test to show brokenness with requiredest
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31730
rebase: test to show brokenness with requiredest As shown in issue5513, --continue is broken when destination is required. This adds a patch that demonstates this silly behavior, which will be fixed in a future patch.
Thu, 30 Mar 2017 03:50:10 -0700 rebase: move destination test to new test file
Ryan McElroy <rmcelroy@fb.com> [Thu, 30 Mar 2017 03:50:10 -0700] rev 31729
rebase: move destination test to new test file We'll be adding a lot more tests here, so it makes sense to have this in its own file now.
Sat, 01 Apr 2017 00:21:17 -0400 templatefilter: add support for 'long' to json()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 01 Apr 2017 00:21:17 -0400] rev 31728
templatefilter: add support for 'long' to json() When disabling the '#requires serve' check in test-hgwebdir.t and running it on Windows, several 500 errors popped up when querying '?style=json', with the following in the error log: File "...\\mercurial\\templater.py", line 393, in runfilter "keyword '%s'") % (filt.func_name, dt)) Abort: template filter 'json' is not compatible with keyword 'lastchange' The swallowed exception at that point was: File "...\\mercurial\\templatefilters.py", line 242, in json raise TypeError('cannot encode type %s' % obj.__class__.__name__) TypeError: cannot encode type long This corresponds to 'lastchange' being populated by hgweb.common.get_stat(), which uses os.stat().st_mtime. os.stat_float_times() is being disabled in util, so the type for the times is 'long' on Windows, and 'int' on Linux.
Thu, 30 Mar 2017 21:40:10 +0200 hgweb: prefix line id by ctx shortnode in filelog when patches are shown
Denis Laxalde <denis@laxalde.org> [Thu, 30 Mar 2017 21:40:10 +0200] rev 31727
hgweb: prefix line id by ctx shortnode in filelog when patches are shown When "patch" query parameter is present in requests to filelog view, line ids in patches diff are no longer unique in the page since several patches are shown on the same page. We now prefix line id by changeset shortnode when several patches are displayed in the same page to have unique line ids overall.
Wed, 29 Mar 2017 12:14:20 -0700 test-check-code: prevent files being added to the root directory
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:14:20 -0700] rev 31726
test-check-code: prevent files being added to the root directory Adding new files in the root directory is probably a mistake, and is usually discouraged [1]. The test catches it to avoid mistakes like [2]. Modify the test if files need to be added in the root. [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-July/086442.html [2]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-March/095836.html
Wed, 29 Mar 2017 09:54:34 -0400 sslutil: clarify internal documentation
Matt Harbison <matt_harbison@yahoo.com> [Wed, 29 Mar 2017 09:54:34 -0400] rev 31725
sslutil: clarify internal documentation I ran into this python issue with an incomplete certificate chain on Windows recently, and this is the clarification that came from that experimenting. The comment I left on the bug tracker [1] with a reference to the CPython code [2] indicates that the original problem I had is a different bug, but happened to be mentioned under issue20916 on the Python bug tracker. [1] https://bz.mercurial-scm.org/show_bug.cgi?id=5313#c7 [2] https://hg.python.org/cpython/file/v2.7.12/Modules/_ssl.c#l628
Wed, 29 Mar 2017 16:28:51 -0700 unionrepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:51 -0700] rev 31724
unionrepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:28:00 -0700 bundlerepo: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:28:00 -0700] rev 31723
bundlerepo: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:23:04 -0700 revlog: avoid unnecessary node -> rev conversion
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:23:04 -0700] rev 31722
revlog: avoid unnecessary node -> rev conversion
Wed, 29 Mar 2017 16:46:57 -0700 check-code: detect r.revision(r.node(rev))
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 16:46:57 -0700] rev 31721
check-code: detect r.revision(r.node(rev)) revlog.revision takes either node or rev, but taking a rev is more efficient, because converting rev to node is just a seek and read. That's cheaper than converting node to rev, which may require O(n) walk in revlog index for the first times, and then triggering building the radix tree index. Even with the radix tree built, rev -> node is still faster than node -> rev because the radix tree requires more jumps in memory. So r.revision(r.node(rev)) should be changed to r.revision(rev). This patch adds a check-code rule to detect that.
Wed, 29 Mar 2017 12:37:03 -0700 hardlink: check directory's st_dev when copying files
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:37:03 -0700] rev 31720
hardlink: check directory's st_dev when copying files Previously, when copying a file, copyfiles will compare src's st_dev with dirname(dst)'s st_dev, to decide whether to enable hardlink or not. That could have issues on Linux's overlayfs, where stating directories could result in different st_dev from st_dev of stating files, even if both the directories and the files exist in the overlay's upperdir. This patch fixes it by checking dirname(src) instead. It's more consistent because we are checking directories for both src and dest. That fixes test-hardlinks.t running on common Docker setups.
Wed, 29 Mar 2017 12:26:46 -0700 hardlink: duplicate hardlink detection for copying files and directories
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:26:46 -0700] rev 31719
hardlink: duplicate hardlink detection for copying files and directories A later patch will change one of them so they diverge.
Wed, 29 Mar 2017 12:21:15 -0700 hardlink: extract topic text logic of copyfiles
Jun Wu <quark@fb.com> [Wed, 29 Mar 2017 12:21:15 -0700] rev 31718
hardlink: extract topic text logic of copyfiles The topic text shows whether it's "linking" or "copying", based on "hardlink" value. The function is extracted so a later patch can reuse it.
Wed, 29 Mar 2017 14:56:58 +0530 tests: add check to make sure summary works on Python 2
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:56:58 +0530] rev 31717
tests: add check to make sure summary works on Python 2
Wed, 29 Mar 2017 14:47:52 +0530 color: replace str() with pycompat.bytestr()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Mar 2017 14:47:52 +0530] rev 31716
color: replace str() with pycompat.bytestr()
Sun, 26 Mar 2017 20:52:51 +0530 diff: slice over bytes to make sure conditions work normally
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 26 Mar 2017 20:52:51 +0530] rev 31715
diff: slice over bytes to make sure conditions work normally Both of this are part of generating `hg diff` on python 3.
Wed, 29 Mar 2017 20:19:26 -0700 minirst: remove redundant _admonitions set
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:19:26 -0700] rev 31714
minirst: remove redundant _admonitions set As Yuya pointed out during a review a month ago, _admonitions and _admonitiontitles are largely redundant. With the last commit, they are exactly redundant. So, remove _admonitions and use _admonitiontitles.keys() instead.
Wed, 29 Mar 2017 20:05:18 -0700 minirst: remove "admonition" from _admonitions
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 20:05:18 -0700] rev 31713
minirst: remove "admonition" from _admonitions The "admonition" rst primitive is split into "specific" admonitions ("attention," "caution," etc) and the "generic" admonition ("admonition"). For more, see http://docutils.sourceforge.net/docs/ref/rst/directives.html#admonitions The _admonitions set and keys of the _admonitiontitles dict overlap exactly except _admonitions has an "admonition" entry. Nowhere in Mercurial is the "admonition" admonition directive used. Even if it were, it doesn't have a title, so it wouldn't be rendered correctly. So, let's remove "admonition" from the set of recognized admonition directives.
Wed, 29 Mar 2017 19:59:47 -0700 minirst: reindent _admonitiontitles
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Mar 2017 19:59:47 -0700] rev 31712
minirst: reindent _admonitiontitles I don't like the verical indent. While I was here, I cleaned up some whitespace and added a trailing comma on the last element.
Tue, 28 Mar 2017 06:23:28 +0200 tags: extract filenode filtering into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:23:28 +0200] rev 31711
tags: extract filenode filtering into its own function We'll also need to reuse this logic so we extract it into its own function. We document some of the logic in the process.
Tue, 28 Mar 2017 06:08:12 +0200 tags: extract tags computation from fnodes into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:08:12 +0200] rev 31710
tags: extract tags computation from fnodes into its own function I'm about to introduce code that needs to perform such computation on "arbitrary" nodes. The logic is extracted into its own function for reuse.
Tue, 28 Mar 2017 07:41:23 +0200 tags: only return 'alltags' in 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:41:23 +0200] rev 31709
tags: only return 'alltags' in 'findglobaltags' This is minor update along the way. We simplify the 'findglobaltags' function to only return the tags. Since no existing data is reused, we know that all tags returned are global and we can let the caller get that information if it cares about it.
Tue, 28 Mar 2017 07:39:10 +0200 tags: make argument 'tagtype' optional in '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:39:10 +0200] rev 31708
tags: make argument 'tagtype' optional in '_updatetags' This is the next step from the previous changesets, we are now ready to use this function in a simpler way.
Tue, 28 Mar 2017 07:38:10 +0200 tags: reorder argument of '_updatetags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 07:38:10 +0200] rev 31707
tags: reorder argument of '_updatetags' We move all arguments related to tagtype to the end, together. This will allow us to make these arguments optional and reuse of this logic for callers that do not care about the tag types.
Tue, 28 Mar 2017 06:13:49 +0200 tags: do not feed dictionaries to 'findglobaltags'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:13:49 +0200] rev 31706
tags: do not feed dictionaries to 'findglobaltags' The code asserts that these dictionary are empty. So we can be more explicit and have the function return the dictionaries directly.
Tue, 28 Mar 2017 06:01:31 +0200 tags: extract fnode retrieval into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Mar 2017 06:01:31 +0200] rev 31705
tags: extract fnode retrieval into its own function My main goal here is to be able to reuse this logic easily. As a side effect this important logic is now insulated and the code is clearer.
Wed, 29 Mar 2017 12:07:07 +0200 hgweb: fix diff hunks filtering by line range in webutil.diffs()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 29 Mar 2017 12:07:07 +0200] rev 31704
hgweb: fix diff hunks filtering by line range in webutil.diffs() The previous clause for filter out a diff hunk was too restrictive. We need to consider the following cases (assuming linerange=(lb, ub) and the @s2,l2 hunkrange): <-(s2)--------(s2+l2)-> <-(lb)---(ub)-> <-(lb)---(ub)-> <-(lb)---(ub)-> previously on the first and last situations were considered. In test-hgweb-filelog.t, add a couple of lines at the beginning of file "b" so that the line range we will follow does not start at the beginning of file. This covers the change in aforementioned diff hunk filter clause.
Sat, 25 Mar 2017 11:30:08 +0100 summary: display obsolete state of parents
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 11:30:08 +0100] rev 31703
summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete.
Sat, 25 Mar 2017 10:40:29 +0100 templates: add "changeset.obsolete" label in command line style
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:40:29 +0100] rev 31702
templates: add "changeset.obsolete" label in command line style Following respective change in cmdutil.changeset_printer.
Tue, 28 Mar 2017 22:38:45 +0200 templates: shorten definition of changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:38:45 +0200] rev 31701
templates: shorten definition of changeset labels in command-line style We'll add more labels and the line is already quite long, so let's define a variable to hold all evolution "troubles" labels.
Tue, 28 Mar 2017 22:36:22 +0200 templates: use separate() to build changeset labels in command-line style
Denis Laxalde <denis@laxalde.org> [Tue, 28 Mar 2017 22:36:22 +0200] rev 31700
templates: use separate() to build changeset labels in command-line style
Sat, 25 Mar 2017 10:34:11 +0100 templatekw: add an "obsolete" keyword
Denis Laxalde <denis@laxalde.org> [Sat, 25 Mar 2017 10:34:11 +0100] rev 31699
templatekw: add an "obsolete" keyword Definition is the same as the one in evolve extension.
(0) -30000 -10000 -3000 -1000 -240 +240 +1000 +3000 +10000 tip