Mon, 22 Jun 2015 10:19:12 -0700 revset: improves time complexity of 'roots(xxx)'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 22 Jun 2015 10:19:12 -0700] rev 25647
revset: improves time complexity of 'roots(xxx)' The canonical way of doing 'roots(X)' is 'X - children(X)'. This is what the implementation used to be. However, computing children is expensive because it is unbounded. Any changesets in the repository may be a children of '0' so you have to look at all changesets in the repository to compute children(0). Moreover the current revsets implementation for children is not lazy, leading to bad performance when fetching the first result. There is a more restricted algorithm to compute roots: roots(X) = [r for r in X if not parents(r) & X] This achieve the same result while only looking for parent/children relation in the X set itself, making the algorithm 'O(len(X))' membership operation. Another advantages is that it turns the check into a simple filter, preserving all laziness property of the underlying revsets. The speed is very significant and some laziness is restored. -) revset without 'roots(...)' to compare to base line 0) before this change 1) after this change revset #0: roots((tip~100::) - (tip~100::tip)) plain min last -) 0.001082 0.000993 0.000790 0) 0.001366 0.001385 0.001339 1) 0.001257 92% 0.001028 74% 0.000821 61% revset #1: roots((0::) - (0::tip)) plain min last -) 0.134551 0.144682 0.068453 0) 0.161822 0.171786 0.157683 1) 0.137583 85% 0.146204 85% 0.070012 44% revset #2: roots(tip~100:) plain min first last -) 0.000219 0.000225 0.000231 0.000229 0) 0.000513 0.000529 0.000507 0.000539 1) 0.000463 90% 0.000269 50% 0.000267 52% 0.000463 85% revset #3: roots(:42) plain min first last -) 0.000119 0.000146 0.000146 0.000146 0) 0.000231 0.000254 0.000253 0.000260 1) 0.000216 93% 0.000186 73% 0.000184 72% 0.000244 93% revset #4: roots(not public()) plain min first -) 0.000478 0.000502 0.000504 0) 0.000611 0.000639 0.000634 1) 0.000604 0.000560 87% 0.000558 revset #5: roots((0:tip)::) plain min max first last -) 0.057795 0.004905 0.058260 0.004908 0.038812 0) 0.132845 0.118931 0.130306 0.114280 0.127742 1) 0.111659 84% 0.005023 4% 0.111658 85% 0.005022 4% 0.092490 72% revset #6: roots(0::tip) plain min max first last -) 0.032971 0.033947 0.033460 0.032350 0.033125 0) 0.083671 0.081953 0.084074 0.080364 0.086069 1) 0.074720 89% 0.035547 43% 0.077025 91% 0.033729 41% 0.083197 revset #7: 42:68 and roots(42:tip) plain min max first last -) 0.006827 0.000251 0.006830 0.000254 0.006771 0) 0.000337 0.000353 0.000366 0.000350 0.000366 1) 0.000318 94% 0.000297 84% 0.000353 0.000293 83% 0.000351 revset #8: roots(0:tip) plain min max first last -) 0.002119 0.000145 0.000147 0.000147 0.000147 0) 0.047441 0.040660 0.045662 0.040284 0.043435 1) 0.038057 80% 0.000187 0% 0.034919 76% 0.000186 0% 0.035097 80% revset #0: roots(:42 + tip~42:) plain min max first last sort -) 0.000321 0.000317 0.000319 0.000308 0.000369 0.000343 0) 0.000772 0.000751 0.000811 0.000750 0.000802 0.000783 1) 0.000632 81% 0.000369 49% 0.000617 76% 0.000358 47% 0.000601 74% 0.000642 81%
Sat, 20 Jun 2015 16:22:10 -0700 revsetbenchmark: do not abort on failure to run a revset
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 20 Jun 2015 16:22:10 -0700] rev 25646
revsetbenchmark: do not abort on failure to run a revset Instead of aborting the whole process, we just skip entry for revset that failed to run.
Mon, 22 Jun 2015 10:11:31 -0700 osutil: remove Python 2.4 errno conversion workaround
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Jun 2015 10:11:31 -0700] rev 25645
osutil: remove Python 2.4 errno conversion workaround
Mon, 22 Jun 2015 10:09:08 -0700 patch: remove email import workaround for Python 2.4
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Jun 2015 10:09:08 -0700] rev 25644
patch: remove email import workaround for Python 2.4 Python 2.6 provides access to the sub-modules just fine. This workaround is no longer needed since we no longer support Python 2.4.
Sun, 21 Jun 2015 15:18:49 +0900 check-commit: catch both patterns of double empty lines
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jun 2015 15:18:49 +0900] rev 25643
check-commit: catch both patterns of double empty lines
Sat, 20 Jun 2015 04:13:25 -0700 revsetbenchmarks: ignore empty lines
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 20 Jun 2015 04:13:25 -0700] rev 25642
revsetbenchmarks: ignore empty lines Before this change, empty lines were seen as an entry and the benchmark tried to run benchmark for "".
Sat, 20 Jun 2015 18:03:38 -0700 bundle2: reword debug message for invalid .hgtags data
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 Jun 2015 18:03:38 -0700] rev 25641
bundle2: reword debug message for invalid .hgtags data marmoute requested a follow-up to make the verb the first word.
Tue, 07 Apr 2015 14:14:27 -0700 bundle2.getunbundler: rename "header" to "magicstring"
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 07 Apr 2015 14:14:27 -0700] rev 25640
bundle2.getunbundler: rename "header" to "magicstring" This is more consistent with the name used in the bundler class. Thanks goes to Martin von Zweigbergk for pointing this out.
Wed, 24 Jun 2015 12:37:55 -0500 ancestors: prefetch method outside of the loop
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 24 Jun 2015 12:37:55 -0500] rev 25639
ancestors: prefetch method outside of the loop 15412bba5a68 is yet another example where this is worthwhile when it comes to performance, we blindly do it for all 'lazyancestors' methods.
Sun, 21 Jun 2015 13:24:43 +0900 templater: fix handling of \-escapes in raw string literals stable
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jun 2015 13:24:43 +0900] rev 25638
templater: fix handling of \-escapes in raw string literals The backslash character should start escape sequences no matter if a string is prefixed with 'r'. They are just not interpreted as escape sequences in raw strings. revset.tokenize() handles them correctly, but templater didn't. https://docs.python.org/2/reference/lexical_analysis.html#string-literals
Sat, 20 Jun 2015 23:13:34 +0900 templater: evaluate "query" argument passed to revset() stable
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Jun 2015 23:13:34 +0900] rev 25637
templater: evaluate "query" argument passed to revset() revset() had the same issue as 9452112c8eb0. It crashed by passing non-string expression.
Sat, 20 Jun 2015 19:59:26 -0400 match: let 'path:.' and 'path:' match everything (issue4687) stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 20 Jun 2015 19:59:26 -0400] rev 25636
match: let 'path:.' and 'path:' match everything (issue4687) Previously, both queries exited with code 1, printing nothing. The pattern in the latter query is normalized to '.', so it is really the same case.
Sun, 28 Sep 2014 20:18:43 -0700 changelog: document the 'readpending' method
Pierre-Yves David <pierre-yves.david@fb.com> [Sun, 28 Sep 2014 20:18:43 -0700] rev 25635
changelog: document the 'readpending' method I happen to have spent some time understanding this logic, so I'm leaving documentation for the next poor fellow.
Fri, 10 Oct 2014 17:30:09 -0700 revsets: use '&' instead of '.filter' in head
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 10 Oct 2014 17:30:09 -0700] rev 25634
revsets: use '&' instead of '.filter' in head More high level operations are more likely to be optimised.
(0) -10000 -3000 -1000 -300 -100 -14 +14 +100 +300 +1000 +3000 +10000 tip