Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 18:08:37 +0530] rev 45340
mergeresult: yield from getactions() instead of buidling a list and returning
Only 7 out of 29 callers change the underlying dict while iterating. So it's
better to yield and wrap the 7 callers with `list()`.
Differential Revision: https://phab.mercurial-scm.org/D8882
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 18:33:00 +0530] rev 45339
sparse: replace merge action values with mergestate.ACTION_* constants
Having bytestrings like `b'r'` makes it hard to understand for people who don't
know the code much or looking at it for the first time.
Differential Revision: https://phab.mercurial-scm.org/D8881
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 17:58:18 +0530] rev 45338
mergeresult: implement a len() function and use it
In next patch we will start yielding from `getactions()` instead of building and
returning a list. Hence we can no longer rely on that for getting us a length.
Differential Revision: https://phab.mercurial-scm.org/D8880
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 17:32:30 +0530] rev 45337
merge: replace use of actions dict with mergeresult object
There are still some places which can be improved by having a dedicated API,
this patch for now make all users of actions dict go through the mergeresult
object API.
Differential Revision: https://phab.mercurial-scm.org/D8879
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 14:54:45 +0530] rev 45336
mergeresult: add sort argument to getactions() method
This will be used in next patch.
Differential Revision: https://phab.mercurial-scm.org/D8878
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 03 Aug 2020 14:19:06 +0530] rev 45335
merge: pass mergeresult obj in merge._prefetchfiles()
Differential Revision: https://phab.mercurial-scm.org/D8877