- 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
-
- 09 Oct, 2020 1 commit
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D9182
-
- 17 Jul, 2020 1 commit
-
-
Manuel Jacob authored
In changeset f55099982bc5, I introduced the message "became empty and became ...", which I was never very happy with. Raphaël Gomès suggested "became empty as ...". That sounds much nicer. Differential Revision: https://phab.mercurial-scm.org/D8765
-
- 01 Jun, 2020 2 commits
-
-
Manuel Jacob authored
If the config rewrite.empty-successor=skip is set, a message "became empty and was dropped" is shown if the changeset became empty. If the config rewrite.empty-successor=keep is set, absorb may create changesets even if they became empty. It’s probably a good idea to make that explicit. Therefore the message is changed to be a combination of both: "became empty and became ...". Repeating the word "became" is not very elegant. This results from the fact that "became" was and is overloaded to indicate both the change from non-empty to empty and the successor relation. In the combinated message, both meanings are used in one sentence.
-
Manuel Jacob authored
This adds support for the recently added rewrite.empty-successor configuration.
-
- 27 Dec, 2019 1 commit
-
-
Matt Harbison authored
Flagged by PyCharm as an unused assignment for the variable in the list. Differential Revision: https://phab.mercurial-scm.org/D7751
-
- 20 Jun, 2020 1 commit
-
-
Sushil Khanchi authored
Differential Revision: https://phab.mercurial-scm.org/D8643
-
- 01 Jun, 2020 3 commits
-
-
Manuel Jacob authored
Most commands in Mercurial (commit, rebase, absorb itself) don’t create empty changesets or drop them if they become empty. If there’s a changeset that’s empty, it must be a deliberate choice of the user. At least it shouldn’t be absorb’s responsibility to prune them. The fact that changesets that became empty during absorb are pruned, is unaffected by this. This case was found while writing patches which make it possible to configure absorb and rebase to not drop empty changesets. Even without having such config set, I think it’s valuable to preserve changesets which were already empty.
-
Manuel Jacob authored
This makes the behavior consistent with 'hg commit', which allows to create otherwise empty changesets if they close the branch. A lost branch closure can inadvertently re-open a branch, so it should be preserved.
-
Manuel Jacob authored
This makes the behavior consistent with 'hg commit', which allows to create otherwise empty changesets if the branch changes compared to the parent. A branch change can denote important information, so it should be preserved.
-
- 07 Oct, 2019 1 commit
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7029
-
- 11 Jun, 2019 1 commit
-
-
Pulkit Goyal authored
Doing bytes[0] will return the ascii value of that position which breaks comparison with a bytechar. This makes test-absorb.t work again on py3. Differential Revision: https://phab.mercurial-scm.org/D6508
-
- 16 Jan, 2019 1 commit
-
-
Augie Fackler authored
Differential Revision: https://phab.mercurial-scm.org/D5610
-
- 20 May, 2019 1 commit
-
-
Augie Fackler authored
While investigating a bug in `hg absorb -e` I unintentionally discovered `hg absorb --interactive` and its brokenness. This adds a test and restores the functionality. Note that this interface is still marked experimental, so we can change this to be more sophisticated in the future. Differential Revision: https://phab.mercurial-scm.org/D6411
-
- 06 Oct, 2019 3 commits
-
-
Gregory Szorc authored
.iteritems() -> .items() is the last source transform being performed. But it is also the most widely used. This commit adds a pycompat.iteritems symbol and imports it in place of .iteritems() for usage in hgext/. I chose to stop at just hgext/ because the patch will be large and it is an easy boundary to stop at since we can disable source transformation on a per-package basis. There are places where the type does implement items() and we could call items() directly. However, this would require critical thought and I thought it would be easier to just blindly change the code. We know which call sites need to be audited in the future because they have "pycompat.iteritems." With this change, we no longer perform source transformation on hgext! Differential Revision: https://phab.mercurial-scm.org/D7014
-
Augie Fackler authored
Done with python3.7 contrib/byteify-strings.py -i $(hg files 'set:mercurial/**.py - mercurial/thirdparty/** + hgext/**.py - hgext/fsmonitor/pywatchman/** - mercurial/__init__.py') black -l 80 -t py33 -S $(hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**') # skip-blame mass-reformatting only Differential Revision: https://phab.mercurial-scm.org/D6972
-
Augie Fackler authored
This is using my patch to black (https://github.com/psf/black/pull/826) so we don't un-wrap collection literals. Done with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"' | xargs black -S # skip-blame mass-reformatting only # no-check-commit reformats foo_bar functions Differential Revision: https://phab.mercurial-scm.org/D6971
-
- 16 Apr, 2019 1 commit
-
-
Rodrigo Damazio Bovendorp authored
This increases safety of using absorb by both aborting when another operation is in progress (since the absorption could confuse any other command a lot) and holding the locks throughout the reading of the working directory (for which changes to absorb) and the reading of the repo (for which changes to absorb into). Differential Revision: https://phab.mercurial-scm.org/D6237
-
- 06 Mar, 2020 1 commit
-
-
Augie Fackler authored
Built with: hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**" - hgext/fsmonitor/pywatchman/**' | xargs pyupgrade --keep-percent-format --keep-extraneous-parens and then blackened. pyupgrade comes from https://github.com/asottile/pyupgrade with a patch to let me preserve extraneous parens (which we use for marking strings that shouldn't be translated), and lets us clean up a bunch of idioms that have cruftily accumulated over the years. # skip-blame no-op automated code cleanups Differential Revision: https://phab.mercurial-scm.org/D8255
-
- 31 Jan, 2020 1 commit
-
-
Martin von Zweigbergk authored
The interactive mode seems to work well. I have previously thought that `-i` should be what `-e` does, but the current behavior matches what other `-i` flags do (select a subset of the hunks), so I think that is what we want. Differential Revision: https://phab.mercurial-scm.org/D8055
-
- 28 Feb, 2019 4 commits
-
-
Martin von Zweigbergk authored
scmutil.cleanupnodes() schedules stripping to be done after the current transaction, so we can safely run it within the transaction. This also means that the phase will be updated within the transaction, which I believe means that the initial (possibly incorrect) phase will not visible. Differential Revision: https://phab.mercurial-scm.org/D6037
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D6036
-
Martin von Zweigbergk authored
A side-effect of this is the new warning in the test case, but the warning is valid, so I don't think that's a problem. Differential Revision: https://phab.mercurial-scm.org/D6035
-
Martin von Zweigbergk authored
The operation is useful for e.g. `hg obslog` output. Differential Revision: https://phab.mercurial-scm.org/D6034
-
- 23 Feb, 2019 1 commit
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D6018
-
- 17 Jan, 2019 1 commit
-
-
Martin von Zweigbergk authored
These were found by IntelliJ. There are many more, but these seemed pretty safe. Differential Revision: https://phab.mercurial-scm.org/D5629
-
- 14 Dec, 2018 1 commit
-
-
Danny Hooper authored
Differential Revision: https://phab.mercurial-scm.org/D5428
-
- 09 May, 2019 1 commit
-
-
Martin von Zweigbergk authored
When you have a merge commit checked out and run `hg absorb`, it would tell you abort: no mutable changeset to change That makes it sound like the problem is public commits when isn't really. Let's be more specific in this case. There was already a test case that test this, so that now prints the new message. I added a new test case that shows the old message (when a public commit is checked out). Differential Revision: https://phab.mercurial-scm.org/D6354
-
- 12 Oct, 2018 1 commit
-
-
Rodrigo Damazio Bovendorp authored
We previously used the '^' prefix to indicate that a command should be shown on the short list (shown for just "hg"), but that's a horrible hack, so I'm removing it. Differential Revision: https://phab.mercurial-scm.org/D5069
-
- 13 Oct, 2018 1 commit
-
-
Rodrigo Damazio Bovendorp authored
I'm separating this into its own commit so people can bikeshed over the actual categorization (vs the support for categories). These categories are based on the help implementation we've been using internally at Google, and have had zero complaints. Differential Revision: https://phab.mercurial-scm.org/D5067
-
- 12 Oct, 2018 5 commits
-
-
Mark Thomas authored
Update the help text to reflect the recent changes to absorb in D4999. The `-p` option actually only affects the `-a` option: without `-a`, the changes are printed; with `-a` the changes are only printed if `-p` is specified. Reword the help text for `-p` to reflect this. Differential Revision: https://phab.mercurial-scm.org/D5022
-
Mark Thomas authored
Change the default absorb behaviour to print the changes out and then prompt the user if they want to absorb the changes or not. Providing the `-p` option still prints the result and exits. A new `-a` option is provided which applies the changes without printing them, giving the equivalent of the old behaviour. Differential Revision: https://phab.mercurial-scm.org/D4999
-
Mark Thomas authored
Differential Revision: https://phab.mercurial-scm.org/D4998
-
Mark Thomas authored
Change absorb to use a formatter to generate its output. This allows the use of templates to customize the output. Differential Revision: https://phab.mercurial-scm.org/D4997
-
Matt Harbison authored
I don't see a sane way to print the summary to identify the changed commit, but this at least makes it a bit easier to identify a commit when a group of them changes.
-
- 23 Sep, 2018 1 commit
-
-
Pulkit Goyal authored
This fixes couple of tests on Python 3. There is only one absorb test left failing on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4694
-
- 05 Sep, 2018 1 commit
-
-
Matt Harbison authored
I'm used to pushing to non-publishing repos, so this was the last thing I thought to check.
-
- 09 Aug, 2018 2 commits
-
-
Augie Fackler authored
Use pycompat.maplist() in the one place that matters and use the default iterator of a dict instead of iterkeys(). Two new tests pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4174
-
-
- 06 Aug, 2018 1 commit
-
-
Gregory Szorc authored
I'm not even sure what it is supposed to stand for. Differential Revision: https://phab.mercurial-scm.org/D4126
-