Fri, 19 May 2017 13:36:34 -0700 match: remove support for non-include patterns from includematcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 13:36:34 -0700] rev 32535
match: remove support for non-include patterns from includematcher The includematcher will always get at least one include pattern and will never get any non-include patterns, so we can remove most of the code in it. This patch does mostly straight-forward deletions of code. We will clean up further later.
Fri, 19 May 2017 22:36:14 -0700 match: split up main matcher into patternmatcher and includematcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 May 2017 22:36:14 -0700] rev 32534
match: split up main matcher into patternmatcher and includematcher At this point the includematcher is an exact copy of the main matcher class. We will specialize and simplify both classes in the following patches. This initial unmodified copy is just to make the differences clearer. We also rename the main matcher to "patternmatcher" for consistency. I may eventually merge this new includematcher back into the main matcher, but I think doing it this way makes the intermediate steps clearer regardless.
Thu, 18 May 2017 23:39:39 -0700 match: remove support for exact matching from main matcher class
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 23:39:39 -0700] rev 32533
match: remove support for exact matching from main matcher class Exact matching is now handled by the exactmatcher class. We can safely remove _files from the __repr__() implementation, because even though the field is set, the patternspat field is enough for the representation to be unambiguous (which was not the case when the matcher could handle exact matches).
Wed, 17 May 2017 09:26:15 -0700 match: handle exact matching using new exactmatcher
Martin von Zweigbergk <martinvonz@google.com> [Wed, 17 May 2017 09:26:15 -0700] rev 32532
match: handle exact matching using new exactmatcher
Fri, 12 May 2017 16:33:33 -0700 merge: use intersectmatchers() in "m2-vs-ma optimization"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 May 2017 16:33:33 -0700] rev 32531
merge: use intersectmatchers() in "m2-vs-ma optimization" It doesn't seem like this can actually happen, but seems like cleaner anyway.
Fri, 12 May 2017 23:12:05 -0700 match: handle includes using new intersectionmatcher
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 May 2017 23:12:05 -0700] rev 32530
match: handle includes using new intersectionmatcher
Thu, 25 May 2017 14:32:56 -0700 match: move entire uipath() implementation to basematcher
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 May 2017 14:32:56 -0700] rev 32529
match: move entire uipath() implementation to basematcher Even though most matchers will always want to use the relative path in uipath(), when we add support for intersecting matcher, we will want to control which form to use for any kind of matcher without knowing the type (see next patch), so we need the implementation on the base class. Also rename the attribute from "pathrestricted" to "relativeuipath" since there actually are cases where we match everything but still use relative paths (like when the user runs "hg files .." from inside mercurial/).
Thu, 25 May 2017 12:09:09 +0200 local-clone: also copy tags related caches
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 12:09:09 +0200] rev 32528
local-clone: also copy tags related caches This caches provide a large speedup for some repositories. Keeping it around is valuable.
Thu, 25 May 2017 12:05:33 +0200 local-clone: also copy revs-branch-cache files
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 12:05:33 +0200] rev 32527
local-clone: also copy revs-branch-cache files This cache provides a large speedup for some repositories. Keeping it around is valuable.
Thu, 25 May 2017 11:59:07 +0200 local-clone: extract the listing of caches to copy
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 11:59:07 +0200] rev 32526
local-clone: extract the listing of caches to copy Right now, the clone only copies the branchmap caches. There are multiple other valuable caches that we should copy and extensions might add their own. So we add a function to list the cache files to copy from the repository. The repository argument is unused but extensions will want it.
Thu, 25 May 2017 11:55:00 +0200 local-clone: extract the closure copying caches
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 11:55:00 +0200] rev 32525
local-clone: extract the closure copying caches Closures often get on the way. They are not much value in having that as a closure so I'm extracting it at the module level.
Thu, 25 May 2017 19:38:00 +0200 test: add isolated prune case (to test-obsolete-bundle-strip.t)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 19:38:00 +0200] rev 32524
test: add isolated prune case (to test-obsolete-bundle-strip.t) This adds a test where the prune marker is not related to any other obsmarkers.
Thu, 25 May 2017 19:37:47 +0200 test-obsolete-bundle-strip: add a complex split and fold case
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 19:37:47 +0200] rev 32523
test-obsolete-bundle-strip: add a complex split and fold case This is a more complex case that checks the logic used when split and fold gets into play.
Thu, 25 May 2017 19:37:29 +0200 test-obsolete-bundle-strip: add cases with prune on missing revs
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 19:37:29 +0200] rev 32522
test-obsolete-bundle-strip: add cases with prune on missing revs Same as the previously added case, but the prune is no longer known locally. This will mostly matter for the strip testing. Introducing the test early will help clarify patches related to strip.
Thu, 25 May 2017 19:37:29 +0200 obsolete: fix relevant-obsmarkers computation on pruned changeset
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 19:37:29 +0200] rev 32521
obsolete: fix relevant-obsmarkers computation on pruned changeset The markers pruning a node was not directly considered relevant for the pruned node, only to its parents. This went unnoticed during obsmarkers exchange because all ancestors of the pruned node would be included in the computation. This still affects obsmarkers exchange a bit since "inline" prune markers would be ignored (see second test case). This went unnoticed, because in such case, we always push another obsolescence markers for that node. We add explicit tests covering this case. (The set of relevant changeset is use in the obsmarkers discovery protocol used in the evolve experimental extension, the impact will be handled on the extension side).
Thu, 25 May 2017 19:37:07 +0200 test: add a test file for relevant obsmarkers and its usage
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 25 May 2017 19:37:07 +0200] rev 32520
test: add a test file for relevant obsmarkers and its usage The logic around obsmarkers "relevant" to a set of revs have a couple of test around in other places but no systematic testing. In addition, all the current testing focus on the exchange case (we looks at relevant markers for '::heads'). For bundles, we'll need something a bit different. We'll no longer have set of revision going down to the repository roots. So we'll have to test these cases too. In addition, stripping obsmarkers will introduce new logic around obsmarkers that will need testing too. So a new test file make sense here. We start with a simple tests, more advanced cases are coming in the next changesets. The extra testing catch a minor bug (later in the series).
Wed, 24 May 2017 19:39:33 -0700 annotate: add a new experimental --skip option to skip revs
Siddharth Agarwal <sid0@fb.com> [Wed, 24 May 2017 19:39:33 -0700] rev 32519
annotate: add a new experimental --skip option to skip revs This option is most useful for mechanical code modifications, especially ones that retain the same number of lines.
Wed, 24 May 2017 19:07:14 -0700 annotate: add core algorithm to skip a rev
Siddharth Agarwal <sid0@fb.com> [Wed, 24 May 2017 19:07:14 -0700] rev 32518
annotate: add core algorithm to skip a rev The core algorithm is inspired by git hyper-blame, implemented at https://chromium.googlesource.com/chromium/tools/depot_tools.git/+/master/git_hyper_blame.py. The heuristic is as documented in the comments.
Wed, 24 May 2017 17:40:08 -0700 annotate: make pair take all parents to pair against
Siddharth Agarwal <sid0@fb.com> [Wed, 24 May 2017 17:40:08 -0700] rev 32517
annotate: make pair take all parents to pair against In upcoming patches we'll need to be aware of all parents at the same time. This also exposes a potential bug: if a line can be annotated with both parents of a merge commit, it'll always be annotated with p2, not p1. I'm not sure if that's what we want, but at least the code makes it clear now.
Wed, 24 May 2017 17:38:28 -0700 annotate: move pair function to top level
Siddharth Agarwal <sid0@fb.com> [Wed, 24 May 2017 17:38:28 -0700] rev 32516
annotate: move pair function to top level We'll want to make this more complicated and have unit tests for it in upcoming patches.
Thu, 25 May 2017 23:20:00 +0900 bookmarks: fix check of hash-like name to not abort by ambiguous identifier
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 23:20:00 +0900] rev 32515
bookmarks: fix check of hash-like name to not abort by ambiguous identifier 'mark in repo' may raise LookupError. I set it to not be warned since bookmark names shorter than 4 chars aren't checked and short names are likely to be ambiguous.
Thu, 25 May 2017 23:18:02 +0900 localrepo: document that __contains__() may raise LookupError
Yuya Nishihara <yuya@tcha.org> [Thu, 25 May 2017 23:18:02 +0900] rev 32514
localrepo: document that __contains__() may raise LookupError
Sun, 21 May 2017 15:56:02 +0200 hidden: drop outdated comment about "dynamic" performance
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 15:56:02 +0200] rev 32513
hidden: drop outdated comment about "dynamic" performance This comment is now irrelevant since we have a faster algorithm and no cache.
Sun, 21 May 2017 15:47:06 +0200 hidden: unify the static and dynamic blocker logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 15:47:06 +0200] rev 32512
hidden: unify the static and dynamic blocker logic We no longer have cache and they both work the same way. Unifying the logic simplify the code and reduce the amount of set copies.
Sun, 21 May 2017 15:53:08 +0200 hidden: drop the hidden cache logic
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 15:53:08 +0200] rev 32511
hidden: drop the hidden cache logic The improvement in time complexitty and the speed-up in computation is large enough that the has little use now. Its update time can even gets in the way. So we drop it. This will allow us to unify the static/dynamic blockers logic in the next changeset.
Sun, 21 May 2017 16:01:20 +0200 hidden: simplify the computation of consistency blocker
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 16:01:20 +0200] rev 32510
hidden: simplify the computation of consistency blocker For a couple of years, we now have precomputed set for all mutable phases. We can use this set restrict our search and quickly detect non-hideable children of hideable changesets. This speeds up the hidden computation. See docstring of the new function for details. This new version reuses the '_domainancestors' function to keep the computation of revealed changeset in O(len(visible)) Below are perfvolatilesets timing from two Mozilla repositories with different contents. hidden cache is disabled while obtaining them. 1) Mozilla repository with: * 400667 changesets * 35 hidden changesets (first rev-268334) * 288 visible drafts * 1 unstable changeset Before: ! visible ! wall 0.001744 comb 0.000000 user 0.000000 sys 0.000000 (best of 1563) After: ! visible ! wall 0.000742 comb 0.000000 user 0.000000 sys 0.000000 (best of 3755) The timing above include the computation of obsolete changeset: ! obsolete ! wall 0.000396 comb 0.000000 user 0.000000 sys 0.000000 (best of 6816) So adjusted time give 1.3ms before versus 0.3ms after. A 4x speedup. 2) Mozilla repository with: * 405645 changesets * 4312 hidden changesets (first rev-326004) * 264 visible drafts * 1 unstable changeset Before: ! visible ! wall 0.025476 comb 0.030000 user 0.030000 sys 0.000000 (best of 111) After ! visible ! wall 0.007703 comb 0.010000 user 0.010000 sys 0.000000 (best of 358) The timing above include the computation of obsolete changeset: ! obsolete ! wall 0.006408 comb 0.010000 user 0.010000 sys 0.000000 (best of 404) So adjusted time give 19ms before versus 1.3ms after. A 17x speedup.
Sun, 21 May 2017 15:35:21 +0200 hidden: use _domainancestors to compute revs revealed by dynamic blocker
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 15:35:21 +0200] rev 32509
hidden: use _domainancestors to compute revs revealed by dynamic blocker The complexity of computing the revealed changesets is now 'O(revealed)'. This massively speeds up the computation on large repository. Moving it to the millisecond range. Below are timing from two Mozilla repositories with different contents: 1) mozilla repository with: * 400667 changesets * 35 hidden changesets (first rev-268334) * 288 visible drafts * obsolete working copy (dynamicblockers), Before: ! visible ! wall 0.030247 comb 0.030000 user 0.030000 sys 0.000000 (best of 100) After: ! visible ! wall 0.000585 comb 0.000000 user 0.000000 sys 0.000000 (best of 4221) The timing above include the computation of obsolete changeset: ! obsolete ! wall 0.000396 comb 0.000000 user 0.000000 sys 0.000000 (best of 6816) So adjusted time give 30ms before versus 0.2ms after. A 150x speedup. 2) mozilla repository with: * 405645 changesets * 4312 hidden changesets (first rev-326004) * 264 visible drafts * obsolete working copy (dynamicblockers), Before: ! visible ! wall 0.168658 comb 0.170000 user 0.170000 sys 0.000000 (best of 48) After ! visible ! wall 0.008612 comb 0.010000 user 0.010000 sys 0.000000 (best of 325) The timing above include the computation of obsolete changeset: ! obsolete ! wall 0.006408 comb 0.010000 user 0.010000 sys 0.000000 (best of 404) So adjusted time give 160ms before versus 2ms after. A 75x speedup.
Sun, 21 May 2017 15:21:46 +0200 hidden: add a function returning ancestors of revs within a domain
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 15:21:46 +0200] rev 32508
hidden: add a function returning ancestors of revs within a domain See documentation for details. This will be used to improve the hidden computation algorithm. See new changesets for usage.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip