Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:41:08 +0300] rev 41678
branchmap: decode a label only once
This moves decoding of a label out of for loop. Minor speed up expected in cases
when one branch has multiple heads. For example: someone using bookmarks as
branches and hence ending up with multiple heads on default branch.
Differential Revision: https://phab.mercurial-scm.org/D5932
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:34:35 +0300] rev 41677
branchmap: move __init__ up in branchcache class
Making __init__ the first function defined helps understanding the class much
better.
Differential Revision: https://phab.mercurial-scm.org/D5931
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 22:50:53 -0800] rev 41676
match: delete unused root and cwd arguments from {always,never,exact}() (API)
Differential Revision: https://phab.mercurial-scm.org/D5930
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:35:36 -0800] rev 41675
match: delete unused root and cwd arguments to constructors (API)
Most matchers no longer need the root and cwd
arguments. patternmatcher and includematcher still need the root
argument for subincludes.
Differential Revision: https://phab.mercurial-scm.org/D5929
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 21:33:21 -0800] rev 41674
dirstate: call and cache os.getcwd() in constructor
I'm about to make scmutil.matchfiles() not pass the root and cwd paths
to match.exact(), since they no longer have any effect. That turned
out to have the surprising effect of making some tests
(test-rebase-scenario-global.t and test-removeemptydirs.t) crash when
the working directory was removed. The problem was that my patch
removed the call to repo.getcwd(), which caused the current working
directory to not be cached in the dirstate as early as it was
before. This patch fixes that by caching the current working directory
in the dirstate constructor.
Differential Revision: https://phab.mercurial-scm.org/D5928
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:37 -0800] rev 41673
cleanup: prefer matchmod.{always,never}() over accessing matchers directly
We have these factory methods so we should use them.
Differential Revision: https://phab.mercurial-scm.org/D5927
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:33 -0800] rev 41672
match: allow passing in badfn to always() and never()
So that no callers are required to access the matchers themselves.
Differential Revision: https://phab.mercurial-scm.org/D5926