Thu, 06 Aug 2020 13:51:43 +0530 merge: drop commitinfo argument to applyupdates (API)
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 06 Aug 2020 13:51:43 +0530] rev 45349
merge: drop commitinfo argument to applyupdates (API) We now pass the mergeresult object and hence there is no need to have a separate commitinfo argument as the required info is present in mergeresult object. Differential Revision: https://phab.mercurial-scm.org/D8904
Thu, 06 Aug 2020 13:27:38 +0530 merge: remove emptyactions() and use collections.defaultdict(list) instead
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 06 Aug 2020 13:27:38 +0530] rev 45348
merge: remove emptyactions() and use collections.defaultdict(list) instead emptyactions() used to return a dict which was populated and passed into applyupdates(). However, with recent changes, we no longer pass a plain dict, instead we pass the mergeresult object. There was only one usage of emptyactions and that too inside mergeresult object. That usage is replaced with collections.defaultdict(list) instead. Not sure why we were not using collections.defaultdict(list) from the beginning. Differential Revision: https://phab.mercurial-scm.org/D8903
Wed, 05 Aug 2020 16:52:51 +0530 merge: pass mergeresult obj in _forgetremoved() (API)
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 05 Aug 2020 16:52:51 +0530] rev 45347
merge: pass mergeresult obj in _forgetremoved() (API) Instead of returning a dict of actions and then updating it, let's pass the object directly and update it there. This makes `updateactions()` on mergeresult unused and this patch removes that. After this patch, we have couple of methods left on mergeresult class which still exposes the internal dict based action storage. Differential Revision: https://phab.mercurial-scm.org/D8889
Wed, 05 Aug 2020 16:00:25 +0530 mergeresult: introduce filemap() which yields filename based mapping
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 05 Aug 2020 16:00:25 +0530] rev 45346
mergeresult: introduce filemap() which yields filename based mapping We wanted to remove `actions` as this was leaking how we store things internally and was direct access to one of the member. This introduces filemap() which yields a map of `filename` -> `action, args, msg`. `mergeresult.actions` has been deleted as it's no longer required. Differential Revision: https://phab.mercurial-scm.org/D8888
Wed, 05 Aug 2020 15:41:23 +0530 mergeresult: add `files()` and use it
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 05 Aug 2020 15:41:23 +0530] rev 45345
mergeresult: add `files()` and use it `files()` will return a list of files on which an action needs to be performed. This is a step to stop exposing the underlying map to the user of this object. Differential Revision: https://phab.mercurial-scm.org/D8887
Wed, 05 Aug 2020 15:37:26 +0530 mergeresult: introduce getfile() and use it where required
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 05 Aug 2020 15:37:26 +0530] rev 45344
mergeresult: introduce getfile() and use it where required We want to hide the underlying dictionary from the users and provide API for valid and sane use cases. Differential Revision: https://phab.mercurial-scm.org/D8886
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 tip