- Jul 20, 2020
-
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
- Jul 18, 2020
-
-
Yuya Nishihara authored
It helps understand which object should be decrefed on goto release.
-
Yuya Nishihara authored
The phaseroots variable is used for two different objects: borrowed set and owned dict of sets. It's hard to track which object should have to be decrefed on error return.
-
Yuya Nishihara authored
"N" means "O" without incref, so we can just return the created tuple.
-
Yuya Nishihara authored
This should never happen, but the code looks wrong without PyErr_Set*() call.
-
Yuya Nishihara authored
-
Yuya Nishihara authored
PySet_Check() does not set an exception.
-
- Jul 19, 2020
-
-
Yuya Nishihara authored
The stat object would be freed on error for the same reason as the previous patch. makestat() can be inlined, but this patch doesn't change it. https://github.com/python/cpython/blob/2.7/Python/modsupport.c#L292 The __APPLE__ code is untested.
-
Yuya Nishihara authored
Since Py_BuildValue() steals the ownership of "N" arguments, these objects would already be freed if Py_BuildValue() returned NULL. https://github.com/python/cpython/blob/2.7/Python/modsupport.c#L292
-
- Jul 20, 2020
-
-
Manuel Jacob authored
The previous regex only matched the first digit, so "clang-format version 10.0.0" was recognized as version 1.
-
- Jul 14, 2020
-
-
Daniel Ploch authored
This enables extensions to define commands that delgate to rebase, evolve, etc. one or more times to also have their own unfinished states for the full sequence of operations without monkey-patching _unfinishedstates. Differential Revision: https://phab.mercurial-scm.org/D8714
-
- Jul 17, 2020
-
-
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
-
- Jul 18, 2020
-
-
Jörg Sonnenberger authored
Differential Revision: https://phab.mercurial-scm.org/D8767
-
- Jul 14, 2020
-
-
Pulkit Goyal authored
In future patches, I want to add one more return value which represents information which needs to stored and used at commit time. Differential Revision: https://phab.mercurial-scm.org/D8741
-
- Jul 09, 2020
-
-
Pulkit Goyal authored
merge.update() is quite hard to understand, found this an easy win. The end goal is to have better organized merge and mergestate handling and then fix some related bugs. Differential Revision: https://phab.mercurial-scm.org/D8740
-
Pulkit Goyal authored
Understanding that dict is important for understanding how mergestate is performing operations on dirstate. Differential Revision: https://phab.mercurial-scm.org/D8739
-
Pulkit Goyal authored
The old variable name `r` makes it ~impossible to understand what does it mean. One can only understand that after going to callers and hoping that its documented there. I also documented return value of the function involved while I was there. Differential Revision: https://phab.mercurial-scm.org/D8738
-
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
-
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.
-