Mon, 22 May 2017 15:56:47 -0700 tests: hide warning from test-xdg.t
Durham Goode <durham@fb.com> [Mon, 22 May 2017 15:56:47 -0700] rev 32467
tests: hide warning from test-xdg.t The test-xdg.t test uses the system hgrc because it unsets HGRCPATH. If the system has an extension enabled that doesn't work with the development version of Mercurial it prints an 'extension failed to load' warning. Let's just hide that by piping stderr to /dev/null.
Mon, 22 May 2017 22:59:40 -0700 policy: define C module versions individually
Jun Wu <quark@fb.com> [Mon, 22 May 2017 22:59:40 -0700] rev 32466
policy: define C module versions individually This allows us to bump the version for a single module without changing all of them.
Sat, 20 May 2017 19:43:58 +0200 repoview: rename '_getdynamicblockers' to 'revealedrevs' (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 19:43:58 +0200] rev 32465
repoview: rename '_getdynamicblockers' to 'revealedrevs' (API) Recent mailing list discussion made me realised we could clarify these. We make the function "public" to encourage extensions to wrap it and we use a more explicit name that mirror "hideablerevs".
Sat, 20 May 2017 19:43:29 +0200 repoview: move '_getdynamicblock' next to 'hideablerevs'
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 20 May 2017 19:43:29 +0200] rev 32464
repoview: move '_getdynamicblock' next to 'hideablerevs' There are the two functions that extensions should use to augment the hidding logic. It seem better to have them together at the top of the file.
Sun, 21 May 2017 13:26:17 -0700 python3: allow hgloader to work with lazy loaders
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 13:26:17 -0700] rev 32463
python3: allow hgloader to work with lazy loaders Don't clobber the loader returned from find_spec. This brings `hg version` down from 0.27 seconds to 0.17.
Sun, 21 May 2017 12:51:01 -0700 init: turn on demandimport for Python 3.6 and above
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 12:51:01 -0700] rev 32462
init: turn on demandimport for Python 3.6 and above This uses the new demandimport implementation for Python 3 introduced in previous patches. This doesn't yet enhance performance because it isn't integrated with the custom source file loader we use on Python 3. We'll integrate the two in upcoming patches.
Sun, 21 May 2017 12:23:04 -0700 demandimport: add python 3 implementation
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 12:23:04 -0700] rev 32461
demandimport: add python 3 implementation This implementation uses the new importlib finder/loader functionality available in Python 3.5 and up. # no-check-commit
Sun, 21 May 2017 12:10:53 -0700 demandimport: move ignore list to __init__.py
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 12:10:53 -0700] rev 32460
demandimport: move ignore list to __init__.py We're going to use the same ignore list for Python 3.
Sun, 21 May 2017 13:44:26 -0700 check: check modules in hgdemandimport
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 13:44:26 -0700] rev 32459
check: check modules in hgdemandimport A few places only check modules in mercurial and hgext. Add hgdemandimport to the list in those places.
Sun, 21 May 2017 12:10:53 -0700 demandimport: move to separate package
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 12:10:53 -0700] rev 32458
demandimport: move to separate package In Python 3, demand loading is per-package. Keeping demandimport in the mercurial package would disable demand loading for any modules in mercurial.
Sun, 21 May 2017 12:09:01 -0700 import-checker: add a way to directly import certain symbols
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 12:09:01 -0700] rev 32457
import-checker: add a way to directly import certain symbols We'll use this for the 'demandimport' symbol in an upcoming patch.
Sun, 21 May 2017 13:34:42 -0700 check-code: allow skipping hasattr check in py3-only code
Siddharth Agarwal <sid0@fb.com> [Sun, 21 May 2017 13:34:42 -0700] rev 32456
check-code: allow skipping hasattr check in py3-only code hasattr is safe in Python 3, and in an upcoming patch we can't use util.safehasattr.
Mon, 22 May 2017 01:17:49 -0700 profiling: allow loading profiling extension before everything else
Jun Wu <quark@fb.com> [Mon, 22 May 2017 01:17:49 -0700] rev 32455
profiling: allow loading profiling extension before everything else 6d642ecf1a89 makes profiler start early without loading extensions. That makes it impossible for an extension to add customized profilers. This patch adds a special case: if a profiler is not found but an extension with the same name could be loaded, load that extension first, and expect it to have a "profile" contextmanager method. This allows customized profilers and extension setup time is still profiled.
Mon, 22 May 2017 00:51:56 -0700 extensions: allow loading a whitelisted subset of extensions
Jun Wu <quark@fb.com> [Mon, 22 May 2017 00:51:56 -0700] rev 32454
extensions: allow loading a whitelisted subset of extensions This feature will be used by the next patch.
Mon, 22 May 2017 08:49:34 -0700 match: catch attempts to create case-insenstive exact matchers
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 08:49:34 -0700] rev 32453
match: catch attempts to create case-insenstive exact matchers Exact matchers are only created internally (as opposed to from user input) based on a set of files that the caller collected before, so they should always match the list exactly (i.e. case-sensitively).
Mon, 22 May 2017 19:29:21 +0200 test: remove aliases forcing date, use default-date
Boris Feld <boris.feld@octobus.net> [Mon, 22 May 2017 19:29:21 +0200] rev 32452
test: remove aliases forcing date, use default-date Now that we have the default-date by default and all code have been updated, remove the old commands alias that forced the date as they are not longer useful. Writing tests now should be easier for everyone now that all dates should be stable.
Mon, 22 May 2017 19:28:47 +0200 test: prepare tests for removing date aliases
Boris Feld <boris.feld@octobus.net> [Mon, 22 May 2017 19:28:47 +0200] rev 32451
test: prepare tests for removing date aliases In the next patch, I'm gonna removing the global command aliases that force the epoch date but some tests either fail or their output change after that. Instead I'm copying the needed aliases in the test files that will otherwise change. Update test-rebase-obsolete.t because a revision hash is based on the epoch date after a 'commit --amend' and the output will change after removing date aliases. Update test-subrepo-git.t as the git subrepo doesn't use traditional date mechanisms. I'm not sure that updating the git subrepo to support default-date make sense. Add the commit alias to the test in order for making it pass after removing the date aliases globally.
Tue, 16 May 2017 18:36:08 +0200 devel: update blackbox to use default-date
Boris Feld <boris.feld@octobus.net> [Tue, 16 May 2017 18:36:08 +0200] rev 32450
devel: update blackbox to use default-date Blackbox now obeys the 'devel.default-date' option. As a side effect we can delete the mock for blackblox related tests.
Fri, 19 May 2017 12:08:47 +0200 devel: use default-date config field when creating obsmarkers
Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:08:47 +0200] rev 32449
devel: use default-date config field when creating obsmarkers Also use the default-date when creating obsmarkers. Currently they are created with the current date and without any option to force their value. To test the feature, we remove some of the many 'glob' used to match obsmarker date in the tests.
Mon, 22 May 2017 16:59:57 +0200 devel: activate default-date in tests
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 22 May 2017 16:59:57 +0200] rev 32448
devel: activate default-date in tests It will make writing future tests more easier for everyone as we won't need to glob dates anymore in tests.
Fri, 19 May 2017 12:18:25 +0200 devel: add a config field to force dates to timestamp 0
Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:18:25 +0200] rev 32447
devel: add a config field to force dates to timestamp 0 Add a new config field named default-date under the devel section to force all implicits date to a specific value. If a explicit date is passed, it will override the default. This patch only affect changesets. Other usages (blackbox, obsmarkers) are updated in later patchs. The test runner is setting a bunch of alias to force the '--date' argument. We will replace theses aliases in a later patch.
Fri, 19 May 2017 12:07:41 +0200 ui: add the possiblity to get a date config field
Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:07:41 +0200] rev 32446
ui: add the possiblity to get a date config field Add the method configdate to read a date from configuration. It uses the util.rawparsedate refactored earlier to support all standard date formats.
Fri, 19 May 2017 12:07:23 +0200 util: refactor util.parsedate to raises ValueError
Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:07:23 +0200] rev 32445
util: refactor util.parsedate to raises ValueError Split most of util.parsedate in util.rawparsedate and make it raises ValueError instead of error.Abort. The util.parsedate function is now just a shell function converting ValueError to error.Abort for existing users. I need to parse a date from config in a later patch and use util.rawparsedate with ui.configwith which expect a convert that raises ValueError.
Mon, 22 May 2017 11:08:18 -0700 match: implement __repr__() and update users (API)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 11:08:18 -0700] rev 32444
match: implement __repr__() and update users (API) fsmonitor and debugignore currently access matcher fields that I would consider implementation details, namely patternspat, includepat, and excludepat. Let' instead implement __repr__() and have the few users use that instead. Marked (API) because the fields can now be None.
Mon, 22 May 2017 10:41:32 -0700 fsmonitor: fix silly "*kwargs" bug in merge.update() override
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 10:41:32 -0700] rev 32443
fsmonitor: fix silly "*kwargs" bug in merge.update() override Everyone knows that it's supposed to be spelled with two asterisks. It started failing in fad5e299cfc7 (update: accept --merge to allow merging across topo branches (issue5125), 2017-02-13) because until then there was only one argument that was covered by the kwargs, so *kwargs or **kwargs both worked (or at least that's what I think with my limited understanding of Python).
Fri, 19 May 2017 20:06:45 +0530 revset: make `hg log -r 'wdir()^'` work (issue4905)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 20:06:45 +0530] rev 32442
revset: make `hg log -r 'wdir()^'` work (issue4905) This patch catches the WdirUnsupported exception to support wdir()^.
Fri, 19 May 2017 19:12:06 +0530 revlog: raise WdirUnsupported when wdirrev is passed
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 19:12:06 +0530] rev 32441
revlog: raise WdirUnsupported when wdirrev is passed revlog.parentrevs() is called while evaluating ^ operator in revsets. When wdir is passed, it raises IndexError. This patch raises WdirUnsupported if wdir is passed in the function. The error will be caugth in future patches.
Fri, 19 May 2017 19:10:37 +0530 error: add a new exception named WdirUnsupported
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 19:10:37 +0530] rev 32440
error: add a new exception named WdirUnsupported This series intents to support wdir() predicate with different operators like ~, ^. Currently the storage class don't support wdir(). This exception is introduced so that it can be raised from places where wdir() is passed and is not supported and we can catch this where we want to support the predicate. Also throwing an error at low level and catching at some higher level is better than using if-else especially for perf.
Thu, 18 May 2017 22:20:59 -0700 match: replace icasefsmatch() function by flag to regular match()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 22:20:59 -0700] rev 32439
match: replace icasefsmatch() function by flag to regular match() match() will soon gain more logic and we don't want to duplicate that in icasefsmatch(), so merge the two functions instead and use a flag to get case-insensitive behavior.
Thu, 18 May 2017 16:48:02 -0700 match: delete icasefsmatcher now that it's same as matcher
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 16:48:02 -0700] rev 32438
match: delete icasefsmatcher now that it's same as matcher
Thu, 18 May 2017 15:45:50 -0700 match: pass in normalize() function to matchers
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:45:50 -0700] rev 32437
match: pass in normalize() function to matchers This will let us delete icasefsmatcher.
Thu, 18 May 2017 16:05:46 -0700 match: don't print explicitly listed files with wrong case (BC)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 16:05:46 -0700] rev 32436
match: don't print explicitly listed files with wrong case (BC) On case-insensitive file systems, if file A exists and you try to remove it (or add, etc.) by specifying a different case, you will see something like this: $ hg rm a removing file A I honestly found this surprising because it seems to me like it was explicitly listed by the user. Still, there is a comment in the code describing it, so it is very clearly intentional. The code was added in baa11dde8c0e (match: add a subclass for dirstate normalizing of the matched patterns, 2015-04-12). I'm going to do a lot of refactoring to matchers and the feature mentioned above is going to get in my way. I'm therefore removing it for the time being and we can hopefully add it back when I'm done.
Thu, 18 May 2017 15:25:16 -0700 match: move body of _normalize() to a static function
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:25:16 -0700] rev 32435
match: move body of _normalize() to a static function matcher._normalize() no longer depends on any of the matcher's state, and making it static will enable further refactoring. Note that the subdirmatcher subclass calls _normalize(), so we can't remove it completely.
Thu, 18 May 2017 15:11:04 -0700 match: pass 'warn' argument to _normalize() for consistency
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:11:04 -0700] rev 32434
match: pass 'warn' argument to _normalize() for consistency No other arguments are passed via the matcher's state, so we should treat 'warn' the consistently. More importantly, this will let us make it a static function, which will help with further refactoring.
Fri, 12 May 2017 23:11:41 -0700 match: replace match class by match function (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 May 2017 23:11:41 -0700] rev 32433
match: replace match class by match function (API) The matcher class is getting hard to understand. It will be easier to follow if we can break it up into simpler matchers that we then compose. I'm hoping to have one matcher that accepts regular (non-include) patterns, one for exact file matches, one that always matches (and maybe one that never does) and then compose them by intersection and difference. This patch takes a simple but important step towards that goal by making match.match() a function (and renaming the matcher class itself from "match" to "matcher"). The new function will eventually be responsible for creating the simple matchers and composing them. icasefsmatcher similarly gets a factory function (called "icasefsmatch"). I also moved the other factory functions nearby.
Sun, 21 May 2017 18:36:28 -0400 checklink: degrade gracefully on posix when fs is readonly (issue5511)
Augie Fackler <augie@google.com> [Sun, 21 May 2017 18:36:28 -0400] rev 32432
checklink: degrade gracefully on posix when fs is readonly (issue5511) In the unlucky case, checklink tries to make a new file for the symlink test to target. If the filesystem is readonly (perhaps due to permissions in a repo owned by someone else) we just report the filesystem as not supporting symlinks, since the user probably can't write anyway.
Fri, 19 May 2017 20:14:31 -0700 revlog: remove some revlogNG terminology
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:14:31 -0700] rev 32431
revlog: remove some revlogNG terminology RevlogNG is not such a good name when it is no longer the newest revlog version. Since we'll soon have revlog version 2, let's remove some references to it.
Fri, 19 May 2017 20:10:50 -0700 revlog: tweak wording and logic for flags validation
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:10:50 -0700] rev 32430
revlog: tweak wording and logic for flags validation First, the logic around the if..elif..elif was subtly wrong and sub-optimal because all branches would be tested as long as the revlog was valid. This patch changes things so it behaves like a switch statement over the revlog version. While I was here, I also tweaked error strings to make them consistent and to read better.
Fri, 19 May 2017 20:01:35 -0700 tests: tests for revlog version and flags loading
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:01:35 -0700] rev 32429
tests: tests for revlog version and flags loading We didn't have explicit test coverage of these branches. Better late than never.
Sun, 21 May 2017 13:32:07 +0200 perf: allow to clear the obsstore in 'perfvolatilesets'
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 13:32:07 +0200] rev 32428
perf: allow to clear the obsstore in 'perfvolatilesets' Loading the obsstore can become a large part of the time necessary to compute the important volatile set. We add a flag purging all known obsstore related data. For example, computing the 'bumped' set currently requires reading the full obsstore, so timing greatly differ with or without that flag: Without: ! bumped ! wall 0.005047 comb 0.000000 user 0.000000 sys 0.000000 (best of 446) With: ! bumped ! wall 0.512367 comb 0.510000 user 0.480000 sys 0.030000 (best of 15)
Sun, 21 May 2017 13:49:48 +0200 obsolete: test an important corner case
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 13:49:48 +0200] rev 32427
obsolete: test an important corner case Receiving markers affecting changeset we'll receives later is legitimate and not so uncommon case. Working on cache highlighted that this was only testing in the evolve extension. We add a test for this case in core.
Thu, 18 May 2017 22:47:42 -0700 largefiles: replace always() method, not _always field
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 22:47:42 -0700] rev 32426
largefiles: replace always() method, not _always field We will soon have matchers that don't have an _always field, so largefiles needs to stop assuming that they do. _always is only used by always(), so we safely replace that method instead.
Sun, 21 May 2017 02:45:32 -0400 merge with stable
Augie Fackler <augie@google.com> [Sun, 21 May 2017 02:45:32 -0400] rev 32425
merge with stable
Sun, 21 May 2017 13:41:01 +0900 cext: mark constant variables
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 13:41:01 +0900] rev 32424
cext: mark constant variables
Sun, 21 May 2017 13:35:19 +0900 cext: move util.h to cext tree
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 13:35:19 +0900] rev 32423
cext: move util.h to cext tree Since util.h isn't useful in plain C module, it should be placed in CPython extension directory.
Sun, 21 May 2017 13:31:27 +0900 cext: move back finalization of dirstateTupleType where it should be
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 13:31:27 +0900] rev 32422
cext: move back finalization of dirstateTupleType where it should be
Sat, 20 May 2017 22:27:52 -0700 cleanup: reuse existing wctx variables instead of calling repo[None]
Martin von Zweigbergk <martinvonz@google.com> [Sat, 20 May 2017 22:27:52 -0700] rev 32421
cleanup: reuse existing wctx variables instead of calling repo[None] Incidentally, this apparently means we load .hgsub one time less as well, which affects a test case.
Thu, 18 May 2017 16:43:56 -0400 localrepo: extract bookmarkheads method to bookmarks.py
Augie Fackler <augie@google.com> [Thu, 18 May 2017 16:43:56 -0400] rev 32420
localrepo: extract bookmarkheads method to bookmarks.py This method is only used internally by destutil, and it's obscure enough I'm willing to just move it without a deprecation warning, especially since the new method has more constrained functionality. Design-wise I'd also like to get active bookmark handling folded into the bookmark store, so that we don't squirrel away an extra attribute for the active bookmark on the repository object.
Sat, 20 May 2017 20:50:29 -0400 tests: avoid renamed files triggering check-commit failures
Augie Fackler <augie@google.com> [Sat, 20 May 2017 20:50:29 -0400] rev 32419
tests: avoid renamed files triggering check-commit failures I had to flag some revisions to not undergo check-commit scrutiny today to get the tests to pass, because they renamed files that had existing failures which we're not cleaning up. Let's prevent that in the future by using the extended git diff format to elide moved code.
Sat, 29 Apr 2017 21:39:47 -0700 dispatch: make request accept additional reposetups
Jun Wu <quark@fb.com> [Sat, 29 Apr 2017 21:39:47 -0700] rev 32418
dispatch: make request accept additional reposetups chg needs special logic around repo object creation (like, collecting and reporting repo path to the master server). Adding "reposetup" to dispatch.request seems to be an easy and reasonably clean way to allow that.
Sat, 20 May 2017 14:01:05 -0700 cext: extract revlog/index parsing code to own C file
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 20 May 2017 14:01:05 -0700] rev 32417
cext: extract revlog/index parsing code to own C file parsers.c is ~3000 lines and ~2/3 of it is related to the revlog index type. We already have separate C source files for directory utilities and manifest parsing. I think the quite unwieldy revlog/index parsing code should be self-contained as well. I performed the extraction as a file copy then removed content from both sides in order to preserve file history and blame. As part of this, I also had to move the hexdigit table and function to a shared header since it is used by both parsers.c and revlog.c # no-check-commit
Thu, 04 May 2017 17:13:12 +0900 debugcommands: use temporary dict for its command table
Yuya Nishihara <yuya@tcha.org> [Thu, 04 May 2017 17:13:12 +0900] rev 32416
debugcommands: use temporary dict for its command table Instead, load the table by commands.py so the debug commands should always be populated. The table in debugcommands.py is unnamed so extension authors wouldn't be confused to wrap debugcommands.table in place of commands.table.
Sun, 14 May 2017 16:42:16 +0900 commands: move debugcommands and debugcomplete back to commands module
Yuya Nishihara <yuya@tcha.org> [Sun, 14 May 2017 16:42:16 +0900] rev 32415
commands: move debugcommands and debugcomplete back to commands module These commands depend heavily on the commands table, so it doesn't make much sense to isolate them to debugcommands.py. This helps eliminating the future import cycle.
Sun, 14 May 2017 16:19:47 +0900 commands: move templates of common command options to cmdutil (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 14 May 2017 16:19:47 +0900] rev 32414
commands: move templates of common command options to cmdutil (API) The goal is to get rid of the debugcommands -> commands dependency. Since globalopts is the property of the commands, it's kept in the commands module.
Sat, 13 Aug 2016 12:29:53 +0900 import-checker: drop workaround for pure modules
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:29:53 +0900] rev 32413
import-checker: drop workaround for pure modules
Sat, 13 Aug 2016 12:28:52 +0900 policy: drop custom importer for pure modules
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:28:52 +0900] rev 32412
policy: drop custom importer for pure modules
Sat, 13 Aug 2016 12:23:56 +0900 parsers: switch to policy importer
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:23:56 +0900] rev 32411
parsers: switch to policy importer # no-check-commit
Sat, 13 Aug 2016 12:18:58 +0900 mpatch: switch to policy importer
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:18:58 +0900] rev 32410
mpatch: switch to policy importer
Sat, 13 Aug 2016 12:15:49 +0900 diffhelpers: switch to policy importer
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:15:49 +0900] rev 32409
diffhelpers: switch to policy importer # no-check-commit
Sat, 13 Aug 2016 12:12:50 +0900 bdiff: switch to policy importer
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Aug 2016 12:12:50 +0900] rev 32408
bdiff: switch to policy importer # no-check-commit
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip