Thu, 23 Nov 2017 22:04:53 +0900 fancyopts: add early-options parser compatible with getopt() stable
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Nov 2017 22:04:53 +0900] rev 35169
fancyopts: add early-options parser compatible with getopt() The next patch will add a flag for strict parsing of early options, where we'll have to parse all early options at once instead of processing them one-by-one by dispatch._earlygetopt(). That's why I decided to hook fancyopts(). All dispatch._early*opt() functions is planned to be replaced with this function. But in this stable series, only the strict mode will be handled by fancyopts.earlygetopt().
Sun, 12 Nov 2017 23:45:14 -0500 largefiles: pay attention to dropped standin files when updating largefiles stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Nov 2017 23:45:14 -0500] rev 35168
largefiles: pay attention to dropped standin files when updating largefiles Previously, the largefile for a dropped standin would be deleted here, and then restored from the cache. This had the effect of clobbering uncommitted changes if a revert caused the file to be forgotten, which is not what happens with a normal file. Now the removal and update is skipped for dropped largefiles, and the corresponding standin is deleted from disk. This was noticed when working on issue5738 because the forgotten standin files were left behind, and that changes the behavior of the next rename to that directory. My first attempt was to cleanup the standins before calling this. That failed, because this function deletes the largefile if the corresponding standin is missing. This function is called by the revert command, merge (and therefore update), and patch, via the scmutil.marktouched() override. So it should be pretty narrow in scope. I didn't mark issue5738 as fixed because the move related issues can still happen if the main tree and the .hglf subtree get out of sync somehow. I don't see an easy fix for that, but that should be an edge case. If whoever queues this thinks it is good enough to close out the bug and can cram it into the summary, go for it.
Sun, 12 Nov 2017 00:24:38 -0500 test-largefiles: demonstrate problems with renaming and reverting a directory stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 12 Nov 2017 00:24:38 -0500] rev 35167
test-largefiles: demonstrate problems with renaming and reverting a directory These things were uncovered looking at issue5738. First, if the destination directory exists under .hglf, the source is moved under the destination instead of renaming the last component for `hg mv srcdir dstdir`. This is extra confusing, because it occurs even if the user visible destination (i.e. the path _not_ under .hglf) does not exist. Additionally, when a largefile is forgotten via revert, any modifications end up getting clobbered. For normal files, the forgotten file is left unchanged, as shown by test-import.t. The forget command on a largefile will correctly leave the file unmodified.
Sat, 11 Nov 2017 12:37:05 -0500 tests: add globs for Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 11 Nov 2017 12:37:05 -0500] rev 35166
tests: add globs for Windows
Sat, 25 Nov 2017 15:29:34 +0900 cat: record the current behavior of wildcard matches in subrepos stable
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Nov 2017 15:29:34 +0900] rev 35165
cat: record the current behavior of wildcard matches in subrepos Mercurial subrepos support any match patterns.
Thu, 30 Nov 2017 22:32:13 +0900 match: remove doc about undefined behavior of visitdir()
Yuya Nishihara <yuya@tcha.org> [Thu, 30 Nov 2017 22:32:13 +0900] rev 35164
match: remove doc about undefined behavior of visitdir() This was added by 8545bd381504, but core matchers support visitdir() of arbitrary locations since 2773540c3650, and verifier._verifymanifest() doesn't seem to strictly obey the restriction. I have no idea how important this API contract is for third-party extensions. That's why this patch is RFC.
Thu, 30 Nov 2017 15:48:42 -0500 merge with stable
Augie Fackler <augie@google.com> [Thu, 30 Nov 2017 15:48:42 -0500] rev 35163
merge with stable
Wed, 22 Nov 2017 22:18:06 +0800 hgweb: add .jshintrc with some basic rules
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 22:18:06 +0800] rev 35162
hgweb: add .jshintrc with some basic rules This file is picked up automatically by jshint, so no extra changes required in test-check-jshint.t.
Wed, 22 Nov 2017 22:11:37 +0800 hgweb: look up "URLSearchParams" in "window" to work around jshint issues
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 22:11:37 +0800] rev 35161
hgweb: look up "URLSearchParams" in "window" to work around jshint issues Unfortunately, current version of jshint (2.9.5) doesn't know such a global variable and complains that it's undefined. Since this line tries to look up URLSearchParams in a global scope (i.e. window), let's simply preface it with "window." to work around jshint.
Wed, 22 Nov 2017 21:49:36 +0800 hgweb: define locally used variables as actually local in mercurial.js
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 21:49:36 +0800] rev 35160
hgweb: define locally used variables as actually local in mercurial.js Variables that are used or assigned without any declaration using var (or let, or const) are considered global. In many cases this is inadvertent and actually causes a variable leaking to a broader scope, such as a temporary variable used inside a loop suddenly being accessible in global scope. (This corresponds to "undef" option of jshint). So this patch limits the scope of variables that don't need to be global. There are a lot of helper variables in Graph.render() used in a loop, I've declared them all on one line to reduce patch size. "radius" is special because it wasn't passed to graph.vertex, but was used there (it worked because this variable leaked to global scope). "window.graph" is created by an inline script in graph.tmpl so that it can be used in ajaxScrollInit() function, this patch makes this fact explicit by assigning window.graph to a local variable.
Wed, 22 Nov 2017 21:32:18 +0800 hgweb: rename an instance of XMLHttpRequest to xhr in mercurial.js
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 21:32:18 +0800] rev 35159
hgweb: rename an instance of XMLHttpRequest to xhr in mercurial.js "xhr" is a really widespread name for this kind of things, no idea where did "xfr" come from (the original 2228bd109706 doesn't explain that). Let's just change one letter so the name makes more sense.
Wed, 22 Nov 2017 21:15:44 +0800 hgweb: properly iterate over arrays and objects in mercurial.js
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 21:15:44 +0800] rev 35158
hgweb: properly iterate over arrays and objects in mercurial.js In JavaScript, using for-in loops to access every property of an object can have unexpected results when inheritance is involved. For example, if some piece of code adds a property (it may be a method too) to Object.prototype, then all for-in loops that iterate over keys of any object (also anything that inherits Object) will get that property on one of the iterations. To filter out such unexpected properties for-in loops have to use Object.hasOwnProperty() method. (This corresponds to "forin" option of jshint). In the two first cases "data" and "edges" are arrays, to it's simpler to just switch to using a regular for-with-a-counter loop.
Wed, 22 Nov 2017 20:52:59 +0800 hgweb: use strict equals in mercurial.js
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 20:52:59 +0800] rev 35157
hgweb: use strict equals in mercurial.js This patch changes "==" (equals operator) to "===" (strict equals operator). The difference between them is that the latter doesn't do any type coercions. It's handy to compare string '1' to number 1 sometimes, but most of the time using "==" is inadvertent and can be replaced by an explicit type conversion. (This corresponds to "eqeqeq" option of jshint). Some of the changes in this patch are straightforward, e.g. when comparing results of typeof (they could only be strings). The same goes for 'none' and similar strings that can't be sensibly coerced to some other type. Two changes that compare values to "1" and "0" can be clarified: getAttribute() returns either a string or null, but comparing null to a string is always false, so no logic is lost.
Wed, 22 Nov 2017 20:32:07 +0800 hgweb: use strict equals, remove non-breaking space in followlines.js
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Nov 2017 20:32:07 +0800] rev 35156
hgweb: use strict equals, remove non-breaking space in followlines.js The first hunk had a non-breaking space character just before "{", it's not an error or anything, but let's fix it while we're at it. (This corresponds to "nonbsp" option of jshint). Hunks 2 and 3 change "==" (equals operator) to "===" (strict equals operator). The difference between them is that the latter doesn't do any type coercions. It's handy to compare string '1' to number 1 sometimes, but most of the time using "==" is inadvertent and can be replaced by an explicit type conversion. (This corresponds to "eqeqeq" option of jshint). Most of this file already uses strict equals operator, and in the code affected type coercion is not needed, because tagName and selectableTag are both strings and endId and startId are both numbers.
Wed, 29 Nov 2017 10:34:49 -0800 run-tests: make "| foo (re)" not match everything
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Nov 2017 10:34:49 -0800] rev 35155
run-tests: make "| foo (re)" not match everything We make "foo (re)" match the entire line by adding a \Z to the regular expression before matching. However, that doesn't help when the regular expression is something like "| foo", because that gets translated to "| foo\Z", where the "|" has lower precedence and it thus matches the empty string, which is of course a prefix of every string. Fix by wrapping expression in a group before adding the \Z to the end. Differential Revision: https://phab.mercurial-scm.org/D1546
Wed, 29 Nov 2017 10:58:32 -0800 tests: fix regex in test-subrepo-git.t to match entire string
Martin von Zweigbergk <martinvonz@google.com> [Wed, 29 Nov 2017 10:58:32 -0800] rev 35154
tests: fix regex in test-subrepo-git.t to match entire string Due to a bug in the test runner (fixed by the next commit), the regex used for matching lines like " foobar | 2 +-" stoppped at the "|" and the test passed even though the rest of the line did not match. The test seems to have been supposed to match "|" and "+" literally on those lines, so this changes the regex to escape those characters. It also changes a "\s*" to "\s+" since I think we'll always include a space after the "|" in the diffstat output. Differential Revision: https://phab.mercurial-scm.org/D1545
Wed, 29 Nov 2017 17:06:45 -0500 contrib: improve check-code ban on $LOCALIP in output without (glob)
Augie Fackler <augie@google.com> [Wed, 29 Nov 2017 17:06:45 -0500] rev 35153
contrib: improve check-code ban on $LOCALIP in output without (glob) Differential Revision: https://phab.mercurial-scm.org/D1553
Wed, 29 Nov 2017 17:05:51 -0500 tests: re-add (glob) for $LOCALIP matches
Augie Fackler <augie@google.com> [Wed, 29 Nov 2017 17:05:51 -0500] rev 35152
tests: re-add (glob) for $LOCALIP matches This should fix most of the failing tests on the FreeBSD builder, since it has no 127/8 series IP as a side effect of being trapped in a jail. Differential Revision: https://phab.mercurial-scm.org/D1552
Wed, 29 Nov 2017 08:44:06 +0530 py3: make sure the first argument of time.strftime() is str
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 08:44:06 +0530] rev 35151
py3: make sure the first argument of time.strftime() is str time.strftime() does not accepts bytes as its first argument on py3. Differential Revision: https://phab.mercurial-scm.org/D1559
Wed, 29 Nov 2017 08:46:37 +0530 py3: alias xrange to range in tests/seq.py
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 08:46:37 +0530] rev 35150
py3: alias xrange to range in tests/seq.py Differential Revision: https://phab.mercurial-scm.org/D1560
Wed, 29 Nov 2017 08:40:58 +0530 py3: use pycompat.maplist() instead of map()
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 08:40:58 +0530] rev 35149
py3: use pycompat.maplist() instead of map() Differential Revision: https://phab.mercurial-scm.org/D1558
Thu, 30 Nov 2017 16:30:43 +0800 tests: move JSON escape test to test-hgweb-json.t
Anton Shestakov <av6@dwimlabs.net> [Thu, 30 Nov 2017 16:30:43 +0800] rev 35148
tests: move JSON escape test to test-hgweb-json.t The original tests (kanji and null) in test-hgweb-commands.t come from aff419e260f9 and 823a7d79ef82, but they check json escape filter by using JavaScript variable on /graph page, which is awkward, and I'm planning to remove commit description from this variable soon. Let's move the parts that check json template filter to a more appropriate file and use normal json-* templates.
Wed, 29 Nov 2017 07:57:17 +0530 py3: fix handling of keyword arguments in revert
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 07:57:17 +0530] rev 35147
py3: fix handling of keyword arguments in revert Differential Revision: https://phab.mercurial-scm.org/D1554
Tue, 28 Nov 2017 11:00:54 -0500 fsmonitor: issue debug messages when we fall back to core status
Boris Feld <boris.feld@octobus.net> [Tue, 28 Nov 2017 11:00:54 -0500] rev 35146
fsmonitor: issue debug messages when we fall back to core status Having more information about when and why fsmonitor bails out help when looking into status performance.
Wed, 29 Nov 2017 04:47:27 +0530 py3: add b'' to regular expressions which are raw strings
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 04:47:27 +0530] rev 35145
py3: add b'' to regular expressions which are raw strings Differential Revision: https://phab.mercurial-scm.org/D1538
Wed, 29 Nov 2017 04:41:19 +0530 py3: use '%d' for integers rather than '%s'
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 04:41:19 +0530] rev 35144
py3: use '%d' for integers rather than '%s' obsolete._readmarkers() returns an integer version number. Differential Revision: https://phab.mercurial-scm.org/D1537
Wed, 29 Nov 2017 04:41:48 +0530 py3: fix args handling for obsfate template
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 04:41:48 +0530] rev 35143
py3: fix args handling for obsfate template Differential Revision: https://phab.mercurial-scm.org/D1536
Wed, 29 Nov 2017 06:48:52 +0530 py3: remove test-terse-status.t from python3 whitelist as it was renamed
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 Nov 2017 06:48:52 +0530] rev 35142
py3: remove test-terse-status.t from python3 whitelist as it was renamed The renamed file exists in the whitelist. Differential Revision: https://phab.mercurial-scm.org/D1540
Tue, 21 Nov 2017 00:24:09 -0500 test-lfs: allow the test server to be killed on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 21 Nov 2017 00:24:09 -0500] rev 35141
test-lfs: allow the test server to be killed on Windows Apparently '$!' doesn't return a Win32 PID, so the process was never killed, and the next run was screwed up. Oddly, without the explicit killdaemons.py at the end, the test seems to hang. This spawning is just sad, so I limited it to Windows.
Tue, 14 Nov 2017 22:53:52 -0500 test-lfs: perform the `chmod +x` command in a manner compatible with Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 14 Nov 2017 22:53:52 -0500] rev 35140
test-lfs: perform the `chmod +x` command in a manner compatible with Windows
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip