- Mar 25, 2021
-
-
Raphaël Gomès authored
Matt Mackall is now Olivia Mackall. I reached out to her about changing the copyright notices to reflect this change and she gave me the green light, so I changed everything relevant. Differential Revision: https://phab.mercurial-scm.org/D10266
-
- Mar 22, 2021
-
-
Martin von Zweigbergk authored
As in the previous patch, I copied the snippet defining `PYTHON` from the root Makefile. Differential Revision: https://phab.mercurial-scm.org/D10252
-
Martin von Zweigbergk authored
I copied the snippet defining `PYTHON` from the root Makefile. Differential Revision: https://phab.mercurial-scm.org/D10251
-
Martin von Zweigbergk authored
I deleted my `python` binary as a test and a few tests started failing. Differential Revision: https://phab.mercurial-scm.org/D10250
-
- Mar 13, 2021
-
-
Pierre-Yves David authored
This a filenode being different between p1, p2 and result does not necessarily means a merges happens. For example p2 could be a strict newer version of p1, so the p2 version is picked by the manifest merging, but then the file is manually updated before the commit. In this case the file should be detected as touched. Differential Revision: https://phab.mercurial-scm.org/D10220
-
- Mar 15, 2021
-
-
Pierre-Yves David authored
The file cannot be merged if there was content to merge on the other side. So the previous record was wrong. In the general case, the file existed only on one side and got touched during the merge. So it should detected as touched. They are a special case where the merge manually prevent the file to be deleted. In this case the file is marked as `salvaged`. The result of this `salvaged` recording, copy-tracing-wise, is the same as recording it as `merged`. This is probably why they were recorded as `merged` in the first place. Differential Revision: https://phab.mercurial-scm.org/D10219
-
- Mar 02, 2021
-
-
Pierre-Yves David authored
A deleted file is brought back during a merge. Its content is changed in the same go. This reveal some issue with the upgrade code. Differential Revision: https://phab.mercurial-scm.org/D10088
-
- Mar 13, 2021
-
-
Pierre-Yves David authored
For file present only on one side and touched during merge, the upgrade code confused them as "merged". However they should be either "touched", or "salvaged" but they are currently recorded as "merged". See the next changesets for more details on these cases and fix. Differential Revision: https://phab.mercurial-scm.org/D10218
-
- Mar 10, 2021
-
-
Pulkit Goyal authored
While commiting a merge, the commit code does not know whether a file was merged during `hg merge` or not. This leads the commit code to look for filelog ancestor to choose parents of new filelog created on merge commit. This leads to wrong results in some cases as demonstrated by previous patch. From this patch, we start storing information about merged files in mergestate in stateextras and then use that on commit to detect whether we need to set two parents or not. Differential Revision: https://phab.mercurial-scm.org/D10149
-
- Mar 17, 2021
-
-
Pierre-Yves David authored
I though we had one, but actually we don't seem to. So here is a revset to reuse a list of node previously stored. Differential Revision: https://phab.mercurial-scm.org/D10230
-
- Mar 19, 2021
-
-
Matt Harbison authored
This is a slightly less forceful incarnation of D7384, where pytype can be appeased with some assertions rather than disabling warnings. Differential Revision: https://phab.mercurial-scm.org/D10236
-
Matt Harbison authored
Few if any of the callers are handling a `None` return, which is making pytype complain. I tried adding @overload definitions to indicate the bytes -> bytes and None -> None relationship, but pytype doesn't seem to apply that to `_()` through the function assignment. What did work was to change `_()` into its own function that called `gettext()`, but that has an extra function call overhead. Even putting that function into an `if pycompat.TYPE_CHECKING` block and leaving the existing assignments in the `else` block caused pytype to lose track of the @overloads. At that point, I simply gave up. PyCharm doesn't like that it can return None, given the new type hints, but pytype doesn't complain about this nor does it see any callers passing None. The most important thing here is to catch str being passed anyway. Differential Revision: https://phab.mercurial-scm.org/D10235
-
- Mar 18, 2021
-
-
Matt Harbison authored
Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D10234
-
- Mar 17, 2021
-
-
Pierre-Yves David authored
The current discovery dynamically adapt to complex situations. This makes it quick and effective, but also harder so study the effects of other improvements in such complex situation. So we add a new option to control this too. Differential Revision: https://phab.mercurial-scm.org/D10233
-
Pierre-Yves David authored
The new code is clearer and will make the next update simpler. Differential Revision: https://phab.mercurial-scm.org/D10232
-
Pierre-Yves David authored
These config option are here for people to experiment with it. So lets document them in the command that is used for experimentation. Differential Revision: https://phab.mercurial-scm.org/D10231
-
- Mar 19, 2021
-
-
Martin von Zweigbergk authored
Issue 5782 reported that `hg rebase -r <obsolete commit with pruned successor>` failed with an error saying that it would cause divergence. Commit b7e2cf114e85 (rebase: do not consider extincts for divergence detection (issue5782), 2018-02-09) fixed it by letting you rebase the commit. However, that fix seems inconsistent with how we handle `hg rebase -r <pruned commit>`. To me, it should make no difference whether a commit is pruned itself or if it has (only) pruned successors. This patch changes it so we treat these two kinds of commits the same way. I let the message we print remain "note: not rebasing <commit>, it has no successor" even though that last part is not technically correct for commits with pruned successors. I doubt it will confuse users. Differential Revision: https://phab.mercurial-scm.org/D10240
-
Jörg Sonnenberger authored
There are spurious errors in CI where the database is still locked, so force the daemon to quit to get deterministic behavior. Since the kill command itself is racy, also sleep 2s to give the server time to wake up and exit. Differential Revision: https://phab.mercurial-scm.org/D10244
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D10243
-
- Mar 20, 2021
-
-
Martin von Zweigbergk authored
This makes bisect use the standardized support for one-line commit summary I added a while back. That means that it will respect the `command-templates.oneline-summary` config. If also means that the default output now includes the first line of the commit message (see test impact). Differential Revision: https://phab.mercurial-scm.org/D10245
-
- Mar 19, 2021
-
-
Simon Sapin authored
This allows using the `?` operator in more places, as the next commit does. Differential Revision: https://phab.mercurial-scm.org/D10238
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D10242
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D10241
-
- Mar 18, 2021
-
-
Matt Harbison authored
-
- Mar 13, 2021
-
-
Matt Harbison authored
Otherwise, pytype and PyCharm flags it: File "/mnt/c/Users/Matt/hg/mercurial/localrepo.py", line 2903, in wlock: No attribute 'held' on _weakref.ReferenceType[nothing] [attribute-error] In Optional[Union[Any, _weakref.ReferenceType[nothing]]] File "/mnt/c/Users/Matt/hg/mercurial/localrepo.py", line 2904, in wlock: No attribute 'lock' on _weakref.ReferenceType[nothing] [attribute-error] In Optional[Union[Any, _weakref.ReferenceType[nothing]]] Differential Revision: https://phab.mercurial-scm.org/D10215
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10214
-
Matt Harbison authored
In practice, this wasn't a problem because of an internal check for an empty list, but it avoids the following pytype error: File "/mnt/c/Users/Matt/hg/mercurial/obsutil.py", line 823, in successorsandmarkers: No attribute 'markers' on List[nothing] [attribute-error] In Union[Any, List[nothing], _succs] Differential Revision: https://phab.mercurial-scm.org/D10213
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10212
-
Matt Harbison authored
I have no idea why this is needed, given the check immediately above. But without it, I'm getting this: File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1164, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockdescendants [missing-parameter] Expected: (fctx, fromline, toline) Actually passed: (fctx, fromline) File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1166, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockancestors [missing-parameter] Expected: (fctx, fromline, toline, followfirst) Actually passed: (fctx, fromline) Differential Revision: https://phab.mercurial-scm.org/D10211
-
Matt Harbison authored
Pytype got really confused that this could be `Union[module, bool]`, and spewed about tons of attributes that are not available on `bool`. Differential Revision: https://phab.mercurial-scm.org/D10210
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10209
-
Matt Harbison authored
Differential Revision: https://phab.mercurial-scm.org/D10208
-
Matt Harbison authored
I'm assuming that the cffi ones are handled somewhere, but the others definitely are. Differential Revision: https://phab.mercurial-scm.org/D10207
-
- Mar 12, 2021
-
-
Matt Harbison authored
This is already guarded with conditionals. The entire win32 module is conditionally loaded. File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 162, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 163, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 174, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 175, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] Differential Revision: https://phab.mercurial-scm.org/D10206
-
Matt Harbison authored
There's a graceful fallback when these methods are unavailable. Differential Revision: https://phab.mercurial-scm.org/D10205
-
- Mar 01, 2021
-
-
Pierre-Yves David authored
As the current test misbehavior show, this confuse various part of the code: - the committed file is different depending of the commit source, - the upgrade code compute the wrong information on this changeset. This will be fixed in upcoming patches. Differential Revision: https://phab.mercurial-scm.org/D10087
-
- Mar 10, 2021
-
-
Pulkit Goyal authored
Even if `filemerge.filemerge()` didn't result in conflicts, we should not remove stateextras for a file since we now use that for more things than just merge time information. We use stateextras to store information which is required to be used by commit. I tracked this down while finding why a patch of mine which adds more commit related information does not work as expected and looses the extras in mergestate. Differential Revision: https://phab.mercurial-scm.org/D10148
-
- Jan 13, 2021
-
-
Jörg Sonnenberger authored
In preparing for moving from SHA1 hashes to a modern hash function, place nullid and other constant magic vules in a class. Provide the active set of constants in the repository and push it down. Provide nullid directly in strategic places like the repository as it is accessed very often. This changeset introduces the API change, but not the mechanical replacement of the node.py attributes itself. Differential Revision: https://phab.mercurial-scm.org/D9750
-
- Mar 10, 2021
-
-
Jörg Sonnenberger authored
This change does not affect the hashing (which already did this transformation), but can change the log output in the rare case where this behavior was observed in repositories. The change can simplify iteration code where regular changesets and merges are distinct branches. Differential Revision: https://phab.mercurial-scm.org/D10150
-
Pierre-Yves David authored
I end up needing that on a regular basis and it turn out to be very simple to implement. See documentation and test for details. Differential Revision: https://phab.mercurial-scm.org/D10161
-