- 22 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
This very similar to earlier patches (e.g. for `InputError`) and part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9339
-
- 20 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9312
-
- 12 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
This very similar to an earlier patch (which was for `InputError`). In this patch, I also updated the transplant extension only because `test-transplant.t` would otherwise have needed a `#if continueflag`. Differential Revision: https://phab.mercurial-scm.org/D9310
-
- 07 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
This patch introduces a `InputError` class and replaces many uses of `error.Abort` by it in `commands` and `cmdutil`. This is a part of https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. There will later be a different class for state errors (to raise e.g. when there's an unfinished operation). It's not always clear when one should report an input error and when it should be a state error. We can always adjust later if I got something wrong in this patch (but feel free to point out any you notice now). Differential Revision: https://phab.mercurial-scm.org/D9167
-
- 28 Oct, 2020 1 commit
-
-
Dan Villiom Podlaski Christiansen authored
Differential Revision: https://phab.mercurial-scm.org/D9256 --HG-- branch : stable
-
- 16 Oct, 2020 7 commits
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9223
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9222
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9221
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9220
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9219
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9217
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9216
-
- 04 Nov, 2020 2 commits
-
-
Martin von Zweigbergk authored
The shouldn't be a reason to call `sys.exit()` instead of letting the code return normally. I've remove the call in both `hg serve` and `hg debugserve`. Differential Revision: https://phab.mercurial-scm.org/D9271
-
Martin von Zweigbergk authored
This is a simple refactoring to show the callers of the method, so it's easier to reason about the impact of removing the `sys.exit()` calls in subsequent patches. Differential Revision: https://phab.mercurial-scm.org/D9270
-
- 15 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
We had a user who tried to pass a source file. The command then fails with `<file>: not unmarking as copy - file is not marked as copied`, so at least it's not just silent, but let's be a little clearer in the documentation. Differential Revision: https://phab.mercurial-scm.org/D9214
-
- 09 Sep, 2020 1 commit
-
-
Yuya Nishihara authored
Still displayer part is in commands.grep(), the core grep logic is now reusable. I'll revisit the displayer stuff later since it will be another long series.
-
- 04 Oct, 2020 1 commit
-
-
Yuya Nishihara authored
It's no longer a command-level function, but a pure helper to walk revisions in a windowed way. This change will help eliminate reverse dependency of revset.py -> grep.py -> cmdutil.py in future patches.
-
- 09 Sep, 2020 7 commits
-
-
Yuya Nishihara authored
The main grep loop will be extracted to a searcher method, but this skipping condition depends on the result of display() function.
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
Yuya Nishihara authored
Prepares for extracting stateful functions from commands.grep().
-
Yuya Nishihara authored
commands.grep() has lots of functions and classes. Let's split it into reusable components so we can leverage them to implement a revset predicate for 'hg grep --diff'. I want to do 'hg log -r "diff(pattern)"'.
-
Yuya Nishihara authored
These functions will be extracted to new module.
-
- 10 Sep, 2020 3 commits
-
-
Yuya Nishihara authored
cmdutil.walkchangerevs() now takes (revs, makefilematcher) in place of (match, opts), and only provides the "windowing" functionality. Unused classes and functions will be removed by the next patch. "hg grep --follow" (--all-files) is still broken since there is no logic to follow copies while traversing changelog, but at least, it does follow the DAG.
-
Yuya Nishihara authored
Prepares for the migration to logcmdutil's logic, where cmdutil.walkchangerevs() won't always build an exact set of paths to be scanned.
-
Yuya Nishihara authored
Prepares for migrating walkchangerevs() to logcmdutil's logic, which provides matcher-based interface.
-
- 12 Sep, 2020 1 commit
-
-
Yuya Nishihara authored
I tried to refactor logcmdutil.getrevs() without using an options struct, but none of these attempts didn't work out. Since every stage of getrevs() needs various log command options (e.g. both matcher and revset query need file patterns), it isn't possible to cleanly split getrevs() into a command layer and a core logic. So, this patch introduces a named struct to carry command options in slightly abstracted way, which will be later used by "hg grep" and "hg churn". More fields will be added to the walkopt struct. Type hints aren't verified. I couldn't figure out how to teach pytype to load its own attr type stubs in place of our .thirdparty.attr. Conditional import didn't work. s/^from \.thirdparty // is the only way I found pytype could parse the @attr.ib decorator.
-
- 21 Sep, 2020 2 commits
-
-
Martin von Zweigbergk authored
We have had this higher-level function (higher than `merge.update()`, that is) for a while. Let's simply some callers by using it. I don't know why I didn't do this when I introduced the function. After this patch, there are no remaining callers that call `hg.updaterepo()` with `overwrite=True`. We'll clean that up soon. Differential Revision: https://phab.mercurial-scm.org/D9063
-
Martin von Zweigbergk authored
I've sent several earlier patches adding `merge.clean_update()`, `merge.merge()` etc, one function for each use case. This patch continues that work. I plan to hide the complex `update()` eventually. Differential Revision: https://phab.mercurial-scm.org/D9064
-
- 18 Sep, 2020 2 commits
-
-
Martin von Zweigbergk authored
The merge driver code was added in late 2015. I think '406a654b41cb::6f045b563fa5 & user("sid0")' is a reasonable revset for finding the relevant commits, including preparation for it. The code is very poorly tested, which makes it very hard to maintain. It seems it's only used by FB and they don't use this code base anymore, so let's remove the code to make it easier for us to maintain our product. Differential Revision: https://phab.mercurial-scm.org/D9041
-
Pulkit Goyal authored
With `format.exp-share-safe` enabled, we now read the `.hg/hgrc` of the shared source also. This patch adds `--shared` flag to `hg config` command which can be used to edit that shared source config file. It only works if the repository is shared one and is shared using the safe method. Differential Revision: https://phab.mercurial-scm.org/D8659
-
- 29 Oct, 2020 1 commit
-
-
Dan Villiom Podlaski Christiansen authored
Sometimes, a commit will result in an exact match of a preexisting commit, and if that commit isn't a branch head, hg will incorrectly note that it created a new head. Instead, we should warn the user that commit already existed in the repository. In practice, this bug is rather uncommon, and will only occur when the usr explicitly sets the date. Please note that this commit contains an API change to cmdutil.commitstatus() Differential Revision: https://phab.mercurial-scm.org/D9257
-
- 26 Oct, 2020 1 commit
-
-
Dan Villiom Podlaski Christiansen authored
Differential Revision: https://phab.mercurial-scm.org/D9261
-
- 17 Oct, 2020 1 commit
-
-
Yuya Nishihara authored
I'm a bit confused while reading 03690079d7dd, which says "a destination file", but the code loops over matched files.
-
- 15 Oct, 2020 1 commit
-
-
Pierre-Yves David authored
In the process on general clone bundle automatically, we need to make some function available more widely. This is a good opportunity to extract a significant amount of code from `mercurial.exchange` into a new `mercurial.bundlecaches`. This make `mercurial.exchange` move under the 3K line range (hooray…). The module is called `bundlecaches` because I expect it to be eventually useful for more than just clone bundle (like pull bunbles). Differential Revision: https://phab.mercurial-scm.org/D9208
-
- 01 Jul, 2020 1 commit
-
-
Pulkit Goyal authored
Previous patches add a safe mode for sharing repositories which involve sharing of source requirements and config files. In certain situations we might need to add a config to source repository which we does not want to share. For this, we add a `.hg/hgrc-not-shared` which won't be shared. This also adds a `--non-shared` flag to `hg config` command to see the non-shared config. Differential Revision: https://phab.mercurial-scm.org/D8673
-
- 16 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D9218
-
- 23 Oct, 2020 1 commit
-
-
Martin von Zweigbergk authored
The existing `[templates]` section lets the user define their own keys and then refer to them on the command line with `-T`. There are many cases where hg wants to use a user-defined template with a given name, such as `ui.logtemplate` and `ui.mergemarkertemplate`. This patch starts moving such configs in a common section by moving `ui.logtemplate` to `command-templates.log` (with an alias from the old name, of course). Differential Revision: https://phab.mercurial-scm.org/D9245
-
- 09 Jul, 2020 1 commit
-
-
Pulkit Goyal authored
This function is updating dirstate which sounds like not something which a method on mergestate class should do. Also this just calls another function. Lets directly call that function and remove this reducing mergestate responsibility a bit. There was single caller which is updated. Differential Revision: https://phab.mercurial-scm.org/D8737
-