Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Mar 2019 11:42:02 -0700] rev 42115
copies: extract function for deciding whether to use changeset-centric algos
We'll eventually have a "experimental.copies.read-from=changeset-only"
option too and I don't want to spread the logic for determining if we
should use changeset-centric of filelog-centric algorithms.
Differential Revision: https://phab.mercurial-scm.org/D6163
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Jan 2019 13:13:48 -0800] rev 42114
getrenamedfn: get copy data from context object if configured
The function returned from getrenamedfn() calls
filelog.renamed(). That won't work when storing copy metadata in the
changeset.
I've just switched to a simple implementation here. We may or may not
need to optimize it later, possibly by optimizing the callers.
No more tests fail with "--extra-config-opt
experimental.copies.read-from=compatibility)" than they did before
this patch.
Differential Revision: https://phab.mercurial-scm.org/D6162
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 31 Mar 2019 16:27:10 +0300] rev 42113
branchmap: implement __contains__()
We have good occurences of `if branch in branchmap()` in our code. If
__contains__() is not implemented then it will use __iter__() to find whether
the element exists or not which is not good.
I am bit confused that whether I should move existing callers to hasbranch() or
this patch is a good way.
Differential Revision: https://phab.mercurial-scm.org/D6206
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 31 Mar 2019 16:20:17 +0300] rev 42112
branchmap: prevent using __getitem__() in branchheads()
branchheads() can directly use self._entries instead.
Differential Revision: https://phab.mercurial-scm.org/D6205
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 27 Mar 2019 21:33:04 +0300] rev 42111
branchmap: dynamically resolve type of branchcache class
This is required to support subclassing.
Thanks to Yuya for suggesting this in D6151.
Differential Revision: https://phab.mercurial-scm.org/D6204
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Apr 2019 09:41:08 -0700] rev 42110
copies: print list of divergent renames in sorted order
The current order is not obvious to the user (and I may change it in a
later patch). Lexicographical order seems like the obvious choice
here.
Differential Revision: https://phab.mercurial-scm.org/D6227