- Jul 09, 2020
-
-
Pulkit Goyal authored
This makes clear which mergestate record is used for what and group them based on how they are used right now. Differential Revision: https://phab.mercurial-scm.org/D8719
-
Pulkit Goyal authored
I tried to find users of this but was unable to find. Seems like RECORD_OVERRIDE is doing for what they were used before. Differential Revision: https://phab.mercurial-scm.org/D8718
-
Pulkit Goyal authored
I am trying to divide the records into certain groups and then have dedicated objects for them. Taking baby steps in that direction. Differential Revision: https://phab.mercurial-scm.org/D8717
-
Pulkit Goyal authored
This was introduced in last cycle however while working on refactoring mergestate, I realized it's unncessary. This will break users who did a merge using previous version, did this kind of storage and before commiting updated the mercurial version. Differential Revision: https://phab.mercurial-scm.org/D8716
-
Pulkit Goyal authored
addpath() seems to imply that we are adding a new path/entry to the mergestate. Differential Revision: https://phab.mercurial-scm.org/D8715
-
- Jul 18, 2020
-
-
Manuel Jacob authored
Python 2 file objects have the `softspace` attribute (https://docs.python.org/2/library/stdtypes.html#file.softspace), which is used by the print statement to track its internal state. The documentation demands from file-like objects only that the attribute is writable and initialized to 0. Method `file.write()` sets it to 0, but this is not documented. Historically, sys.stdout was replaced by an instance of the `winstdout` class, so it needed to behave exactly the same (the softspace fix was introduced in 705278e70457). Nowadays we don’t replace sys.stdout and don’t use the print statement on `winstdout` instances, so we can safely drop it.
-
- Jul 17, 2020
-
-
Manuel Jacob authored
Copying the function is not nice, but moving around stuff to avoid the circular import didn’t seem to be worth the effort.
-
Manuel Jacob authored
The previous code was using `outgoing.ancestorsof`, which was originally called `outgoing.missingheads` although not containing the missing heads. This confusion was probably the reason why the buggy code was written. The actually outgoing changesets are stored in `outgoing.missing`. By checking all outgoing changesets, we avoid the problem and can show the list of all obsolete or unstable changesets, which is more helpful for the user.
-
Manuel Jacob authored
When there’re no outgoing changes, push doesn’t complain about unstable changesets. There is currently a bug (see issue6372) that causes that there is an abort on push when the outgoing changes contain another changeset even if that is not obsolete or unstable. A test case and fix for that is sent in the next patch.
-
Rodrigo Damazio Bovendorp authored
Differential Revision: https://phab.mercurial-scm.org/D8763
-
Rodrigo Damazio Bovendorp authored
The chunk reversal used by `revert -i` in Curses mode was not taking this case into account. Differential Revision: https://phab.mercurial-scm.org/D8762
-
- Jul 16, 2020
-
-
Matt Harbison authored
As pointed out in followup feedback for c1c922391314, it's confusing to say there are multiple items and then only list one. Differential Revision: https://phab.mercurial-scm.org/D8761
-
- Jul 14, 2020
-
-
Daniel Ploch authored
Differential Revision: https://phab.mercurial-scm.org/D8713
-
- Jul 13, 2020
-
-
Daniel Ploch authored
Differential Revision: https://phab.mercurial-scm.org/D8730
-
- Apr 01, 2020
-
-
Augie Fackler authored
This writes the EICAR test file to .hg/cache, in an attempt to trigger an AV scanner's scanning engine. This should let us (in theory) detect some cases when a user's slowness is a result of AV scanning. Differential Revision: https://phab.mercurial-scm.org/D8353
-
- Jul 17, 2020
-
-
Manuel Jacob authored
In 29a905fe23ae, I missed the fact that the `winstdout` class works around two unrelated bugs (size limit when writing to consoles and EINVAL in case of broken pipe) and that the latter bug happens even when no console is involved. When writing a test for this, I realized that the same problem applies to stderr, so I applied the workaround for EINVAL to both stdout and stderr. The size limit is worked around in the same case as before (consoles on Windows on Python 2). For that, I changed the `winstdout` class.
-
- Jul 16, 2020
-
-
Manuel Jacob authored
A following patch requires that to test closing the receiving end of the pipe / PTYs. Even for existing tests, it might be safer to make the lifetime of the pipes / PTYs as short as possible.
-
Manuel Jacob authored
This makes its functionality and signature equivalent to Python 3.7’s contextlib.nullcontext().
-
- Jul 17, 2020
-
-
Manuel Jacob authored
-
Manuel Jacob authored
The attribute `missingheads` was recently renamed to `ancestorsof`, as it, despite the old name, doesn’t contain the missing heads but the changesets that were requested (including ancestors) for the outgoing operation. Changing all the users enables to print a warning if the old name is used. There is a good chance that some of the users are buggy because of the old name. Changing them to use the new name makes it more obvious that they are buggy. All users need to be reviewed for bugs. When sending patches for fixing them, the change will be more obvious without having to explain again and again the discrepancy of the old attribute name and what it actually contained.
-
- Jul 15, 2020
-
-
Manuel Jacob authored
Also, introduce a more correct name `ancestorsof` for what was named `missingheads` before. For now, we just forward `ancestorsof` to `missingheads` until all users are changed. There were some mistakes in the old docstring / name: * `missingheads` (new name: `ancestorsof`) contains the revs whose ancestors are included in the outgoing operation. It may contain non-head revs and revs which are already on the remote, so the name "missingheads" is wrong in two ways. * `missing` contains only ancestors of `missingheads`, so not *all nodes* present in local but not in remote. * `common` might not contain all common revs, e.g. not some that are not an ancestor of `missingheads`. It seems like the misleading name have fostered an actual bug (issue6372), where `outgoing.missingheads` was used assuming that it contains the heads of the missing changesets.
-
Manuel Jacob authored
As the test case shows, the claim is not true in general.
-
- Jul 16, 2020
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D8760
-
- Jul 15, 2020
-
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D8756
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D8755
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D8754
-
Matt Harbison authored
(Yes, the transaction name and final state in the comment here do differ.) Differential Revision: https://phab.mercurial-scm.org/D8753
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D8752
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D8751
-
- Jul 16, 2020
-
-
Jörg Sonnenberger authored
The ! category in the main status help text is defined as "missing", so use the same text for the help text of --delete. Differential Revision: https://phab.mercurial-scm.org/D8759
-
- Jul 15, 2020
-
-
Martin von Zweigbergk authored
It seems to me that `hg purge` is clearly a "working directory management" command and not a "repository management" command. The working copy is all that's affected, after all; the repo is not affected at all. Differential Revision: https://phab.mercurial-scm.org/D8757
-
- Jul 16, 2020
-
-
Martin von Zweigbergk authored
`setup.py` has a mechanism for generating a list of bundled extensions and their documenation and putting it in a `hgext/__index__.py` file. That file is then read from `extensions.py`, which makes `hg help extensions` work in py2exe binaries. This patch makes it so `setup.py` produces the `hgext/__index__.py` file also when called by PyOxidizer. Thanks to Matt Harbison for pointing out the existence of `__index__.py`! Differential Revision: https://phab.mercurial-scm.org/D8758
-
- Jul 07, 2020
-
-
Jörg Sonnenberger authored
As final step of dealing with the holes in the phase numbers, make phaseroots and phasesets both dictionaries indexed by the phase number. Further adjust the interface of the C module by pushing the node to revision mapping down as it is cheaper on the C side to deal with revision numbers. Overall, the patch series improves a no-change "hg up" for my NetBSD test repository from 4.7s to 1.3s. Differential Revision: https://phab.mercurial-scm.org/D8698
-
Pulkit Goyal authored
It was not obvious to understand the code so I added some comments. Differential Revision: https://phab.mercurial-scm.org/D8690
-
Pulkit Goyal authored
Some variable names were now confusing as we refactored the code in a separate function. For example, `node1a` leads to ideas why `1a` and not `1`. The variable storing path to patch file was named as `dirX` instead of `fileX`. Renamed these variables and added couple of comments. Differential Revision: https://phab.mercurial-scm.org/D8689
-
Pulkit Goyal authored
When we are diffing patches, there is no 3 way diff. Differential Revision: https://phab.mercurial-scm.org/D8688
-
Pulkit Goyal authored
Now that code for both cases, diffing patches or files is in separate function, it will be better to refactor them more and understand. Differential Revision: https://phab.mercurial-scm.org/D8687
-
Pulkit Goyal authored
The current extdiff code is hard to understand on first look. Took me few hours to grasp the code. Before adding more things, decided to do some refactoring. Differential Revision: https://phab.mercurial-scm.org/D8686
-
- Jun 01, 2020
-
-
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.
-