- Nov 22, 2017
-
-
Anton Shestakov authored
This file is picked up automatically by jshint, so no extra changes required in test-check-jshint.t.
-
Anton Shestakov authored
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.
-
Anton Shestakov authored
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.
-
Anton Shestakov authored
"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.
-
Anton Shestakov authored
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.
-
Anton Shestakov authored
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.
-
Anton Shestakov authored
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.
-
- Nov 29, 2017
-
-
Martin von Zweigbergk authored
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
-
Martin von Zweigbergk authored
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
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D1553
-
Augie Fackler authored
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
-
Pulkit Goyal authored
time.strftime() does not accepts bytes as its first argument on py3. Differential Revision: https://phab.mercurial-scm.org/D1559
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D1560
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D1558
-
- Nov 30, 2017
-
-
Anton Shestakov authored
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.
-
- Nov 29, 2017
-
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D1554
-
- Nov 28, 2017
-
-
Boris Feld authored
Having more information about when and why fsmonitor bails out help when looking into status performance.
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D1538
-
Pulkit Goyal authored
obsolete._readmarkers() returns an integer version number. Differential Revision: https://phab.mercurial-scm.org/D1537
-
Pulkit Goyal authored
Differential Revision: https://phab.mercurial-scm.org/D1536
-
- Nov 29, 2017
-
-
Pulkit Goyal authored
The renamed file exists in the whitelist. Differential Revision: https://phab.mercurial-scm.org/D1540
-
- Nov 21, 2017
-
-
Matt Harbison authored
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.
-
- Nov 15, 2017
-
-
Matt Harbison authored
-
Matt Harbison authored
This is consistent with how the other tests require a feature.
-
- Nov 21, 2017
-
-
Anton Shestakov authored
mercurial.js has a process_dates() function that calculates relative age for a given date, it works for all elements with "age" css class. If those elements also have "date" css class, the original text is preserved and age is added at the end. This patch adds these two css classes in some pages in gitweb and monoblue that weren't already using this feature.
-
- Nov 19, 2017
-
-
Boris Feld authored
Changectx are expensive and not needed there. The use of `repo.set` denote old code that predate the introduction of `repo.revs` that we now use. On my mercurial repository 495 draft: before: 0.054239 second after: 0.046935 second On a mercurial repository with 115973 draft: before: 0.564548 second after: 0.130534 second
-
Boris Feld authored
Changectx are expensive and not needed there. The use of `repo.set` denote old code that predate the introduction of `repo.revs` that we now use. On my mercurial repository 495 draft: before: 0.010275 second after: 0.008832 second On a mercurial repository with 115973 draft: before: 0.899255 second after: 0.397131 second
-
- Nov 25, 2017
-
-
Anton Shestakov authored
Both of these were introduced in 0dba955c2636, but were already unused.
-
Anton Shestakov authored
Looks like they were unused since the very introduction of gitweb theme in 385b8872b8e3.
-
Anton Shestakov authored
Clicking on a line link on pages that show any kind of file contents (including diffs) should highlight that line, and in monoblue it works when there's a <pre> element (e.g. diff), but pages that use <table> element (annotate and compare) need this css class. It matches and highlights linked (":target") table rows. This line is pretty much copied from gitweb theme.
-
Anton Shestakov authored
There's a visual difference in hgweb between one changeset that is the tip of its branch and another that simply belongs to that branch. But paper theme ignored this difference on changeset page and used to always use "branchname" css class, be that changeset the tip of its branch or not. That has been recently fixed, so this piece of css is not needed anymore.
-
- Nov 26, 2017
-
-
Anton Shestakov authored
Let's make "instabilities" list contain items with "instability" key as opposed to "name" key. This way it's more explicit and more consistent with the log command-line template.
-
- Nov 23, 2017
-
-
David Soria Parra authored
We can avoid a SPACE(len(changelog)) allocation by using a defaultdict. Test Plan: python run-tests.py test-bisect* Differential Revision: https://phab.mercurial-scm.org/D1499
-
David Soria Parra authored
Since we have revsets we can be more concise in doing the ancestor calulcation. Significant commits are all descendent of the topmost good commits. Test Plan: python run-tests.py test-bisect* Differential Revision: https://phab.mercurial-scm.org/D1498
-
David Soria Parra authored
Pass repo into the bisect function to get more flexibility in what we can call. This will allow us to use revsets to rewrite parts of the ancestor and children calculation in later patches. Test Plan: python run-tests.py test-bisect* Differential Revision: https://phab.mercurial-scm.org/D1497
-
Kyle Lippincott authored
Previously, if the develwarn call site did not specify the category of warning, and devel.all-warnings was False, it would emit the warning. If it was intended that this emit a warning if config is unspecified, I would have expected a comment, so I assumed this was unintentional and am changing the behavior. Differential Revision: https://phab.mercurial-scm.org/D1494
-
- Oct 28, 2017
-
-
Pulkit Goyal authored
The JSON output of nodechanges will help in automation and to improve editor integrations such as for Nuclide. Differential Revision: https://phab.mercurial-scm.org/D1348
-
Pulkit Goyal authored
Thanks to Yuya for suggesting this in D1173. Differential Revision: https://phab.mercurial-scm.org/D1293
-
- Nov 09, 2017
-
-
Pulkit Goyal authored
The output for template "{nodechanges % '{key}:{value}'}" does not contain the output for value. Differential Revision: https://phab.mercurial-scm.org/D1462
-
- Nov 17, 2017
-
-
pavanpc authored
hg rm -A option prints the message of every file in the repo. This is not very user friendly for a big repository with thousands of files. So enabling this feature only when run in --verbose mode (hg rm -Av) Differential Revision: https://phab.mercurial-scm.org/D1336
-