Fri, 31 Jul 2020 10:05:07 -0700 packaging: include templates with their package as key in package_data
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 Jul 2020 10:05:07 -0700] rev 45326
packaging: include templates with their package as key in package_data This is similar to an earlier patch in this series. It seems more correct to use `mercurial.templates.coal` etc as keys in the `package_data` dict now that those modules are packages. Differential Revision: https://phab.mercurial-scm.org/D8858
Fri, 31 Jul 2020 09:49:52 -0700 packaging: mark mercurial.templates and subdirs as packages
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 Jul 2020 09:49:52 -0700] rev 45325
packaging: mark mercurial.templates and subdirs as packages We need these packages to be installed so PyOxidizer picks them up. Differential Revision: https://phab.mercurial-scm.org/D8855
Thu, 12 Dec 2019 12:41:01 -0800 templates: add __init__.py files to templates/ dirs
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Dec 2019 12:41:01 -0800] rev 45324
templates: add __init__.py files to templates/ dirs This is necessary for them to be loaded with `importlib.resources`, which we want to do for PyOxidizer and similar. `importlib.resources` cannot read resources from submodules (`resources.open_binary('mercurial.templates', 'coal/map')` is not valid), so we need one `__init__.py` per directory. Differential Revision: https://phab.mercurial-scm.org/D8854
Wed, 05 Aug 2020 13:36:50 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 05 Aug 2020 13:36:50 -0400] rev 45323
merge with stable
Tue, 21 Jul 2020 18:21:27 +0530 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 21 Jul 2020 18:21:27 +0530] rev 45322
localrepo: abort creating a shared repo if the source does not have store We cannot create a shared repository without a store IIUC. Let's abort in such cases. Differential Revision: https://phab.mercurial-scm.org/D8772
Tue, 21 Jul 2020 13:58:58 +0530 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 21 Jul 2020 13:58:58 +0530] rev 45321
localrepo: only use 'bookmarksinstore' requirement if we have 'store' This adds check that whether we have the 'store' requirement or not. If we don't have that, we skip adding the 'bookmarksinstore' requirement and warn user about it. Differential Revision: https://phab.mercurial-scm.org/D8771
Sat, 25 Jul 2020 01:42:41 +0530 mergeresult: make actionmapping a dict of dict instead of dict of lists
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 25 Jul 2020 01:42:41 +0530] rev 45320
mergeresult: make actionmapping a dict of dict instead of dict of lists This makes deleting a specific filename entry faster and easier. Differential Revision: https://phab.mercurial-scm.org/D8837
Sat, 25 Jul 2020 14:44:29 +0530 largefiles: introduce a constant for 'lfmr' action
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 25 Jul 2020 14:44:29 +0530] rev 45319
largefiles: introduce a constant for 'lfmr' action It's better to use a dedicated constant instead of a string which makes pretty less sense. Differential Revision: https://phab.mercurial-scm.org/D8836
Sat, 25 Jul 2020 14:41:20 +0530 largefiles: override merge.emptyactions() to include `lfmr`
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 25 Jul 2020 14:41:20 +0530] rev 45318
largefiles: override merge.emptyactions() to include `lfmr` I found it weird that we were not already doing this. I encountered this while using `emptyactions()` in mergeresult() class. Differential Revision: https://phab.mercurial-scm.org/D8835
Sat, 25 Jul 2020 01:17:35 +0530 merge: unify logic of couple of if-else's in manifestmerge()
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 25 Jul 2020 01:17:35 +0530] rev 45317
merge: unify logic of couple of if-else's in manifestmerge() Right now manifestmerge() contains very nested if-else conditions and it's not easy to understand what is happening. I was looking for easy unifications and found these two. Differential Revision: https://phab.mercurial-scm.org/D8834
Fri, 24 Jul 2020 23:49:08 +0530 sparse: add comment for an if condition which I tried to refactor
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 23:49:08 +0530] rev 45316
sparse: add comment for an if condition which I tried to refactor I tried to refactor this if condition and make it part of the if-else above but tests failed. I decided to add a comment about the check we are doing and why it's a separate if. Differential Revision: https://phab.mercurial-scm.org/D8833
Fri, 24 Jul 2020 23:40:07 +0530 mergeactions: use action constants instead of string values
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 23:40:07 +0530] rev 45315
mergeactions: use action constants instead of string values Having constants inplace of strings like 'c', 'cm' etc. makes it easier to understand the code. Differential Revision: https://phab.mercurial-scm.org/D8832
Sun, 02 Aug 2020 10:24:28 -0700 merge: use the new action based mapping introduced in mergeresult obj
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 02 Aug 2020 10:24:28 -0700] rev 45314
merge: use the new action based mapping introduced in mergeresult obj Before this patch, we have good number of instances of following types: ``` for f, (m, args, msg) in mresult.actions: if m == ACTION_X: do_something ``` We iterate over the whole list and then filter for a certain action. Previous patch introduced a action based mapping in mergeresult object. The above code now looks like: ``` for f, args, msg in mresult.getactions([ACTION_X, ...]): do_something ``` Differential Revision: https://phab.mercurial-scm.org/D8831
Fri, 24 Jul 2020 19:48:38 +0530 mergeresult: introduce action -> (filename, data, msg) mapping and related API
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 19:48:38 +0530] rev 45313
mergeresult: introduce action -> (filename, data, msg) mapping and related API Good number of places in code, we iterate over the actions dict which has filename as keys and filter based on the action. This patch introduced another mapping which has action as key. This will help in refactoring the code much more in upcoming patch. Differential Revision: https://phab.mercurial-scm.org/D8830
Sun, 02 Aug 2020 10:15:55 -0700 mergeresult: rename _actions to _filemapping
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 02 Aug 2020 10:15:55 -0700] rev 45312
mergeresult: rename _actions to _filemapping This is done because we will be introducing another dict which introduces the same information but with action name as key. Differential Revision: https://phab.mercurial-scm.org/D8829
Fri, 24 Jul 2020 19:19:47 +0530 sparse: pass mergeresult obj in sparse.filterupdatesactions() (API)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 19:19:47 +0530] rev 45311
sparse: pass mergeresult obj in sparse.filterupdatesactions() (API) Not able to see much which can be improved in this function by passing in mergeresult object but for API consistency and no function directly touching actions dict, it sounds like a good idea. Differential Revision: https://phab.mercurial-scm.org/D8828
Fri, 24 Jul 2020 19:13:20 +0530 merge: filter actions before calling _resolvetrivial()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 19:13:20 +0530] rev 45310
merge: filter actions before calling _resolvetrivial() In d49e490a9e85252886fd43258803bcad4fc88edb I made _resolvetrivial() to be called after upadting the sparse checkout. Looking at the code now, it seems to that me there is no need to even run _resolvetrivial() on actions which are filtered away. So let's update the actions before passing them into _resolvetrivial(). Differential Revision: https://phab.mercurial-scm.org/D8827
Fri, 24 Jul 2020 18:16:29 +0530 merge: introduce mergeresult.updateactions() and use it
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 18:16:29 +0530] rev 45309
merge: introduce mergeresult.updateactions() and use it We don't want direct editing and access of mergeresult._actions because soon we will like to maintain data in other structures also. Differential Revision: https://phab.mercurial-scm.org/D8826
Fri, 24 Jul 2020 17:57:23 +0530 merge: pass mergeresult instead of actions in _checkunknownfiles() (API)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 17:57:23 +0530] rev 45308
merge: pass mergeresult instead of actions in _checkunknownfiles() (API) Differential Revision: https://phab.mercurial-scm.org/D8825
Fri, 24 Jul 2020 17:52:33 +0530 merge: pass mergeresult obj instead of actions dict in _resolvetrivial()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 17:52:33 +0530] rev 45307
merge: pass mergeresult obj instead of actions dict in _resolvetrivial() Differential Revision: https://phab.mercurial-scm.org/D8824
Fri, 24 Jul 2020 17:49:13 +0530 merge: pass mergeresult obj instead of actions in _filternarrowactions()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 17:49:13 +0530] rev 45306
merge: pass mergeresult obj instead of actions in _filternarrowactions() We want to use rich mergeresult object and it's APIs instead of handling a dictionary. Differential Revision: https://phab.mercurial-scm.org/D8823
Fri, 24 Jul 2020 17:31:26 +0530 merge: pass mergeresult in checkpassconflicts() instead of actions (API)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 17:31:26 +0530] rev 45305
merge: pass mergeresult in checkpassconflicts() instead of actions (API) This is a part of series which aims to use mergeresult obj instead of an action dictionary. Differential Revision: https://phab.mercurial-scm.org/D8822
Fri, 24 Jul 2020 16:23:55 +0530 merge: add removefile() to mergeresult object
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 16:23:55 +0530] rev 45304
merge: add removefile() to mergeresult object There are cases where some further calculation makes the file not needing to be merged anymore and hence needs to be dropped in mergeresult object. This adds a function for that. Differential Revision: https://phab.mercurial-scm.org/D8821
Fri, 24 Jul 2020 16:18:39 +0530 merge: introduce mergeresult.addfile() and use it
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 16:18:39 +0530] rev 45303
merge: introduce mergeresult.addfile() and use it We want to use mergeresult object at more and more places instead of this actions dict to simplify code and further add new APIs to mergeresult object. This patch introduces `addfile()` which adds a new file to the internal actions dict for now. Differential Revision: https://phab.mercurial-scm.org/D8820
Fri, 24 Jul 2020 15:56:11 +0530 merge: make mergeresult constructor initialize empty object
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 15:56:11 +0530] rev 45302
merge: make mergeresult constructor initialize empty object In future patches, we will be going to update mergeresult object instead of building an actions dict and then setting it in the object. Differential Revision: https://phab.mercurial-scm.org/D8819
Fri, 24 Jul 2020 15:15:20 +0530 merge: improve documentation of fbid dict used for merge bid
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 15:15:20 +0530] rev 45301
merge: improve documentation of fbid dict used for merge bid I improved the comments explaning what the dict contains meanwhile organizing the comment structure which prevents some confusion. Due to formatting issues, the empty dict was wrapped in `()` which might decieve in thinking that it's a tuple of dict until you decide to find a comma. Differential Revision: https://phab.mercurial-scm.org/D8818
Fri, 24 Jul 2020 14:45:00 +0530 merge: move conversion of file-key dict to action-key dict in mergeresult
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 24 Jul 2020 14:45:00 +0530] rev 45300
merge: move conversion of file-key dict to action-key dict in mergeresult Initially the actions dict which we get has file has keys, but later we want a dict which has actions as keys. This patch moves code computing that to mergeresult class as that's where it should be anyway. Differential Revision: https://phab.mercurial-scm.org/D8817
Sun, 02 Aug 2020 10:12:21 -0700 merge: introduce hasconflicts() on mergeresult object
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 02 Aug 2020 10:12:21 -0700] rev 45299
merge: introduce hasconflicts() on mergeresult object This and upcoming patches will improve the mergeresult object making it more powerful and provide clean APIs for various things. Doing this will clean up the core merge code which is present in `update()` a bit. Differential Revision: https://phab.mercurial-scm.org/D8816
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 tip