Thu, 28 May 2015 20:06:19 -0700 commands: rename current to active in variables and comments
Ryan McElroy <rmcelroy@fb.com> [Thu, 28 May 2015 20:06:19 -0700] rev 25349
commands: rename current to active in variables and comments Today, the terms 'active' and 'current' are interchangeably used throughout the codebase in reference to the active bookmark (the bookmark that will be updated with the next commit). This leads to confusion among developers and users. This patch is part of a series to standardize the usage to 'active' throughout the mercurial codebase and user interface.
Thu, 28 May 2015 20:03:42 -0700 templatekw: introduce active subkeyword from bookmarks keyword
Ryan McElroy <rmcelroy@fb.com> [Thu, 28 May 2015 20:03:42 -0700] rev 25348
templatekw: introduce active subkeyword from bookmarks keyword Today, the terms 'active' and 'current' are interchangeably used throughout the codebase in reference to the active bookmark (the bookmark that will be updated with the next commit). This leads to confusion among developers and users. This patch is part of a series to standardize the usage to 'active' throughout the mercurial codebase and user interface.
Thu, 16 Apr 2015 15:18:59 -0700 bookmarks: name label for active bookmark correctly
Ryan McElroy <rmcelroy@fb.com> [Thu, 16 Apr 2015 15:18:59 -0700] rev 25347
bookmarks: name label for active bookmark correctly Retain old label as well for backwards compatibility. Today, the terms 'active' and 'current' are interchangeably used throughout the codebase in reference to the active bookmark (the bookmark that will be updated with the next commit). This leads to confusion among developers and users. This patch is part of a series to standardize the usage to 'active' throughout the mercurial codebase and user interface.
Sat, 30 May 2015 02:06:09 +0800 tests: descending empty dirs works in all hgweb styles, test them too
Anton Shestakov <engored@ya.ru> [Sat, 30 May 2015 02:06:09 +0800] rev 25346
tests: descending empty dirs works in all hgweb styles, test them too The tested feature was added to multiple hgweb styles in c21d236ca897, but only paper was tested. Let's test everything now, including monoblue, which only got the feature some 6 years late in e50d8b21f4f4.
Sat, 30 May 2015 01:57:19 +0800 tests: actualize the comment in test-hgweb-descend-empties.t
Anton Shestakov <engored@ya.ru> [Sat, 30 May 2015 01:57:19 +0800] rev 25345
tests: actualize the comment in test-hgweb-descend-empties.t The comment came together with the whole test file and the feature (descend empty dirs in hgweb) in c21d236ca897, but for some reason wasn't exactly accurate. Namely, there isn't e1 directory in the test at all, it obviously should say d1; and b1 didn't terminate at level 3, but does now.
Sun, 17 May 2015 15:16:13 +0900 revset: add fast path for _list() of integer revisions
Yuya Nishihara <yuya@tcha.org> [Sun, 17 May 2015 15:16:13 +0900] rev 25344
revset: add fast path for _list() of integer revisions This can greatly speed up chained 'or' of integer revisions. 1) reduce nesting of chained 'or' operations 2) optimize to a list 3) fast path for integer revisions (this patch) revset #0: 0 + 1 + 2 + ... + 1000 1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20) 2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107) 3) wall 0.008371 comb 0.000000 user 0.000000 sys 0.000000 (best of 317) revset #1: sort(0 + 1 + 2 + ... + 1000) 1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) 2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102) 3) wall 0.008418 comb 0.000000 user 0.000000 sys 0.000000 (best of 322) revset #2: first(0 + 1 + 2 + ... + 1000) 1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) 2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106) 3) wall 0.008423 comb 0.010000 user 0.010000 sys 0.000000 (best of 319) But I admit that it is still slower than the spanset. revset #3: 0:1000 3) wall 0.000132 comb 0.000000 user 0.000000 sys 0.000000 (best of 19010)
Sun, 17 May 2015 15:11:38 +0900 revset: optimize 'or' operation of trivial revisions to a list
Yuya Nishihara <yuya@tcha.org> [Sun, 17 May 2015 15:11:38 +0900] rev 25343
revset: optimize 'or' operation of trivial revisions to a list As seen in issue4565 and issue4624, GUI wrappers and automated scripts are likely to generate a long query that just has numeric revisions joined by 'or'. One reason why is that they allows users to choose arbitrary revisions from a list. Because this use case isn't handled well by smartset, let's optimize it to a plain old list. Benchmarks: 1) reduce nesting of chained 'or' operations 2) optimize to a list (this patch) revset #0: 0 + 1 + 2 + ... + 1000 1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20) 2) wall 0.025393 comb 0.020000 user 0.020000 sys 0.000000 (best of 107) revset #1: sort(0 + 1 + 2 + ... + 1000) 1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) 2) wall 0.026432 comb 0.030000 user 0.030000 sys 0.000000 (best of 102) revset #2: first(0 + 1 + 2 + ... + 1000) 1) wall 0.028949 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) 2) wall 0.025503 comb 0.030000 user 0.030000 sys 0.000000 (best of 106)
Fri, 29 May 2015 21:31:00 +0900 revset: make "null" able to appear in internal _list() expression
Yuya Nishihara <yuya@tcha.org> [Fri, 29 May 2015 21:31:00 +0900] rev 25342
revset: make "null" able to appear in internal _list() expression This is the same workaround introduced at e16456831516. Without this patch, "null or x" can't be optimized to _list(null x). Test case will be added by the next patch.
Sun, 24 May 2015 14:49:41 +0900 revset: make internal _list() expression remove duplicated revisions
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 14:49:41 +0900] rev 25341
revset: make internal _list() expression remove duplicated revisions This allows us to optimize chained 'or' operations to _list() expression. Unlike _intlist() or _hexlist(), it's difficult to remove duplicates by the caller of _list() because different symbols can point to the same revision. If the caller knows all symbols are unique, that probably means revisions or nodes are known, therefore, _intlist() or _hexlist() should be used instead. So, it makes sense to check duplicates by _list() function. '%ls' is no longer used in core, this won't cause performance regression.
Sun, 24 May 2015 14:34:12 +0900 repair: use _hexlist() to build revset expression from binary nodes
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 14:34:12 +0900] rev 25340
repair: use _hexlist() to build revset expression from binary nodes _hexlist() should be efficient than _list().
Thu, 28 May 2015 23:49:19 -0700 listkey: display the size of the listkey payload in a debug message
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 28 May 2015 23:49:19 -0700] rev 25339
listkey: display the size of the listkey payload in a debug message This is a useful information to have in general and we already have debug output related to listkeys. I'm planning to play around with massive amount of phases roots and bookmarks so having this data in debug will be very useful. This already got me to spot that one of the Logilab's review repo is exchanging 65KB of phases data during each exchanges.
Fri, 29 May 2015 00:09:36 -0700 ssh: test some no-op pull through ssh with --debug
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 29 May 2015 00:09:36 -0700] rev 25338
ssh: test some no-op pull through ssh with --debug It appears that we are never running any wireprotocol operation with a --debug flag. So we are adding some basic testing into 'test-ssh.t'
Wed, 27 May 2015 06:08:14 -0700 subrepo: detect issue3781 case earlier so it apply to bundle2
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 06:08:14 -0700] rev 25337
subrepo: detect issue3781 case earlier so it apply to bundle2 We are doing some strange special casing of phase push when: - the source is a subrepo - the destination is publishing - some changeset are still draft on the destination In that case we do not push phases information (to publish the draft changesets) because it could break simple cycle of 'clone/pull/push' of subrepos. We have to detect this case earlier to have bundle2 respecting it. We change the test to check the behavior for both bundle1 and bundle2.
Tue, 26 May 2015 23:06:17 -0700 bundle2: hide bundle2 stream debug under a config flag
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:06:17 -0700] rev 25336
bundle2: hide bundle2 stream debug under a config flag The old output is very verbose and unsuitable for general debug level. It is however very useful for debugging bundle2 generation or consumption issues. All this verbose ouput is hidden under a 'devel.bundle2.debug' flag.
Tue, 26 May 2015 23:47:19 -0700 bundle2: add generic debug output regarding processed interruption
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:47:19 -0700] rev 25335
bundle2: add generic debug output regarding processed interruption If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Tue, 26 May 2015 23:58:38 -0700 bundle2: add generic debug output regarding processed part payload
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:58:38 -0700] rev 25334
bundle2: add generic debug output regarding processed part payload If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Tue, 26 May 2015 23:36:31 -0700 bundle2: add generic debug output regarding processed part
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:36:31 -0700] rev 25333
bundle2: add generic debug output regarding processed part If we are about to hide the detailed debug output, we need some generic debug message to replace it.
Wed, 27 May 2015 00:02:49 -0700 bundle2: add generic debug output at the end of bundle processing
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:02:49 -0700] rev 25332
bundle2: add generic debug output at the end of bundle processing If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Wed, 27 May 2015 00:00:35 -0700 bundle2: add generic debug output regarding processed bundle
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:00:35 -0700] rev 25331
bundle2: add generic debug output regarding processed bundle If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Thu, 28 May 2015 20:30:20 -0700 histedit: fix keep during --continue stable
Durham Goode <durham@fb.com> [Thu, 28 May 2015 20:30:20 -0700] rev 25330
histedit: fix keep during --continue The --keep option was being serialized to the state file, but it wasn't actually being used when running a histedit --continue. This fixes that.
Thu, 28 May 2015 16:42:21 -0400 dispatch: disable demandimport for the --debugger option
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 28 May 2015 16:42:21 -0400] rev 25329
dispatch: disable demandimport for the --debugger option Something in Python 2.7.9 or so broke the --debugger option with ui.debugger = ipdb. I get the traceback below. There is some apparent confusion with demandimport. This should be disabled anyway for the --debugger option. The debugger must be imported right away, before any other dispatch. There's no benefit in delaying the debugger import. This patch uses the demandimport.deactivated() context manager. Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 121, in _runcatch debugmod = __import__(debugger) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport return _hgextimport(_import, name, globals, locals, fromlist, level) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/ipdb/__init__.py", line 16, in <module> from ipdb.__main__ import set_trace, post_mortem, pm, run, runcall, runeval, launch_ipdb_on_exception File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 134, in _demandimport mod = _hgextimport(_origimport, name, globals, locals) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/ipdb/__main__.py", line 29, in <module> if IPython.__version__ > '0.10.2': File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 106, in __getattribute__ self._load() File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 78, in _load mod = _hgextimport(_import, head, globals, locals, None, level) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/IPython/__init__.py", line 45, in <module> from .config.loader import Config File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 132, in _demandimport return _origimport(name, globals, locals, fromlist, level) File "/usr/lib/python2.7/dist-packages/IPython/config/__init__.py", line 16, in <module> from .application import * File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport return _hgextimport(_import, name, globals, locals, fromlist, level) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/IPython/config/application.py", line 30, in <module> from IPython.external.decorator import decorator File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 134, in _demandimport mod = _hgextimport(_origimport, name, globals, locals) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/IPython/external/decorator/__init__.py", line 2, in <module> from decorator import * File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 115, in _demandimport return _hgextimport(_import, name, globals, locals, fromlist, level) File "/usr/lib/python2.7/dist-packages/mercurial/demandimport.py", line 47, in _hgextimport return importfunc(name, globals, *args) File "/usr/lib/python2.7/dist-packages/decorator.py", line 240, in <module> 'ContextManager', (_GeneratorContextManager,), dict(__call__=__call__))
Thu, 28 May 2015 16:42:04 -0400 hooks: replace if-try-finally with a "with" statement
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 28 May 2015 16:42:04 -0400] rev 25328
hooks: replace if-try-finally with a "with" statement This seems like a textbook case for the new demandimport.deactivated context manager: check if something must be done, do it, and cleanup at the end regardless of exceptions. The diff isn't as bad as it seems. It's just all the whitespace changes due to needing an extra level of indentation. It looks cleaner with `hg diff -w`.
Thu, 28 May 2015 16:11:26 -0400 demandimport: define a `deactivated` context manager
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 28 May 2015 16:11:26 -0400] rev 25327
demandimport: define a `deactivated` context manager This can be useful for use in "with" blocks for temporarily disabling demandimport.
Thu, 28 May 2015 14:14:11 -0400 largefiles: drop the unused lfcommands._addchangeset()
Matt Harbison <matt_harbison@yahoo.com> [Thu, 28 May 2015 14:14:11 -0400] rev 25326
largefiles: drop the unused lfcommands._addchangeset()
Thu, 28 May 2015 13:34:37 -0400 largefiles: use the convert extension for 'lfconvert --to-normal'
Matt Harbison <matt_harbison@yahoo.com> [Thu, 28 May 2015 13:34:37 -0400] rev 25325
largefiles: use the convert extension for 'lfconvert --to-normal' The logic in the convert extension is more advanced, supporting extra features like converting revision IDs in 'extras' (e.g. 'amend_source'), supports updating hashes in commit messages, and outputs an SHA map file. Rather than try to duplicate all of that, just use the existing code. Even though the convert extension supports user supplied options like filemap, etc, those features aren't available on the lfconvert interface. Therefore, it is safe to use the filemap mechanism (in memory) to handle the standin -> file rename. The convert extension handles the destination locking for this path. There was a comment in test-lfconvert.t about the hash on rev 5 being different because it was doing a better job than "hg remove" + "hg merge" + "hg commit". It isn't clear to me what was happening or why, but now the hashes match the original repo exactly after a roundtrip, which seems like a good idea. If there really was something beneficial about the previous behavior, perhaps merge can be changed so that everyone benefits. Converting to a largefiles repo still uses the original (limited) lfconvert logic.
Wed, 27 May 2015 00:22:29 -0700 bundle2: add generic debug output regarding generated interruption
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:22:29 -0700] rev 25324
bundle2: add generic debug output regarding generated interruption If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Wed, 27 May 2015 00:19:16 -0700 bundle2: add generic debug output regarding generated parts
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:19:16 -0700] rev 25323
bundle2: add generic debug output regarding generated parts If we are about to hide the detailed debug output, we need some generic debug message to replace it in a concise way.
Wed, 27 May 2015 00:10:30 -0700 bundle2: add generic debug output regarding generated bundle
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:10:30 -0700] rev 25322
bundle2: add generic debug output regarding generated bundle If we are about to hide the detailed debug output, we need some generic debug message to replace it in a more compact way.
Wed, 27 May 2015 00:52:01 -0700 bundle2: add debug output for part generation
Pierre-Yves David <pierre-yves.david@fb.com> [Wed, 27 May 2015 00:52:01 -0700] rev 25321
bundle2: add debug output for part generation The part generation process was lacking a ui object and could not produce debug output. It seems valuable to have some debug output on this part too, especially now that we are planning to be able to hide it in the default --debug output.
Tue, 26 May 2015 23:01:39 -0700 bundle2: handle new line in 'indebug' function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:01:39 -0700] rev 25320
bundle2: handle new line in 'indebug' function Now that we have a prefix, it make sense to assume all output will be on a single line.
Tue, 26 May 2015 20:40:21 -0700 bundle2: prefix all unbundling debug message with 'bundle2-input:'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 20:40:21 -0700] rev 25319
bundle2: prefix all unbundling debug message with 'bundle2-input:' This make the origin of the message more explicit.
Tue, 26 May 2015 22:48:52 -0700 bundle2: introduce a specific function for debug messages while unbundling
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 22:48:52 -0700] rev 25318
bundle2: introduce a specific function for debug messages while unbundling The bundling process is very verbose, we would like to be able to hide such output behind a configuration flag and have it more explicitly referencing bundle2. The first step is to gather all these messages in a dedicated function.
Thu, 28 May 2015 10:00:22 -0700 bundle2: add an informative comment to the capability dict
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 28 May 2015 10:00:22 -0700] rev 25317
bundle2: add an informative comment to the capability dict It is fairly easy to get confused by capabilities "missing" from this dict. We make it clear the dict is not the whole story.
Thu, 28 May 2015 16:09:42 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Thu, 28 May 2015 16:09:42 -0500] rev 25316
merge with stable
Tue, 26 May 2015 23:02:19 -0700 bundle2: handle new line in 'outdebug' function
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 23:02:19 -0700] rev 25315
bundle2: handle new line in 'outdebug' function Now that we have a prefix, it make sense to assume all output will be on a single line.
Tue, 26 May 2015 22:57:35 -0700 bundle2: prefix all bundling debug messages with 'bundle2-ouput:'
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 22:57:35 -0700] rev 25314
bundle2: prefix all bundling debug messages with 'bundle2-ouput:' This makes the origin of the message more explicit.
Tue, 26 May 2015 22:49:03 -0700 bundle2: introduce a specific function for bundling debug message
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 22:49:03 -0700] rev 25313
bundle2: introduce a specific function for bundling debug message The bundling process is very verbose, we would like to be able to hide such output behind a configuration flag and have it more explicitly referencing bundle2. The first step is to gather all these messages in a dedicated function. The same gathering will be later do for debug message issue by unbundling.
Wed, 27 May 2015 17:01:43 -0700 parsers: simplify the code computing the phases
Laurent Charignon <lcharignon@fb.com> [Wed, 27 May 2015 17:01:43 -0700] rev 25312
parsers: simplify the code computing the phases We recently simplified the code computing the heads of a repo. This patch uses the same simplification for phase computation. We use index_get_parents instead of replicating its code.
Wed, 27 May 2015 17:00:28 -0700 parsers: move index_get_parents's declaration higher
Laurent Charignon <lcharignon@fb.com> [Wed, 27 May 2015 17:00:28 -0700] rev 25311
parsers: move index_get_parents's declaration higher index_get_parents needs to be used in the phase computation code so we need to move its declaration higher to be able to call it. It cannot be moved any higher than that so we won't have any more patch doing the same thing.
Wed, 27 May 2015 15:49:24 -0700 record: add an operation arguments to customize recording ui
Laurent Charignon <lcharignon@fb.com> [Wed, 27 May 2015 15:49:24 -0700] rev 25310
record: add an operation arguments to customize recording ui This patch is part of a series of patches to change the recording ui to reflect the operation currently running (commit, shelve, revert ...). This patch adds a new argument to the recording function to reflect in the UI what operation we are running.
Sun, 26 Apr 2015 18:13:48 +0900 revset: reduce nesting of chained 'or' operations (issue4624)
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 18:13:48 +0900] rev 25309
revset: reduce nesting of chained 'or' operations (issue4624) This reduces the stack depth of chained 'or' operations: - from O(n) to O(1) at the parsing, alias expansion and optimization phases - from O(n) to O(log(n)) at the evaluation phase simplifyinfixops() must be applied immediately after the parsing phase. Otherwise, alias expansion would crash by "maximum recursion depth exceeded" error. Test cases use 'x:y|y:z' instead of 'x|y' because I'm planning to optimize 'x|y' in a different way. Benchmarks: 0) 605b1d32c1c0 1) this patch revset #0: 0 + 1 + 2 + ... + 200 0) wall 0.026347 comb 0.030000 user 0.030000 sys 0.000000 (best of 101) 1) wall 0.023858 comb 0.030000 user 0.030000 sys 0.000000 (best of 112) revset #1: 0 + 1 + 2 + ... + 1000 0) maximum recursion depth exceeded 1) wall 0.483341 comb 0.480000 user 0.480000 sys 0.000000 (best of 20) revset #2: sort(0 + 1 + 2 + ... + 200) 0) wall 0.013404 comb 0.010000 user 0.010000 sys 0.000000 (best of 196) 1) wall 0.006814 comb 0.010000 user 0.010000 sys 0.000000 (best of 375) revset #3: sort(0 + 1 + 2 + ... + 1000) 0) maximum recursion depth exceeded 1) wall 0.035240 comb 0.040000 user 0.040000 sys 0.000000 (best of 100)
Sun, 24 May 2015 14:10:52 +0900 revset: add helper to build balanced addsets from chained 'or' operations
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 14:10:52 +0900] rev 25308
revset: add helper to build balanced addsets from chained 'or' operations This function will be used by revset.orset() and scmutil.revrange() to reduce the stack depth from O(n) to O(log(n)). We've bikeshed the interface of this function, but we couldn't come to an agreement. So we decided to attempt to make it move forward. marmoute: - new factory function isn't necessary for balanced addsets - addset.__init__ can just recurse, should handle "len(subsets) == 2+" yuja: - want to write all "len(subsets) == 0, 1, 2, 3+" cases in the same function - no recursion in __init__ for cosmetic reason: can't return, can't call __init__ directly I've changed it to a private function so that nobody would be tempted to utilize it.
Sun, 26 Apr 2015 18:27:32 +0900 revset: comment that we can't swap 'or' operands by weight
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 18:27:32 +0900] rev 25307
revset: comment that we can't swap 'or' operands by weight Though the original code did nothing, it tried to optimize the calculation order by weight. But we can't simply swap 'ta' and 'tb' because it would change the order of revisions. For future reference, this patch keeps the modified version of the original code as comment.
Sun, 26 Apr 2015 18:05:23 +0900 parser: add helper to reduce nesting of chained infix operations
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 18:05:23 +0900] rev 25306
parser: add helper to reduce nesting of chained infix operations This will be used to avoid stack overflow caused by chained 'or' operations in revset.
Wed, 27 May 2015 14:28:29 -0500 convert: properly pass null ids through .hgtags (issue4678) stable
Matt Mackall <mpm@selenic.com> [Wed, 27 May 2015 14:28:29 -0500] rev 25305
convert: properly pass null ids through .hgtags (issue4678) Mercurial uses tags of null to mark deletions, but convert was silently discarding these because it had no mapping for them. Thus, it was resurrecting deleted tags.
Wed, 27 May 2015 17:28:55 -0500 commit: improve --close-branch documentation
Matt Mackall <mpm@selenic.com> [Wed, 27 May 2015 17:28:55 -0500] rev 25304
commit: improve --close-branch documentation The confusion about whether this flag closes a whole branch or just a head comes up regularly on IRC, so add some clarification.
Fri, 22 May 2015 13:06:45 -0700 patch: add 'extra' argument to makememctx
Laurent Charignon <lcharignon@fb.com> [Fri, 22 May 2015 13:06:45 -0700] rev 25303
patch: add 'extra' argument to makememctx The uncommit command in evolve needs to create memory context with given extra parameters. This patch allows us to do that instead of always giving them an empty value and having to override it afterwards.
Wed, 27 May 2015 17:41:42 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 27 May 2015 17:41:42 -0500] rev 25302
merge with stable
Wed, 27 May 2015 13:28:16 -0400 match: normpath the ignore source when expanding the 'subinclude' kind
Matt Harbison <matt_harbison@yahoo.com> [Wed, 27 May 2015 13:28:16 -0400] rev 25301
match: normpath the ignore source when expanding the 'subinclude' kind Windows was previously getting this test failure: --- e:/Projects/hg/tests/test-hgignore.t +++ e:/Projects/hg/tests/test-hgignore.t.err @@ -230,6 +230,7 @@ $ hg status ? dir1/file2 + ? dir1/subdir/subfile3 ? dir1/subdir/subfile4 ? dir2/file1 @@ -241,4 +242,4 @@ $ echo "glob:file*2" > dir1/.hgignoretwo $ hg status | grep file2 - [1] + ? dir1/file2 The problem was 'source' would be in the form "F:\test-hgignore.t\.hgignore", so when pathutil.dirname() split on '/', 'sourceroot' was empty. Therefore, 'path' ended up being relative instead of absolute.
Sat, 23 May 2015 21:18:47 -0700 repair: forbid strip from inside a transaction
Pierre-Yves David <pierre-yves.david@fb.com> [Sat, 23 May 2015 21:18:47 -0700] rev 25300
repair: forbid strip from inside a transaction Stripping inside a transaction will (at best) crash or (at worst) result in very unexpected results. We explicitly forbid it early.
Wed, 27 May 2015 12:14:10 -0400 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 27 May 2015 12:14:10 -0400] rev 25299
test-treemanifest: add globs for Windows
Wed, 27 May 2015 12:11:13 -0400 test-revert-interactive: don't escape the $ for $TESTTMP
Matt Harbison <matt_harbison@yahoo.com> [Wed, 27 May 2015 12:11:13 -0400] rev 25298
test-revert-interactive: don't escape the $ for $TESTTMP Otherwise, sh tries to exec the literal path '${TESTTMP}/editor.sh' on Windows. The test runs clean on OS X both with and without this change.
Tue, 26 May 2015 12:09:04 -0700 changelog: fix bug in heads computation
Laurent Charignon <lcharignon@fb.com> [Tue, 26 May 2015 12:09:04 -0700] rev 25297
changelog: fix bug in heads computation This patch refactors the native computation of heads. It fixes a bug where filtered heads in the pending index could be returned by the native code despite their filtering.
Tue, 26 May 2015 12:08:50 -0700 changelog: change input type of index_get_parents
Laurent Charignon <lcharignon@fb.com> [Tue, 26 May 2015 12:08:50 -0700] rev 25296
changelog: change input type of index_get_parents We were wrongfully using int instead of Py_ssize_t for the revision number.
Fri, 22 May 2015 17:08:59 -0500 branch: don't warn about branches if repository has multiple branches already
Matt Mackall <mpm@selenic.com> [Fri, 22 May 2015 17:08:59 -0500] rev 25295
branch: don't warn about branches if repository has multiple branches already This warning exists to prevent git users from prematurely polluting their namespace when trying out Mercurial. But for repos that already have multiple branches, understanding what branches are is not optional so we should just shut up.
Tue, 26 May 2015 13:02:28 -0700 transaction: really fix _addbackupentry key usage (issue4684) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 13:02:28 -0700] rev 25294
transaction: really fix _addbackupentry key usage (issue4684) The fix in fd905b2bea59 is actually wrong. We now use the filename to match what '_addentry'. This whole untested code is quite suspicious. This seems to point that no one is ever running 'tr.find' for a backup file.
Tue, 19 May 2015 13:08:21 -0700 largefiles: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 13:08:21 -0700] rev 25293
largefiles: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Tue, 26 May 2015 11:06:43 -0700 largefiles: pass in whole matcher to getstandinmatcher()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 26 May 2015 11:06:43 -0700] rev 25292
largefiles: pass in whole matcher to getstandinmatcher() The choice between the "always" case and the other case is done in getstandinmatcher() and the next patch will change how it's determined based on the matcher, so let's prepare by passing in the matcher, not just the matcher's files.
Tue, 26 May 2015 09:46:48 -0700 largefiles: drop unused 'pats' parameter from getstandinmatcher()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 26 May 2015 09:46:48 -0700] rev 25291
largefiles: drop unused 'pats' parameter from getstandinmatcher() The parameter wasn't used even when it was imported from elsewhere in cfccd3bee7b3 (hgext: add largefiles extension, 2011-09-24).
Tue, 26 May 2015 14:14:36 -0700 devel: rename 'all' to 'all-warnings' (BC)
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 26 May 2015 14:14:36 -0700] rev 25290
devel: rename 'all' to 'all-warnings' (BC) We have started to isolate extra usecases for developer-only output that is not a warning. As the section has the fairly generic name 'devel' it makes sense to tuck them there. As a result, 'all' becomes a bit misleading so we rename it to 'all-warnings'. This will break some developer setups but the tests are still fine and developers will likely spot this change.
Tue, 26 May 2015 14:52:47 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 26 May 2015 14:52:47 -0500] rev 25289
merge with stable
Fri, 22 May 2015 14:02:04 -0700 copies: document hack for adding '' to set of dirs
Martin von Zweigbergk <martinvonz@google.com> [Fri, 22 May 2015 14:02:04 -0700] rev 25288
copies: document hack for adding '' to set of dirs The root directory is not normally added to 'dirs' instances (although I think it should be). In copies.mergecopies, we call dirname() to get the directory of a path and then check for containment in the 'dirs' instances ('d1' and 'd2'). In order to easily handle files in the root directory, '/' is added to d1/d2. This results in the empty string being added to the sets, since what comes before the slash in '/' is an empty string. This seems less than obvious, so let's document it.
Tue, 26 May 2015 23:14:50 +0900 test-revset: update test that isn't broken on default branch
Yuya Nishihara <yuya@tcha.org> [Tue, 26 May 2015 23:14:50 +0900] rev 25287
test-revset: update test that isn't broken on default branch "X or wdir()" just works because the default branch includes 40a2cf1c765b.
Tue, 26 May 2015 14:41:00 -0400 pathutil: demote two local functions to just be forwards
Augie Fackler <augie@google.com> [Tue, 26 May 2015 14:41:00 -0400] rev 25286
pathutil: demote two local functions to just be forwards We retain the forwards because it helps code be more ignorant of implementation details, but use forwards instead of our own method definitions since we don't need any truly custom behavior for now.
Tue, 26 May 2015 14:30:48 -0400 pathutil: restate dirname and join as forwards to posixpath
Augie Fackler <augie@google.com> [Tue, 26 May 2015 14:30:48 -0400] rev 25285
pathutil: restate dirname and join as forwards to posixpath I've done this as its own step so that it's easy to see that the posixpath implementations pass the doctests in this package. In a future patch I'll just make these pure forwards of the methods so that things using pathutil can be oblivious to the posix nature of these functions.
Wed, 20 May 2015 14:54:09 -0700 help: add documentation on include: and subinclude:
Durham Goode <durham@fb.com> [Wed, 20 May 2015 14:54:09 -0700] rev 25284
help: add documentation on include: and subinclude: Adds some help text about the new include: and subinclude: match syntax.
Sat, 16 May 2015 16:25:05 -0700 match: enable 'subinclude:' syntax
Durham Goode <durham@fb.com> [Sat, 16 May 2015 16:25:05 -0700] rev 25283
match: enable 'subinclude:' syntax This adds a new rule syntax that allows the user to include a pattern file, but only have those patterns match against files underneath the subdirectory of the pattern file. This is useful when you have nested projects in a repository and the inner projects wants to set up ignore rules that won't affect other projects in the repository. It is also useful in high commit rate repositories for removing the root .hgignore as a point of contention.
Fri, 22 May 2015 12:58:27 -0700 copies: switch to using pathutil.dirname
Durham Goode <durham@fb.com> [Fri, 22 May 2015 12:58:27 -0700] rev 25282
copies: switch to using pathutil.dirname copies had it's own dirname implementation. Now that pathutils has a common one, let's use that instead.
Fri, 22 May 2015 12:47:18 -0700 pathutil: add dirname and join functions
Durham Goode <durham@fb.com> [Fri, 22 May 2015 12:47:18 -0700] rev 25281
pathutil: add dirname and join functions This adds dirname and join functions to pathutil which are explicitly for handling '/' delimited paths. The implementations are basically copy paste from python's posix os.path.dirname and os.path.join functions.
Thu, 21 May 2015 15:44:38 -0700 changelog: move index_get_parents function up
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 15:44:38 -0700] rev 25280
changelog: move index_get_parents function up index_get_parents can be used in index_headrevs, to do so it needs to be moved up in the compilation unit.
Tue, 26 May 2015 06:45:18 -0500 mergecopies: avoid slowdown from linkrev adjustment (issue4680) stable
Matt Mackall <mpm@selenic.com> [Tue, 26 May 2015 06:45:18 -0500] rev 25279
mergecopies: avoid slowdown from linkrev adjustment (issue4680) checkcopies was using fctx.rev() which it was expecting would be equivalent to linkrev() but was triggering the new _adjustlinkrev path. This was making grafts and merges with large sets of potential copies very expensive.
Tue, 26 May 2015 22:58:30 +0800 hgweb: remove an extra call to nodebranchnodefault() in changesetentry()
Anton Shestakov <engored@ya.ru> [Tue, 26 May 2015 22:58:30 +0800] rev 25278
hgweb: remove an extra call to nodebranchnodefault() in changesetentry() showbranch variable already contains the result of nodebranchnodefault(ctx), so it can be reused.
Fri, 22 May 2015 12:14:23 -0500 profile: disable nested report in lsprof by default
Matt Mackall <mpm@selenic.com> [Fri, 22 May 2015 12:14:23 -0500] rev 25277
profile: disable nested report in lsprof by default The nesting makes profiles harder to read and often pushes important data off the end of the report.
Tue, 19 May 2015 11:16:20 -0700 manifest: use match.prefix() instead of 'not match.anypats()'
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:16:20 -0700] rev 25276
manifest: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't.
Tue, 19 May 2015 10:40:40 -0700 dirstate: use match.prefix() instead of 'not match.anypats()'
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 10:40:40 -0700] rev 25275
dirstate: use match.prefix() instead of 'not match.anypats()' It seems clearer to check for what it is than what it isn't.
Tue, 19 May 2015 11:36:05 -0700 commit: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:36:05 -0700] rev 25274
commit: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Tue, 19 May 2015 11:35:43 -0700 _makelogrevset: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:35:43 -0700] rev 25273
_makelogrevset: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Tue, 19 May 2015 11:34:50 -0700 walkchangerevs: avoid match.files() in conditions
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 May 2015 11:34:50 -0700] rev 25272
walkchangerevs: avoid match.files() in conditions See 9789b4a7c595 (match: introduce boolean prefix() method, 2014-10-28) for reasons to avoid match.files() in conditions.
Thu, 21 May 2015 14:20:24 -0700 walkchangerevs: simplify with an 'elif'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 May 2015 14:20:24 -0700] rev 25271
walkchangerevs: simplify with an 'elif' Since 'match.files()' is interchangeable with 'not match.files()', we can simplify with an 'elif' follwoing the 'if match.always()'.
Tue, 26 May 2015 07:44:37 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Tue, 26 May 2015 07:44:37 -0500] rev 25270
merge with stable
Mon, 25 May 2015 11:06:49 -0700 test-module-imports: drop check for Python >= 2.6
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 25 May 2015 11:06:49 -0700] rev 25269
test-module-imports: drop check for Python >= 2.6 Support for Python 2.4 and 2.5 has been dropped. This check is no longer necessary.
Mon, 25 May 2015 01:26:23 +0900 localrepo: pass hook argument txnid to pretxnopen hooks stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 25 May 2015 01:26:23 +0900] rev 25268
localrepo: pass hook argument txnid to pretxnopen hooks Before this patch, hook argument `txnid` isn't passed to `pretxnopen` hooks, even though `hooks` section of `hg help config` describes so. ``pretxnopen`` Run before any new repository transaction is open. The reason for the transaction will be in ``$HG_TXNNAME`` and a unique identifier for the transaction will be in ``HG_TXNID``. A non-zero status will prevent the transaction from being opened.
Mon, 25 May 2015 01:26:19 +0900 transaction: separate calculating TXNID from creating transaction object stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 25 May 2015 01:26:19 +0900] rev 25267
transaction: separate calculating TXNID from creating transaction object Before this patch, transaction ID (TXNID) is calculated from `transaction` object itself by `id()`, but this prevents TXNID from being passed to `pretxnopen` hooks, which should be executed before starting transaction processing (also any preparations for it, like writing journal files out). As a preparation for passing TXNID to `pretxnopen` hooks, this patch separates calculation of TXNID from creation of `transaction` object. This patch uses "random" library for reasonable unique ID. "uuid" library can't be used, because it was introduced since Python 2.5 and isn't suitable for Mercurial 3.4.x stable line. `%f` formatting for `random.random()` is used with explicit precision number 40, because default precision for `%f` is 6. 40 should be long enough, even if 10**9 transactions are executed in a short time (a second or less). On the other hand, `time.time()` is used to ensures uniqueness of TXNID in a long time, for safety. BTW, platform not providing `/dev/urandom` or so may cause failure of `import random` itself with some Python versions (see Python issue15340 for detail http://bugs.python.org/issue15340). But this patch uses "random" without any workaround, because: - "random" is already used directly in some code paths, - such platforms are very rare (e.g. Tru64 and HPUX), and http://bugs.python.org/issue15340#msg170000 - updating Python runtime can avoid this issue
Sat, 23 May 2015 11:14:00 +0900 revbranchcache: return uncached branchinfo for nullrev (issue4683) stable
Yuya Nishihara <yuya@tcha.org> [Sat, 23 May 2015 11:14:00 +0900] rev 25266
revbranchcache: return uncached branchinfo for nullrev (issue4683) This fixes the crash caused by "branch(null)" revset. No cache should be necessary for nullrev because changelog.branchinfo(nullrev) does not involve IO operation. Note that the problem of "branch(wdir())" isn't addressed by this patch. "wdir()" will raise TypeError in many places because of None. This is the reason why "wdir()" is still experimental.
Sun, 24 May 2015 10:29:33 +0900 revset: drop magic of fullreposet membership test (issue4682) stable
Yuya Nishihara <yuya@tcha.org> [Sun, 24 May 2015 10:29:33 +0900] rev 25265
revset: drop magic of fullreposet membership test (issue4682) This patch partially backs out d2de20e1451f and adds an alternative workaround to functions that evaluate "null" and "wdir()". Because the new workaround is incomplete, "first(null)" and "min(null)" don't work as expected. But they were not usable until 3.4 and "null" isn't commonly used, we can postpone a complete fix for 3.5. The issue4682 was caused because "branch(default)" is evaluated to "<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will fix crash on "branch(null)", but without this patch, it would make "null in <branch(default)>" be True, which means "children(branch(default))" would return all revisions but merge (p2 != null). I believe the right fix is to stop propagating fullreposet magic on filter(), but it wouldn't fit to stable release. Also, we should discuss how to handle "null" and "wdir()" in revset before.
Sat, 23 May 2015 15:55:04 -0500 merge with stable
Matt Mackall <mpm@selenic.com> [Sat, 23 May 2015 15:55:04 -0500] rev 25264
merge with stable
Fri, 22 May 2015 12:13:18 -0500 transaction: use the proper variable in '_addbackupentry' (issue4684) stable
Pierre-Yves David <pierre-yves.david@fb.com> [Fri, 22 May 2015 12:13:18 -0500] rev 25263
transaction: use the proper variable in '_addbackupentry' (issue4684) The 'file' variable was undefined but resolved to the 'file' built-in. This is why pylint complains about overwriting built-ins...
Fri, 22 May 2015 21:19:08 -0400 run-tests: python3.5 now supports mkdtemp using bytes for paths
Augie Fackler <raf@durin42.com> [Fri, 22 May 2015 21:19:08 -0400] rev 25262
run-tests: python3.5 now supports mkdtemp using bytes for paths Now that http://bugs.python.org/issue24230 is fixed (thanks to Gregory Smith for that quick response!) we can drop one more ugly hack around path handling. Tests still pass in 3.5 with this cleaner version, as well as in 2.6.
Fri, 22 May 2015 21:15:52 -0400 run-tests: use items() instead of iteritems()
Augie Fackler <raf@durin42.com> [Fri, 22 May 2015 21:15:52 -0400] rev 25261
run-tests: use items() instead of iteritems() This fixes the python3.5 build. We'll presumably want to build our own helper function or use 2to3 for this on the main source tree, but for run-tests we want a single-source version that works in 2.6 and 3.5.
Thu, 21 May 2015 14:57:30 -0700 selve: make 'shelve --interactive' not experimental
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:57:30 -0700] rev 25260
selve: make 'shelve --interactive' not experimental It is safe to do as 'shelve -i' uses the same code path as 'commit -i' that is not experimental.
Thu, 21 May 2015 14:34:24 -0700 revert: fix edition of newly added file during --interactive
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:34:24 -0700] rev 25259
revert: fix edition of newly added file during --interactive Before this patch: editing hunks of newly added file when performing a revert --interactive had no effect: the edits were discarded. After this patch, the edits are taken into account.
Thu, 21 May 2015 14:25:57 -0700 revert: make revert --interactive use git style diff
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:25:57 -0700] rev 25258
revert: make revert --interactive use git style diff This allows us to use existing code to detect files that are newly added and modified. In turn, this allows us to make revert --interactive support editing newly added and modified files.
Thu, 21 May 2015 14:32:14 -0700 record: extract code to compute newly added and modified files
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:32:14 -0700] rev 25257
record: extract code to compute newly added and modified files We want to reuse this logic in revert.
Thu, 21 May 2015 14:28:02 -0700 record: extract ishunk to a function
Laurent Charignon <lcharignon@fb.com> [Thu, 21 May 2015 14:28:02 -0700] rev 25256
record: extract ishunk to a function We extract this code as we want to reuse it in revert -i.
Sun, 26 Apr 2015 22:26:44 +0900 fileset: pretty print syntax tree in debug output
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Apr 2015 22:26:44 +0900] rev 25255
fileset: pretty print syntax tree in debug output
Wed, 06 May 2015 10:17:41 +0900 parser: extract closure of prettyformat() to a top-level function
Yuya Nishihara <yuya@tcha.org> [Wed, 06 May 2015 10:17:41 +0900] rev 25254
parser: extract closure of prettyformat() to a top-level function There was no capture until I added 'leafnodes' argument.
(0) -10000 -3000 -1000 -300 -100 -96 +96 +100 +300 +1000 +3000 +10000 tip