Wed, 24 Jun 2015 13:41:27 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 24 Jun 2015 13:41:27 -0500] rev 25662
merge with stable
Tue, 23 Jun 2015 22:20:01 -0700 check-code: detect legacy exception syntax
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Jun 2015 22:20:01 -0700] rev 25661
check-code: detect legacy exception syntax We just rewrote all files to use modern exception syntax. Ban the old form. This will detect the "except type, instance" and "except (type1, type2), instance" forms.
Tue, 23 Jun 2015 22:20:08 -0700 global: mass rewrite to use modern exception syntax
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Jun 2015 22:20:08 -0700] rev 25660
global: mass rewrite to use modern exception syntax Python 2.6 introduced the "except type as instance" syntax, replacing the "except type, instance" syntax that came before. Python 3 dropped support for the latter syntax. Since we no longer support Python 2.4 or 2.5, we have no need to continue supporting the "except type, instance". This patch mass rewrites the exception syntax to be Python 2.6+ and Python 3 compatible. This patch was produced by running `2to3 -f except -w -n .`.
Tue, 23 Jun 2015 22:38:21 -0700 check-code: detect legacy octal syntax
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Jun 2015 22:38:21 -0700] rev 25659
check-code: detect legacy octal syntax Now that we have mass rewriting all files to use the modern octal syntax, detect and ban the legacy syntax, which is no longer supported in Python 3.
Tue, 23 Jun 2015 22:30:33 -0700 global: mass rewrite to use modern octal syntax
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 23 Jun 2015 22:30:33 -0700] rev 25658
global: mass rewrite to use modern octal syntax Python 2.6 introduced a new octal syntax: "0oXXX", replacing "0XXX". The old syntax is not recognized in Python 3 and will result in a parse error. Mass rewrite all instances of the old octal syntax to the new syntax. This patch was generated by `2to3 -f numliterals -w -n .` and the diff was selectively recorded to exclude changes to "<N>l" syntax conversion, which will be handled separately.
Tue, 23 Jun 2015 14:28:15 -0700 revert: change the direction of revert -i
Laurent Charignon <lcharignon@fb.com> [Tue, 23 Jun 2015 14:28:15 -0700] rev 25657
revert: change the direction of revert -i After the discussion on the list about hg revert -i, it seems like we are satisfied with what we called proposition 2. It shows the changes to revert in the same direction as hg diff. This patch makes it the default option. It changes all the + in - and vice versa in the tests for revert -i.
Tue, 23 Jun 2015 13:46:58 -0700 revert: change a test to make the change of direction of revert -i easier
Laurent Charignon <lcharignon@fb.com> [Tue, 23 Jun 2015 13:46:58 -0700] rev 25656
revert: change a test to make the change of direction of revert -i easier Currently we are handling editing of newly-added files with the interactive interface. We are not handling editing of deleted files. In the test for revert, we were editing a newly-added file. Since we want to change the direction of revert -i, this editing of a newly-added file will become editing of a deleted file. Since we don't support that, this patch changes the test to make the rest of the series cleaner.
Sun, 21 Jun 2015 00:56:09 +0900 parser: update documentation about tokenizer and elements
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jun 2015 00:56:09 +0900] rev 25655
parser: update documentation about tokenizer and elements
Sun, 21 Jun 2015 00:49:26 +0900 parser: accept iterator of tokens instead of tokenizer function and program
Yuya Nishihara <yuya@tcha.org> [Sun, 21 Jun 2015 00:49:26 +0900] rev 25654
parser: accept iterator of tokens instead of tokenizer function and program This can simplify the interface of parse() function. Our tokenizer tends to have optional arguments other than the message to be parsed. Before this patch, the "lookup" argument existed only for the revset, and the templater had to pack [program, start, end] to be passed to its tokenizer.
Sat, 20 Jun 2015 20:11:53 -0700 verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 Jun 2015 20:11:53 -0700] rev 25653
verify: print hint to run debugrebuildfncache Corrupt fncache is now a recoverable operation. Inform the user how to recover from this warning.
Mon, 22 Jun 2015 09:59:48 -0700 repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 22 Jun 2015 09:59:48 -0700] rev 25652
repair: add functionality to rebuild fncache Currently, there is no way to recover from a missing or corrupt fncache file in place (a clone is required). For certain use cases such as servers and with large repositories, an in-place repair may be desirable. This patch adds functionality for in-place repair of the fncache. The `hg debugrebuildfncache` command is introduced. It ensures the fncache is up to date by reconstructing the fncache from all seen files encountered during a brute force traversal of the repository's entire history. The command will add missing entries and will prune excess ones. Currently, the command no-ops unless the repository has the fncache requirement. The command could later grow the ability to "upgrade" an existing repository to be fncache enabled, if desired. When testing this patch on a local clone of the Firefox repository, it removed a bunch of entries. Investigation revealed that removed entries belonged to empty (0 byte size) .i filelogs. The functionality for pruning fncache of stripped revlogs was introduced in f49d60fa40a5, so the presence of these entries likely predates this feature.
Tue, 23 Jun 2015 13:56:53 -0400 import: cross-reference patch.fuzz option from `hg help import`
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 23 Jun 2015 13:56:53 -0400] rev 25651
import: cross-reference patch.fuzz option from `hg help import`
Tue, 23 Jun 2015 13:57:39 -0400 import: cross-reference ui.patch option from `hg help import`
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 23 Jun 2015 13:57:39 -0400] rev 25650
import: cross-reference ui.patch option from `hg help import` This is a fairly obscure patch option. It seems reasonable to expose it a bit more from the help text for `hg import`.
Tue, 23 Jun 2015 13:47:42 -0400 doc: document the ui.patch option
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 23 Jun 2015 13:47:42 -0400] rev 25649
doc: document the ui.patch option This option has been undocumented since e56c7e05c7e6 (July 2007).
Mon, 22 Jun 2015 13:48:01 -0700 revset: rework 'filteredset.last'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 22 Jun 2015 13:48:01 -0700] rev 25648
revset: rework 'filteredset.last' 'isascending' and 'isdescending' are methods, not attributes. This led 'last()' to misbehave on some non-ascending filtered sets.
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.
Sat, 20 Jun 2015 11:07:36 -0400 fileset: don't suggest private or undocumented queries
Matt Harbison <matt_harbison@yahoo.com> [Sat, 20 Jun 2015 11:07:36 -0400] rev 25633
fileset: don't suggest private or undocumented queries Unlike revsets, it looks like all of the filesets are documented, so there's really nothing to test. This is aimed more at parity with revsets and future-proofing.
Sat, 20 Jun 2015 10:59:56 -0400 revset: don't suggest private or undocumented queries
Matt Harbison <matt_harbison@yahoo.com> [Sat, 20 Jun 2015 10:59:56 -0400] rev 25632
revset: don't suggest private or undocumented queries I noticed when I mistyped 'matching', that it suggested '_matchfiles' as well. Rather than simply exclude names that start with '_', this excludes anything without a docstring. That way, if it isn't in the help text, it isn't suggested, such as 'wdir()'.
Thu, 18 Jun 2015 15:42:40 -0500 patch: add fuzz config flag (issue4697)
Matt Mackall <mpm@selenic.com> [Thu, 18 Jun 2015 15:42:40 -0500] rev 25631
patch: add fuzz config flag (issue4697)
Fri, 19 Jun 2015 11:17:11 -0700 devel-warn: issue a warning for old style revsets
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 19 Jun 2015 11:17:11 -0700] rev 25630
devel-warn: issue a warning for old style revsets We have move to smartset class more than a year ago, we now have the tool to aggressively nudge developer into upgrading their extensions.
Fri, 19 Jun 2015 11:19:45 -0700 devel-warn: move the develwarn function as a method of the ui object
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 19 Jun 2015 11:19:45 -0700] rev 25629
devel-warn: move the develwarn function as a method of the ui object We are going to use this feature in more and more place. Having to import scmutil makes it an import cycle hell.
Thu, 18 Jun 2015 23:08:27 +0900 templates: fix missing closing brace in map-cmdline.status
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Jun 2015 23:08:27 +0900] rev 25628
templates: fix missing closing brace in map-cmdline.status Currently the parser does not validate the last closing brace, but future patches will make it less permissive for this kind of syntax errors.
Fri, 19 Jun 2015 12:00:06 -0500 verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com> [Fri, 19 Jun 2015 12:00:06 -0500] rev 25627
verify: clarify misleading fncache message This is a message about cache corruption, not repository corruption or actually missing files. Fix message and reduce to a warning.
Fri, 19 Jun 2015 11:07:15 -0700 phase: add a pointer to 'hg help phases' in the 'phase' help
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 19 Jun 2015 11:07:15 -0700] rev 25626
phase: add a pointer to 'hg help phases' in the 'phase' help The command and the general topic have very similar name. The topic is pointing to the command, but the command was not pointing to the topic.
Thu, 18 Jun 2015 15:39:52 -0500 publishing: unconditionally trust publishing flag
Matt Mackall <mpm@selenic.com> [Thu, 18 Jun 2015 15:39:52 -0500] rev 25625
publishing: unconditionally trust publishing flag Unfortunately, there are currently no tests for this behavior because we lack a good way of testing trust.
Thu, 18 Jun 2015 15:34:22 -0500 publishing: use new helper method
Matt Mackall <mpm@selenic.com> [Thu, 18 Jun 2015 15:34:22 -0500] rev 25624
publishing: use new helper method
Thu, 18 Jun 2015 15:33:24 -0500 publishing: add helper method to localrepo
Matt Mackall <mpm@selenic.com> [Thu, 18 Jun 2015 15:33:24 -0500] rev 25623
publishing: add helper method to localrepo
Wed, 10 Jun 2015 19:18:51 -0700 revset: make use of natively-computed set for 'draft()' and 'secret()'
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Jun 2015 19:18:51 -0700] rev 25622
revset: make use of natively-computed set for 'draft()' and 'secret()' If the computation of a set for each phase (done in C) is available, we use it directly instead of applying a simple filter. This give a massive speed-up in the vast majority of cases. On my mercurial repo with about 15000 out of 40000 draft changesets: revset: draft() plain min first last 0) 0.011201 0.019950 0.009844 0.000074 1) 0.000284 2% 0.000312 1% 0.000314 3% 0.000315 x4.3 Bad performance for "last" come from the handling of the 15000 elements set (memory allocation, filtering hidden changesets (99% of it) etc. compared to applying the filter only on a handfuld of revisions (the first draft changesets being close of tip). This is not seen as an issue since: * Timing is still pretty good and in line with all the other one, * Current user of Vanilla Mercurial will not have 1/3 of their repo draft, This bad effect disappears when phase's set is smaller. (about 200 secrets): revset: secret() plain min first last 0) 0.011181 0.022228 0.010851 0.000452 1) 0.000058 0% 0.000084 0% 0.000087 0% 0.000087 19%
Wed, 17 Jun 2015 19:19:57 -0700 revset: refactor the non-public phase code
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Jun 2015 19:19:57 -0700] rev 25621
revset: refactor the non-public phase code Code for draft and secret are the same. We'll make it more complex to take advantages of the set recomputed in C, so we first refactor the code to only have one place to update (and make sure all behave properly). We do not refactor the 'public()' code because it does not have a natively computed set.
Tue, 16 Jun 2015 19:47:46 -0700 revset: translate node directly with changelog in 'head'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 19:47:46 -0700] rev 25620
revset: translate node directly with changelog in 'head' Using 'repo[X]' is much slower because it creates a 'changectx' object and goes though multiple layers of code to do so. It is also error prone if there is tags, bookmarks, branch or other names that could map to a node hash and take precedence (user are wicked). This provides a significant performance boost on repository with a lot of heads. Benchmark result for a repo with 1181 heads. revset: head() plain min last reverse 0) 0.014853 0.014371 0.014350 0.015161 1) 0.001402 9% 0.000975 6% 0.000874 6% 0.001415 9% revset: head() - public() plain min last reverse 0) 0.015121 0.014420 0.014560 0.015028 1) 0.001674 11% 0.001109 7% 0.000980 6% 0.001693 11% revset: draft() and head() plain min last reverse 0) 0.015976 0.014490 0.014214 0.015892 1) 0.002335 14% 0.001018 7% 0.000887 6% 0.002340 14% The speed up is visible even when other more costly revset are in use revset: head() and author("mpm") plain min last reverse 0) 0.105419 0.090046 0.017169 0.108180 1) 0.090721 86% 0.077602 86% 0.003556 20% 0.093324 86%
Wed, 10 Jun 2015 19:58:27 -0700 revset: use a baseset in _notpublic()
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Jun 2015 19:58:27 -0700] rev 25619
revset: use a baseset in _notpublic() The '_notpublic()' internal revset was "returning" a set. That was wrong. We now return a 'baseset' as appropriate. This has no effect on performance in most case, because we do the exact same operation than what the combination with a 'fullreposet' was doing. This as a small effect on some operation when combined with other set, because we now apply the filtering in all cases. I think the correctness is worth the impact on some corner cases. The optimizer should take care of these corner cases anyway. revset #0: not public() plain min max first last reverse 0) 0.000465 0.000491 0.000495 0.000500 0.000494 0.000479 1) 0.000484 0.000503 0.000498 0.000505 0.000504 0.000491 revset #1: (tip~1000::) - public() plain min max first last reverse 0) 0.002765 0.001742 0.002767 0.001730 0.002761 0.002782 1) 0.002847 0.001777 0.002776 0.001741 0.002764 0.002858 revset #2: not public() and branch("default") plain min max first last reverse 0) 0.012104 0.011138 0.011189 0.011138 0.011166 0.011578 1) 0.011387 94% 0.011738 105% 0.014220 127% 0.011223 0.011184 0.012077 revset #3: (not public() - obsolete()) plain min max first last reverse 0) 0.000583 0.000556 0.000552 0.000555 0.000552 0.000610 1) 0.000613 105% 0.000559 0.000557 0.000573 0.000558 0.000613 revset #4: head() - public() plain min max first last reverse 0) 0.010869 0.010800 0.011547 0.010843 0.010891 0.010891 1) 0.011031 0.011497 106% 0.011087 0.011100 0.011100 0.011085
Wed, 17 Jun 2015 16:29:46 -0700 contrib: clean up all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 17 Jun 2015 16:29:46 -0700] rev 25618
contrib: clean up all-revsets.txt file I forgot to cleanup a handful of them when I originally created the file.
Thu, 18 Jun 2015 17:06:18 +0800 hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jun 2015 17:06:18 +0800] rev 25617
hgweb: link to revision by node hash in paper & coal Unlike other styles, paper and coal had only one link to current revision: in the sidebar. Since those links now use symbolic revisions after 3bb6f5f478a7, it's nice to have a link that allows going from /rev/tip to /rev/<tip hash>, for instance. Let's make the node hash in the page header that new link.
Thu, 18 Jun 2015 16:14:10 +0800 hgweb: link to revision by node hash in gitweb & monoblue
Anton Shestakov <av6@dwimlabs.net> [Thu, 18 Jun 2015 16:14:10 +0800] rev 25616
hgweb: link to revision by node hash in gitweb & monoblue This allows going from /rev/tip to /rev/<tip hash> with ease.
Tue, 16 Jun 2015 23:14:45 -0400 archive: report the node as "{p1node}+" when archiving a dirty wdir()
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:14:45 -0400] rev 25615
archive: report the node as "{p1node}+" when archiving a dirty wdir() This is more useful than reporting all 'f's, allowing the archive to be diffed against a specific revision to see what changed.
Mon, 15 Jun 2015 16:06:17 -0700 phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:06:17 -0700] rev 25614
phase: remove a 'for x in "foo bar".split()' idiom in phasecache.replace I find this idiom fairly horrible.
Mon, 15 Jun 2015 16:06:24 -0700 phase: document the replace method
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:06:24 -0700] rev 25613
phase: document the replace method This is a minor documentation update to answer a co-worker question.
Mon, 15 Jun 2015 16:16:02 -0700 revset: ensure we have loaded phases data in '_notpublic()'
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:16:02 -0700] rev 25612
revset: ensure we have loaded phases data in '_notpublic()' If we are the very first rev access (or if the phase cache just got invalidated) the phasesets will be None even if we support the native computation. So we explicitly trigger a computation if needed. This was not an issue before because requesting any phase information would have triggered such computation.
Mon, 15 Jun 2015 16:04:14 -0700 phase: rename getphaserevs to loadphaserevs
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:04:14 -0700] rev 25611
phase: rename getphaserevs to loadphaserevs This function is: - already loading the data in place, - used once in the code. So we drop the return value and change the name to make this obvious. We keep the function public because we'll have to use it in revset.
Wed, 17 Jun 2015 16:45:25 -0400 test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10
Matt Harbison <mharbison@attotech.com> [Wed, 17 Jun 2015 16:45:25 -0400] rev 25610
test-subrepo-recursion: more aggressively regex 'unzip -l' output for 10.10 The output on 10.10 looks like this: Length Date Time Name -------- ---- ---- ---- 172 01-01-80 00:00 .hg_archival.txt 10 01-01-80 00:00 .hgsub 45 01-01-80 00:00 .hgsubstate 3 01-01-80 00:00 x.txt 10 01-01-80 00:00 foo/.hgsub 45 01-01-80 00:00 foo/.hgsubstate 9 01-01-80 00:00 foo/y.txt 9 01-01-80 00:00 foo/bar/z.txt -------- ------- 303 8 files (2 digit year, shorter -- separators and closer columns). We don't care about any of that, so ignore it.
Tue, 16 Jun 2015 22:15:30 -0700 contrib: introduce an all-revsets.txt file
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 22:15:30 -0700] rev 25609
contrib: introduce an all-revsets.txt file This file should gather all revsets ever thought interesting by anyone. That way one can check the impact of a change when touching something revset-ish. See inline comments for details. This file have been refilled with all the entry I could automatically find from changeset descriptions. I assume we missed some not using 'revsetbenchmarks.py' output.
Tue, 16 Jun 2015 20:36:00 -0700 contrib: rename revsetbenchmarks.txt to 'base-revsets.txt'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 20:36:00 -0700] rev 25608
contrib: rename revsetbenchmarks.txt to 'base-revsets.txt' We rename the file and document its purpose. We'll be introducing another file gathering revsets useful for benchmark of the predicate themsleves in a coming changesets.
Tue, 16 Jun 2015 20:24:37 -0700 revsetbenchmarks: add main documention for the script
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 16 Jun 2015 20:24:37 -0700] rev 25607
revsetbenchmarks: add main documention for the script This allow us to document the fact we can use comment in the file listing revsets.
Tue, 16 Jun 2015 16:07:39 +0800 hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 16:07:39 +0800] rev 25606
hgweb: don't dereference symbolic revision in paper & coal style (issue2296) Let's make paper (and coal, since it borrows so much from paper) templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 14:37:53 +0800 hgweb: don't dereference symbolic revision in gitweb style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 14:37:53 +0800] rev 25605
hgweb: don't dereference symbolic revision in gitweb style Let's make gitweb templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 13:59:49 +0800 hgweb: don't dereference symbolic revision in monoblue style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 13:59:49 +0800] rev 25604
hgweb: don't dereference symbolic revision in monoblue style Let's make monoblue templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes. Some pages don't have permanent links to current node hash (so it's not very easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future patches.
Tue, 16 Jun 2015 11:52:10 +0800 hgweb: don't dereference symbolic revision in spartan style
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 11:52:10 +0800] rev 25603
hgweb: don't dereference symbolic revision in spartan style Let's make spartan templates use symbolic revision in navigation links. The majority of links (log, filelog, annotate, etc) still use node hashes, and many pages also have permanent link to current node hash (i.e. you can go from /rev/tip to /rev/<tip hash> without manual url editing), so it's safe to update navigation.
Tue, 16 Jun 2015 02:07:25 +0800 hgweb: provide symrev (symbolic revision) property to the templates
Anton Shestakov <av6@dwimlabs.net> [Tue, 16 Jun 2015 02:07:25 +0800] rev 25602
hgweb: provide symrev (symbolic revision) property to the templates One of the features of hgweb is that current position in repo history is remembered between separate requests. That is, links from /rev/<node_hash> lead to /file/<node_hash> or /log/<node_hash>, so it's easy to dig deep into the history. However, such links could only use node hashes and local revision numbers, so while staying at one exact revision is easy, staying on top of the changes is not, because hashes presumably can't change (local revision numbers can, but probably not in a way you'd find useful for navigating). So while you could use 'tip' or 'default' in a url, links on that page would be permanent. This is not always desired (think /rev/tip or /graph/stable or /log/@) and is sometimes just confusing (i.e. /log/<not the tip hash>, when recent history is not displayed). And if user changed url deliberately to say default instead of <some node hash>, the page ignores that fact and uses node hash in its links, which means that navigation is, in a way, broken. This new property, symrev, is used for storing current revision the way it was specified, so then templates can use it in links and thus "not dereference" the symbolic revision. It is an additional way to produce links, so not every link needs to drop {node|short} in favor of {symrev}, many will still use node hash (log and filelog entries, annotate lines, etc). Some pages (e.g. summary, tags) always use the tip changeset for their context, in such cases symrev is set to 'tip'. This is needed in case the pages want to provide archive links. highlight extension needs to be updated, since _filerevision now takes an additional positional argument (signature "web, req, tmpl" is used by most of webcommands.py functions). More references to symbolic revisions and related gripes: issue2296, issue2826, issue3594, issue3634.
Tue, 16 Jun 2015 23:06:57 -0400 archive: support 'wdir()'
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:06:57 -0400] rev 25601
archive: support 'wdir()' This is a step toward replacing the extdiff internals with archive, in order to support 'extdiff -S'. Only Mercurial subrepos are supported for now. If a file is missing from the filesystem, it is silently skipped. Perhaps it should warn, but it cannot abort when working with extdiff because deleting a file is a legitimate diff.
Tue, 16 Jun 2015 23:03:36 -0400 subrepo: allow a representation of the working directory subrepo
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 23:03:36 -0400] rev 25600
subrepo: allow a representation of the working directory subrepo Some code cannot handle a subrepo based on the working directory (e.g. sub.dirty()), so the caller must opt in. This will be useful for archive, and perhaps some other commands. The git and svn methods where this is used may need to be fixed up on a case by case basis.
Tue, 16 Jun 2015 22:13:19 +0900 templater: comment that gettemplate() has different name resolution order
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Jun 2015 22:13:19 +0900] rev 25599
templater: comment that gettemplate() has different name resolution order I've tried to unify gettemplate() with buildtemplate(), but it didn't go well because gettemplate() have to bypass mapping dict. For example, web templates have '{tags%changelogtag}' and 'changelogtag' is defined in both mapping, the default, and context.cache, sourced from map file. In general, mapping shadows context variables, but gettemplate() have to pick it from context.cache.
Sat, 13 Jun 2015 20:23:52 +0900 templater: drop strtoken argument from compiletemplate()
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 20:23:52 +0900] rev 25598
templater: drop strtoken argument from compiletemplate() There's no "rawstring" template now.
Wed, 10 Jun 2015 21:44:43 +0900 templater: do not reevaluate rawstring as template (BC)
Yuya Nishihara <yuya@tcha.org> [Wed, 10 Jun 2015 21:44:43 +0900] rev 25597
templater: do not reevaluate rawstring as template (BC) The previous patch made 'string' is always interpreted as a template. So this patch removes the special handling of r'rawstring' instead. Now r'' disables template processing at all.
Sat, 13 Jun 2015 19:49:54 +0900 templater: take any string literals as template, but not for rawstring (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 19:49:54 +0900] rev 25596
templater: take any string literals as template, but not for rawstring (BC) This patch series is intended to unify the interpretation of string literals. It is breaking change that boldly assumes a. string literal "..." never contains template-like fragment or it is intended to be a template b. we tend to use raw string literal r"..." for regexp pattern in which "{" should have different meaning Currently, we don't have a comprehensible rule how string literals are evaluated in template functions. For example, fill() takes "initialindent" and "hangindent" as templates, but not for "text", whereas "text" is a template in pad() function. date(date, fmt) diff(includepattern, excludepattern) fill(text, width, initialident: T, hangindent: T) get(dict, key) if(expr, then: T, else: T) ifcontains(search, thing, then: T, else: T) ifeq(expr1, expr2, then: T, else: T) indent(text, indentchars, firstline) join(list, sep) label(label: T, expr: T) pad(text: T, width, fillchar, right) revset(query, formatargs...]) rstdoc(text, style) shortest(node, minlength) startswith(pattern, text) strip(text, chars) sub(pattern, replacement, expression: T) word(number, text, separator) expr % template: T T: interpret "string" or r"rawstring" as template This patch series adjusts the rule as follows: a. string literal, '' or "", starts template processing (BC) b. raw string literal, r'' or r"", disables both \-escape and template processing (BC, done by subsequent patches) c. fragment not surrounded by {} is non-templated string "ccc{'aaa'}{r'bbb'}" ------------------ *: template --- c: string --- a: template --- b: rawstring Because this can eliminate the compilation of template arguments from the evaluation phase, "hg log -Tdefault" gets faster. % cd mozilla-central % LANG=C HGRCPATH=/dev/null hg log -Tdefault -r0:10000 --time > /dev/null before: real 4.870 secs (user 4.860+0.000 sys 0.010+0.000) after: real 3.480 secs (user 3.440+0.000 sys 0.030+0.000) Also, this will allow us to parse nested templates at once for better error indication.
Sat, 13 Jun 2015 00:15:22 +0900 templater: move runtemplate function out of buildmap/runmap pair
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 00:15:22 +0900] rev 25595
templater: move runtemplate function out of buildmap/runmap pair The next patch will introduce buildtemplate function that should be defined near runtemplate. But I don't want to insert it between buildmap and runmap.
Mon, 15 Jun 2015 16:08:22 -0700 phase: also overwrite phase's sets when replacing a phasecache
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 16:08:22 -0700] rev 25594
phase: also overwrite phase's sets when replacing a phasecache We need to copy this new attributes around too. This fix an issue where phases data used by 'not public()' were not invalidated properly.
Mon, 15 Jun 2015 15:57:47 -0700 phase: invalidate the phase's set cache alongside the revs
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 15:57:47 -0700] rev 25593
phase: invalidate the phase's set cache alongside the revs Invalidate was leaving set data around leading to possible bugs in revset.
Mon, 15 Jun 2015 15:52:52 -0700 phase: also copy phase's sets when copying phase cache
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 15 Jun 2015 15:52:52 -0700] rev 25592
phase: also copy phase's sets when copying phase cache We forgot to add such copy when we added the attributes.
Tue, 16 Jun 2015 16:15:15 -0400 verify: check the subrepository references in .hgsubstate
Matt Harbison <matt_harbison@yahoo.com> [Tue, 16 Jun 2015 16:15:15 -0400] rev 25591
verify: check the subrepository references in .hgsubstate While hopefully atypical, there are reasons that a subrepository revision can be lost that aren't covered by corruption of the .hgsubstate revlog. Such things can happen when a subrepo is amended, stripped or simply isn't pulled from upstream because the parent repo revision wasn't updated yet. There's no way to know if it is an error, but this will find potential problems sooner than when some random revision is updated. Until recently, convert made no attempt at rewriting the .hgsubstate file. The impetuous for this is to verify the conversion of some repositories, and this is orders of magnitude faster than a bash script from 0..tip that does an 'hg update -C $rev'. But it is equally useful to determine if everything has been pulled down before taking a thumb drive on the go. It feels somewhat wrong to leave this out of verifymod (mostly because the file is already read in there, and the final summary is printed before the subrepos are checked). But verifymod looks very low level, so importing subrepo stuff there seems more wrong.
Sun, 14 Jun 2015 22:04:17 -0400 context: override workingctx.hex() to avoid a crash
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jun 2015 22:04:17 -0400] rev 25590
context: override workingctx.hex() to avoid a crash Since node is None for workingctx, it can't use the base class implementation of 'hex(self.node())'. It doesn't appear that there are any current callers of this, but there will be when archive supports 'wdir()'. My first thought was to use "{p1node}+", but that would cause headaches elsewhere [1]. We should probably fix up localrepository.__getitem__ to accept this hash for consistency, as a followup. This works, if the full hash is specified: @@ -480,7 +480,7 @@ return dirstate.dirstate(self.vfs, self.ui, self.root, validate) def __getitem__(self, changeid): - if changeid is None: + if changeid is None or changeid == 'ff' * 20: return context.workingctx(self) if isinstance(changeid, slice): return [context.changectx(self, i) That differs from null, where it will accept any number of 0s, as long as it isn't ambiguous. [1] https://www.selenic.com/pipermail/mercurial-devel/2015-June/071166.html
Mon, 15 Jun 2015 16:50:31 -0400 convert: update 'intermediate-source' in the destination's extras dictionary
Matt Harbison <matt_harbison@yahoo.com> [Mon, 15 Jun 2015 16:50:31 -0400] rev 25589
convert: update 'intermediate-source' in the destination's extras dictionary
Tue, 16 Jun 2015 23:06:30 +0900 check-code: ban use of '[[ ]]' in tests
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Jun 2015 23:06:30 +0900] rev 25588
check-code: ban use of '[[ ]]' in tests
Tue, 16 Jun 2015 22:47:05 +0900 test-fileset: remove bashism, use test instead of '[[ ]]'
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Jun 2015 22:47:05 +0900] rev 25587
test-fileset: remove bashism, use test instead of '[[ ]]' Debian dash complains about it. $TESTTMP.sh: 213: $TESTTMP.sh: [[: not found
Wed, 03 Jun 2015 18:30:25 +0800 tests: test symbolic revision (de)reference in all hgweb styles
Anton Shestakov <engored@ya.ru> [Wed, 03 Jun 2015 18:30:25 +0800] rev 25586
tests: test symbolic revision (de)reference in all hgweb styles Right now the way revisions get specified in hgweb urls is ignored, i.e. after revision is resolved, only its node hash (or sometimes local revision number) is used for all links in the templates. So, basically, every page for "tip" revision (or any other symbolic rev id) will dereference it: lose the nice symbolic name by putting node hash/local rev number in its place. The only exception so far is archive links on some pages: /archive/tip.{bz2,gz,zip}. The fact that this dereferencing is neither convenient nor intuitive is reflected in issue2296, issue2826 and issue3594. issue3634 also mentions this. But to fix this it's first needed to demonstrate and test the way templates currently form links. The new test file is separate from other hgweb tests, since it seems big and distinct enough. And it's so big because links are formed in each template independently, so it's necessary to test them all to avoid any inconsistent behavior.
Tue, 16 Jun 2015 00:46:01 -0700 dirstate: use a presized dict for the dirstate
Siddharth Agarwal <sid0@fb.com> [Tue, 16 Jun 2015 00:46:01 -0700] rev 25585
dirstate: use a presized dict for the dirstate This uses a simple heuristic to avoid expensive resizes. On a real-world repo with around 400,000 files, perfdirstate: before: ! wall 0.155562 comb 0.160000 user 0.150000 sys 0.010000 (best of 64) after: ! wall 0.132638 comb 0.130000 user 0.120000 sys 0.010000 (best of 75) On another real-world repo with around 250,000 files: before: ! wall 0.098459 comb 0.100000 user 0.090000 sys 0.010000 (best of 100) after: ! wall 0.089084 comb 0.090000 user 0.080000 sys 0.010000 (best of 100)
Mon, 15 Jun 2015 22:41:30 -0700 parsers: add an API to create a new presized dict
Siddharth Agarwal <sid0@fb.com> [Mon, 15 Jun 2015 22:41:30 -0700] rev 25584
parsers: add an API to create a new presized dict
Mon, 15 Jun 2015 22:37:33 -0700 parsers: factor out code to create a presized dict
Siddharth Agarwal <sid0@fb.com> [Mon, 15 Jun 2015 22:37:33 -0700] rev 25583
parsers: factor out code to create a presized dict In upcoming patches we'll expose this as an API.
Mon, 15 Jun 2015 22:29:29 -0700 parsers: drop Python 2.4 compat in make_file_foldmap
Siddharth Agarwal <sid0@fb.com> [Mon, 15 Jun 2015 22:29:29 -0700] rev 25582
parsers: drop Python 2.4 compat in make_file_foldmap
Tue, 16 Jun 2015 14:11:58 -0400 progress: respect ui.quiet (issue4726)
Augie Fackler <augie@google.com> [Tue, 16 Jun 2015 14:11:58 -0400] rev 25581
progress: respect ui.quiet (issue4726) Caught when I was running the hgsubversion testsuite and it started printing progress bars over top of my test output lines.
Mon, 15 Jun 2015 13:31:22 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 15 Jun 2015 13:31:22 -0500] rev 25580
merge with stable
Wed, 27 May 2015 13:22:48 -0700 match: don't remove '.' from _includeroots
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 May 2015 13:22:48 -0700] rev 25579
match: don't remove '.' from _includeroots This makes _includeroots more like _fileroots and gives visitdir() a nice symmetry in the two. I'm hoping to later combine the two (_fileroots and _includeroots), and having them treated similarly should make that step easier to follow.
Sun, 31 May 2015 13:17:41 -0700 match: join two nested if-blocks
Martin von Zweigbergk <martinvonz@google.com> [Sun, 31 May 2015 13:17:41 -0700] rev 25578
match: join two nested if-blocks Instead of if a: if b: return False let's write it if a and b: return False
Wed, 27 May 2015 11:47:55 -0700 match: drop optimization (?) of 'parentdirs' calculation
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 May 2015 11:47:55 -0700] rev 25577
match: drop optimization (?) of 'parentdirs' calculation It seems unlikely that the optimization to avoid calling util.finddirs twice will be noticeable, so let's drop it. This makes the two conditions for includes and regular patterns more similar.
Wed, 27 May 2015 09:34:00 -0700 match: break boolean expressions into one operand per line
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 May 2015 09:34:00 -0700] rev 25576
match: break boolean expressions into one operand per line This makes it much easier to spot both the operators ('and'/'or') and the operands.
Wed, 27 May 2015 13:23:35 -0700 match: drop unnecessary removal of '.' from excluded roots
Martin von Zweigbergk <martinvonz@google.com> [Wed, 27 May 2015 13:23:35 -0700] rev 25575
match: drop unnecessary removal of '.' from excluded roots The repo root is nothing special when it comes to what directories to visit: patterns like '-X relglob:*.py' should not exclude the top directory, while '-X path:.' should (pointless as such a pattern may be). The explicit removal of '.' from the set of excluded roots was probably there to avoid removing the the root directory when any patterns had been given, but since 20ad936ac5d2 (treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?', 2015-05-27), we only exclude directories that should be completely excluded, so we no longer need to special-case the root directory.
Fri, 12 Jun 2015 11:00:50 -0700 changegroup: simplify by not reusing 'prog(ress)' instance
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Jun 2015 11:00:50 -0700] rev 25574
changegroup: simplify by not reusing 'prog(ress)' instance Just create a new instance of the 'prog' class for each step instead of replacing its fields and resetting the counter.
Fri, 12 Jun 2015 10:54:10 -0700 changegroup: don't use 'repo' for non-repo 'self'
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Jun 2015 10:54:10 -0700] rev 25573
changegroup: don't use 'repo' for non-repo 'self' 'repo' is a very confusing name to use for 'self', especially when it's not a repo. Also drop repo.ui member (a.k.a. self.ui) now that 'self' doesn't shadow outer 'repo' variable.
Sun, 14 Jun 2015 21:51:57 -0400 subrepo: introduce hgsubrepo._getctx()
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jun 2015 21:51:57 -0400] rev 25572
subrepo: introduce hgsubrepo._getctx() This code is already used in a couple of places, and will need to be used in others where wdir() support is needed. Trying to get the wdir() revision stored in self._substate[1] when creating the object in subrepo.subrepo() resulted in breaking various status and diff tests. This is a far less invasive change.
Sun, 14 Jun 2015 13:08:11 -0400 convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jun 2015 13:08:11 -0400] rev 25571
convert: apply the appropriate phases to the destination (issue4165) If the conversion doesn't change the hash, and the cset is public in the source, it should be public in the destination. (This can happen if file remapping is done that doesn't affect the initial commits.) This also propagates the secret phase from the source, regardless of the hash, because presumably the content is what is secret. Otherwise, the destination commit stays in the draft phase. Maybe any draft cset with an unchanged hash should be changed to public, because it has effectively been shared, but convert pretty strongly implies throwing away (or at least readonly archiving) the source repo. The change in the rollback output is because the name of the outer transaction is now 'convert', which seems more accurate. Unfortunately, the memctx won't indicate the hash prior to committing, so the proper phase can't be applied with the commit. The repo is already write locked in mercurial_sink.before().
Sun, 14 Jun 2015 13:04:00 -0400 convert: always track the hg source revision in the internal commit object
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jun 2015 13:04:00 -0400] rev 25570
convert: always track the hg source revision in the internal commit object This will be needed in the next patch to determine if phases need to be adjusted. The insertion of the source revision in 'extras{}' is still controlled by the config property.
Sat, 13 Jun 2015 00:51:43 -0700 repoview: invalidate 'visible' filtered revisions when bookmarks change
Laurent Charignon <lcharignon@fb.com> [Sat, 13 Jun 2015 00:51:43 -0700] rev 25569
repoview: invalidate 'visible' filtered revisions when bookmarks change Context: the result of computehidden, used to compute the 'visible' revisions is cached. Its output can change when: 1) new obsolete commits are created 2) new bookmarks are created or deleted 3) new tags are created or deleted 4) the parents of the working copy change We currently correctly invalidate the cache only in the case 1). This patch fixes the second case (bookmarks) by invalidating the cache once a bookmark is added or removed.
Fri, 12 Jun 2015 22:09:41 -0400 ui: flush stderr after printing a non-chained exception for Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Jun 2015 22:09:41 -0400] rev 25568
ui: flush stderr after printing a non-chained exception for Windows There were consistent test failures in test-bad-extension.t, because Windows buffers stderr when redirected to a file (per the comment in ui.write_err()). That resulted in failures like this: --- c:/Users/Matt/Projects/hg/tests/test-bad-extension.t +++ c:/Users/Matt/Projects/hg/tests/test-bad-extension.t.err @@ -23,11 +23,11 @@ Traceback (most recent call last): Exception: bit bucket overflow *** failed to import extension badext2: No module named badext2 - Traceback (most recent call last): - ImportError: No module named badext2 hg help [-ec] [TOPIC] show help for a given topic or a help overview + Traceback (most recent call last): + ImportError: No module named badext2 show traceback for ImportError of hgext.name if debug is set (note that --debug option isn't applied yet when loading extensions) Instead of inserting another flush immediately after the print, to go along with the one recently added prior to the print (see 3ff4b07412ad), funnel the output through ui.write_err(). The flush prior to printing the traceback only mentions that stdout needs to be flushed, and only stderr needs to be flushed after printing the traceback. ui.write_err() does both for us without needing to redocument the quirky Windows behavior. It will also clear any progress bar.
Thu, 11 Jun 2015 19:02:24 -0700 revset: use parentsets.min in _children
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 19:02:24 -0700] rev 25567
revset: use parentsets.min in _children As stated in the comment, using the smartset 'min' will give more opportunity to be smart. It give a small but significant boost to the performance. Most of the time is still spend doing the actual computation but at least we can scrap some performance when it makes sense. revset #0: roots(0:tip) plain 0) 0.046600 1) 0.044109 94%
Thu, 11 Jun 2015 11:42:46 -0700 revset: prefetch all attributes before loop in _revsbetween
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 11:42:46 -0700] rev 25566
revset: prefetch all attributes before loop in _revsbetween Python is slow at attributes lookup. No, really, I mean -slow-. prefetching these three methods give use a measurable performance boost. revset #0: 0::tip plain 0) 0.037655 1) 0.034290 91%
Thu, 07 Feb 2013 00:32:26 +0000 hgweb: add some in-code documentation for 'web.view'
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 07 Feb 2013 00:32:26 +0000] rev 25565
hgweb: add some in-code documentation for 'web.view' This documentation was mostly intended for the user helps. However given the lack of request for such feature, we should keep it un-documented. We stick the help text in the code as it could still be useful to fellow contributors.
Thu, 11 Jun 2015 17:19:48 -0700 bookmark: informs of failure to upgrade a bookmark
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 17:19:48 -0700] rev 25564
bookmark: informs of failure to upgrade a bookmark When we explicitly requested to update a bookmark but the bookmark location was missing locally, we used to silently ignore the case. We now issue a message about it to point that something wrong is going on. By chance, we fixed all the cases where is case happened (for explicit pulling only, issue4700 is still open). But I think it is still valuable to have a warning in place in case such issue is reintroduced. This patch have been tested against issue4689 test (but without issue4689 fix). It give the better but expected failure seen below: > --- /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t > +++ /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t.err > @@ -337,12 +337,12 @@ > adding manifests > adding file changes > added 1 changesets with 1 changes to 1 files > - updating bookmark Y > + remote bookmark Y point to locally missing 0d60821d2197 > (run 'hg update' to get a working copy) > $ hg book > * @ 1:0d2164f0ce0d > X 1:0d2164f0ce0d > - Y 5:35d1ef0a8d1b > + Y 4:b0a5eff05604 > Z 1:0d2164f0ce0d > > Update a bookmark right after the initial lookup -r (issue4700) > @@ -387,12 +387,11 @@ > adding manifests > adding file changes > added 1 changesets with 1 changes to 1 files > - updating bookmark Y > (run 'hg update' to get a working copy) > $ hg book > * @ 1:0d2164f0ce0d > X 1:0d2164f0ce0d > - Y 6:0d60821d2197 > + Y 4:b0a5eff05604 > Z 1:0d2164f0ce0d > $ hg -R $TESTTMP/pull-race book > @ 1:0d2164f0ce0d
Thu, 11 Jun 2015 08:54:24 -0400 fancyopts: allow all callable as default parameter value
introom <i@introo.me> [Thu, 11 Jun 2015 08:54:24 -0400] rev 25563
fancyopts: allow all callable as default parameter value The current fancyopts allows function as default parameter value but not other callables. By supporting other callables, we can have the benefits of e.g., custom __str__ method, which will be printed by 'hg help' as the default value.
Sat, 13 Jun 2015 20:14:22 +0900 templater: evaluate arguments passed to diff() appropriately stable
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 20:14:22 +0900] rev 25562
templater: evaluate arguments passed to diff() appropriately Before this patch, diff() crashed by passing non-string expression because it didn't evaluate arguments at all.
Fri, 12 Jun 2015 14:43:59 -0700 parsers: do not cache RevlogError type (issue4451) stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Jun 2015 14:43:59 -0700] rev 25561
parsers: do not cache RevlogError type (issue4451) Index lookups raise RevlogError when the lookup fails. The previous implementation was caching a reference to the RevlogError type in a static variable. This assumed that the "mercurial.error" module was only loaded once and there was only a single copy of it floating around in memory. Unfortunately, in some situations - including certain mod_wsgi configurations - this was not the case: the "mercurial.error" module could be reloaded. It was possible for a "RevlogError" reference from the first interpreter to be used by a second interpreter. While the underlying thing was a "mercurial.error.RevlogError," the object IDs were different, so the Python code in revlog.py was failing to catch the exception! This error has existed since the C index lookup code was implemented in changeset e8d37b78acfb, which was first released in Mercurial 2.2 in 2012. http://emptysqua.re/blog/python-c-extensions-and-mod-wsgi/#static-variables-are-shared contains more details. This patch removes the caching of the RevlogError type from the function. Since pretty much the entire function was refactored and the return value of the function wasn't used, I changed the function signature to not return anything. For reasons unknown to me, we were calling PyErr_SetObject() with the type of RevlogError and an instance of RevlogError. This was equivalent to the Python code "raise RevlogError(RevlogError)". This seemed wonky and completely unnecessary. The Python code only cares about the type of the exception, not its contents. So I got rid of this complexity. This is my first Python C extension patch. Please give extra scrutiny to it during review.
Fri, 12 Jun 2015 16:11:42 -0400 largefiles: restore the original converter class after lfconvert --to-normal
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Jun 2015 16:11:42 -0400] rev 25560
largefiles: restore the original converter class after lfconvert --to-normal Not sure how much this really matters, but much of the largefiles code that monkey-patches like this restores things when it finishes.
Thu, 11 Jun 2015 13:02:21 -0700 push: only say we are trying to push obsmarkers when we actually try
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 13:02:21 -0700] rev 25559
push: only say we are trying to push obsmarkers when we actually try The message was issued unconditionally. Move it inside the `if` that actually tries to push obsmarkers.
Fri, 29 May 2015 13:25:34 -0400 convert: support incremental conversion with hg subrepos
Matt Harbison <matt_harbison@yahoo.com> [Fri, 29 May 2015 13:25:34 -0400] rev 25558
convert: support incremental conversion with hg subrepos This was implied in issue3486, which specifically asked for subrepo support in lfconvert. Now that lfconvert uses the convert extension internally when going to normal files, the issue is half fixed. But now even non largefile repos benefit when other transformations are needed. Supporting a full subrepo tree conversion from a single command doesn't seem reasonable, given the number of options that can be provided, and the transformations that would need to occur when entering a subrepo (consider 'filemap' paths). Instead, this allows the user to incrementally convert each hg subrepo from bottom up like so: # so convert knows the dest type when it sees a non empty dest dir $ hg init converted $ hg convert orig/sub1 converted/sub1 $ hg convert orig/sub2 converted/sub2 $ hg convert orig converted This allows different options to be applied to different subrepos more readily. It assumes the shamap is in the default location in each converted subrepo for simplicity. It also allows for a subrepo to be cloned into place, in case _it_ doesn't need a conversion. I was able to convert away from using largefiles/bfiles in several subrepos with this mechanism.
Fri, 05 Jun 2015 13:41:14 -0700 crecord: exit edition of hunk with non-zero status does not interrupt session
Laurent Charignon <lcharignon@fb.com> [Fri, 05 Jun 2015 13:41:14 -0700] rev 25557
crecord: exit edition of hunk with non-zero status does not interrupt session Before this patch, when editing a hunk, if the editor was exiting with a non- zero status the crecord session would be aborted. This patch makes crecord handle the failure and goes back to the state before the failed edition. We use the new error reporting mechanism introduced in the previous patch to notify the user of the issue.
Fri, 05 Jun 2015 13:53:49 -0700 crecord: add mechanism for error reporting
Laurent Charignon <lcharignon@fb.com> [Fri, 05 Jun 2015 13:53:49 -0700] rev 25556
crecord: add mechanism for error reporting Before this patch, there was no way to report errors in the crecord ui. This patch introduces a new variable errorstr. If set, its content replaces the top banner displayed in crecord until a key is pressed.
Fri, 05 Jun 2015 13:32:52 -0700 crecord: extract ui refresh code after editing of hunk in a function
Laurent Charignon <lcharignon@fb.com> [Fri, 05 Jun 2015 13:32:52 -0700] rev 25555
crecord: extract ui refresh code after editing of hunk in a function This is useful to reuse the logic to implement the continuation of the crecord session if the user edits a hunk and the editor exits with a non-zero status.
Thu, 11 Jun 2015 15:45:02 -0700 revset: mark spots that use 'set' instead of 'smartset'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 15:45:02 -0700] rev 25554
revset: mark spots that use 'set' instead of 'smartset' Using smartset is better because we can do more optimisation on it. So we are marking the faulty spot for later processing.
Thu, 11 Jun 2015 15:43:11 -0700 revset: mark spot that feeds a set to a baseset
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 15:43:11 -0700] rev 25553
revset: mark spot that feeds a set to a baseset Sets have non-defined order and this should break stuff, but as we are lucky fullreposet is also broken so the result is "not too bad". We should fix it anyway, but it is too much for my current plate.
Thu, 11 Jun 2015 15:37:17 -0700 revset: mark the fact we should use '&' instead of 'filter' in 'head'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 15:37:17 -0700] rev 25552
revset: mark the fact we should use '&' instead of 'filter' in 'head' I do not have time to fix all this now, let's mark it for later.
Thu, 11 Jun 2015 15:36:03 -0700 revset: gratuitous formating fix in keyword
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 15:36:03 -0700] rev 25551
revset: gratuitous formating fix in keyword You will be aligned.
Thu, 11 Jun 2015 14:27:52 -0700 revset: gratuitous code move in '_children'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 14:27:52 -0700] rev 25550
revset: gratuitous code move in '_children' As 'cs' is empty as the time of the conditional, we can just return an empty 'baseset' and create the variable later.
Thu, 11 Jun 2015 14:26:44 -0700 revset: mark spots that should use 'smartset.min()'
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 14:26:44 -0700] rev 25549
revset: mark spots that should use 'smartset.min()' Using smartset's min will be significantly faster when the input set can provided an optimised answer. I do not have time to fix all of them but I'm marking the spot.
Thu, 11 Jun 2015 14:21:21 -0700 revset: mark the place where we are combining sets in the wrong direction
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 14:21:21 -0700] rev 25548
revset: mark the place where we are combining sets in the wrong direction We should always combine with subset as the left operand (to preserve the order). I do not have time to fix all of them so I'm just marking the spot.
Thu, 11 Jun 2015 14:00:13 -0700 revset: point out wrong behavior in fullreposet
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 14:00:13 -0700] rev 25547
revset: point out wrong behavior in fullreposet I cannot fix all issues in revset because I've got other things to do, but let's write down all the brokenness to help other people reading and fixing.
Wed, 10 Jun 2015 17:33:57 -0700 revsetbenchmarks: also display tag when printing a revision
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 10 Jun 2015 17:33:57 -0700] rev 25546
revsetbenchmarks: also display tag when printing a revision This is usually more useful information than the commit message.
Mon, 27 Oct 2014 13:40:12 +0100 revsetbenchmarks: clean up revsets that achieved with default variants
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 27 Oct 2014 13:40:12 +0100] rev 25545
revsetbenchmarks: clean up revsets that achieved with default variants We remove revset making use of min and max as this is covered by the variants. We could use variant for roots too, but it is not in the default so keep it here.
Tue, 09 Jun 2015 23:49:07 -0700 revsetbenchmarks: use combination variants in default set
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 09 Jun 2015 23:49:07 -0700] rev 25544
revsetbenchmarks: use combination variants in default set Now that we have them, let's make use of them.
Tue, 09 Jun 2015 23:45:34 -0700 revsetbenchmarks: support combining variants with "+"
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 09 Jun 2015 23:45:34 -0700] rev 25543
revsetbenchmarks: support combining variants with "+" We need more advanced variants in some cases. For example, "The last rev of the sorted version". We introduce a syntax for this: `reverse+last` means `last(reverse(REVSET))`.
(0) -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip