Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 20:03:30 +0200] rev 45193
commitctx: compute files added from _filecommit returns
When possible, lets avoid recomputing the same information again.
This is part of a larger refactoring/cleanup of the commitctx code to clarify
and augment the logic gathering metadata useful for copy tracing. The current
code is a tad too long and entangled to make such update easy. We start with
easy and small cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8703
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 06 Jul 2020 19:35:53 +0200] rev 45192
commitctx: return "touched" status from _filecommit
Instead of mutating a list passed in argument, we simply return the information
from the `_filecommit` function. This make for a cleaner API and allow for
richer information to be returned. That richer information will be used in the
next commit to avoid duplicated computation.
This is part of a larger refactoring/cleanup of the commitctx code to clarify
and augment the logic gathering metadata useful for copy tracing. The current
code is a tad too long and entangled to make such update easy. We start with
easy and small cleanup.
Differential Revision: https://phab.mercurial-scm.org/D8702
Manuel Jacob <me@manueljacob.de> [Tue, 21 Jul 2020 01:04:19 +0200] rev 45191
relnotes: add release notes for relevant changes I did since the 5.4 release
After having written the notes, I realized that the added points contain changes
that were part of the 5.4.2 release. These were never included in any release
notes. I asked on IRC whether they should be added to this file or not, but
didn’t get an answer to this question. If they should not be added here, I can
remove them.
Differential Revision: https://phab.mercurial-scm.org/D8770
Manuel Jacob <me@manueljacob.de> [Mon, 20 Jul 2020 18:04:19 +0200] rev 45190
relnotes: fix indentation
The two points were written by me. For some reason, I missed the fact that the
other points were indented by one space.
Differential Revision: https://phab.mercurial-scm.org/D8769
Manuel Jacob <me@manueljacob.de> [Mon, 20 Jul 2020 17:57:31 +0200] rev 45189
relnotes: make spacing before new section consistent
Differential Revision: https://phab.mercurial-scm.org/D8768
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 22 Jul 2020 14:58:49 +0530] rev 45188
tests: make one of 'worker process exited' line option in test-chg.t
I investigated and it seems like under high load, the child process is already
there and no new fork was created. Hence the process was not closed.
Connor Sheehan <sheehan@mozilla.com> [Wed, 22 Apr 2020 18:08:12 -0400] rev 45187
infinitepush: fix `{get,put}_args` formatting on Python 3
Calling `.format()` on a byte-string does not work, thus
causing an exception on Python 3. This commit adds a function
to paper over the difference.
Differential Revision: https://phab.mercurial-scm.org/D8781
Connor Sheehan <sheehan@mozilla.com> [Wed, 22 Apr 2020 17:59:17 -0400] rev 45186
infinitepush: replace `NamedTemporaryFile` with `pycompat.namedtempfile`
Fixes a Python 3 compat error when using the external bundle store.
Differential Revision: https://phab.mercurial-scm.org/D8780
Yuya Nishihara <yuya@tcha.org> [Mon, 20 Jul 2020 20:31:24 +0900] rev 45185
chgserver: discard buffered output before restoring fds (
issue6207)
On Python 3, flush() appears not discarding buffered data on EPIPE, and
the buffered data will be carried over to the restored stdout.
Yuya Nishihara <yuya@tcha.org> [Tue, 21 Jul 2020 20:49:05 +0900] rev 45184
hghave: fix possible int('') in has_clang_format()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 20 Jul 2020 22:16:26 +0530] rev 45183
Added signature for changeset
28163c5de797
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 20 Jul 2020 22:16:13 +0530] rev 45182
Added tag 5.5rc0 for changeset
28163c5de797
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 20 Jul 2020 21:56:27 +0530] rev 45181
merge default into stable for 5.5rc0
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Jul 2020 18:38:46 +0900] rev 45180
phases: move short-lived PyObject pointers to local scope
It helps understand which object should be decrefed on goto release.
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Jul 2020 18:35:17 +0900] rev 45179
phases: rename variable used for owned dict of phasesets
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 <yuya@tcha.org> [Sat, 18 Jul 2020 18:27:39 +0900] rev 45178
phases: leverage Py_BuildValue() to build PyInt and steal PyObject
"N" means "O" without incref, so we can just return the created tuple.
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Jul 2020 18:21:26 +0900] rev 45177
phases: make sure an exception should be set on error return
This should never happen, but the code looks wrong without PyErr_Set*() call.
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Jul 2020 18:19:14 +0900] rev 45176
phases: fix clang-format error
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Jul 2020 18:13:41 +0900] rev 45175
phases: fix error return with no exception from computephases()
PySet_Check() does not set an exception.
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Jul 2020 17:35:41 +0900] rev 45174
osutil: fix excessive decref on tuple creation failure in listdir()
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 <yuya@tcha.org> [Sun, 19 Jul 2020 17:24:16 +0900] rev 45173
revlog: fix excessive decref on tuple creation failure in parse_index2()
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
Manuel Jacob <me@manueljacob.de> [Mon, 20 Jul 2020 17:38:01 +0200] rev 45172
tests: correctly match clang-format version >= 10
The previous regex only matched the first digit, so "clang-format version
10.0.0" was recognized as version 1.
Daniel Ploch <dploch@google.com> [Tue, 14 Jul 2020 13:36:57 -0700] rev 45171
state: support validated declaration of nested unfinished ops
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
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 20:24:42 +0200] rev 45170
absorb: improve message for the case when changeset became empty
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
Joerg Sonnenberger <joerg@bec.de> [Sat, 18 Jul 2020 22:57:28 +0200] rev 45169
relnotes: extend
Differential Revision: https://phab.mercurial-scm.org/D8767
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 14 Jul 2020 15:42:28 +0530] rev 45168
merge: document return values of manifestmerge() and calculateupdates()
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
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 09 Jul 2020 19:02:10 +0530] rev 45167
merge: refactor code to advise fsmonitor in separate function
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 18:43:38 +0530] rev 45166
mergestate: document what mergestate._results is for
Understanding that dict is important for understanding how mergestate is
performing operations on dirstate.
Differential Revision: https://phab.mercurial-scm.org/D8739
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 09 Jul 2020 18:38:09 +0530] rev 45165
mergestate: rename a helpless variable name to bit helpful one
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 18:20:54 +0530] rev 45164
mergestate: remove unnecessary recordactions() from mergestate class
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 17:05:41 +0530] rev 45163
mergestate: document mergestate records in an organized way
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 16:39:42 +0530] rev 45162
mergestate: remove unused unsupported related mergestate records
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 16:38:24 +0530] rev 45161
mergestate: add comments about couple of record types and minor reorder
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 15:50:02 +0530] rev 45160
mergestate: remove unrequired RECORD_RESOLVED_OTHER record
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 <7895pulkit@gmail.com> [Thu, 09 Jul 2020 14:44:58 +0530] rev 45159
mergestate: rename addpath() -> addpathonflict() to prevent confusion
addpath() seems to imply that we are adding a new path/entry to the mergestate.
Differential Revision: https://phab.mercurial-scm.org/D8715
Manuel Jacob <me@manueljacob.de> [Sat, 18 Jul 2020 12:35:55 +0200] rev 45158
windows: don’t set `softspace` attribute in `winstdout`
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.
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 14:58:22 +0200] rev 45157
windows: handle file-like objects without isatty() method
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 <me@manueljacob.de> [Fri, 17 Jul 2020 08:21:31 +0200] rev 45156
exchange: check actually missing revs for obsolete / unstable revs (
issue6372)
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 <me@manueljacob.de> [Fri, 17 Jul 2020 07:59:20 +0200] rev 45155
tests: test that push doesn’t complain about unstable changesets if no changes
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 <rdamazio@google.com> [Fri, 17 Jul 2020 03:53:19 -0700] rev 45154
diff: move no-eol text constant to a common location
Differential Revision: https://phab.mercurial-scm.org/D8763
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Fri, 17 Jul 2020 02:31:42 -0700] rev 45153
revert: fix interactive reverting of end-of-file newline changes
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
Matt Harbison <matt_harbison@yahoo.com> [Thu, 16 Jul 2020 14:16:53 -0400] rev 45152
phabricator: clarify the multiple heads/roots error message for phabsend
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
Daniel Ploch <dploch@google.com> [Tue, 14 Jul 2020 13:35:54 -0700] rev 45151
error: normalize "unresolved conflicts" error messages with a custom class
Differential Revision: https://phab.mercurial-scm.org/D8713
Daniel Ploch <dploch@google.com> [Mon, 13 Jul 2020 16:42:44 -0700] rev 45150
error: unify the error message formats for 'rebase' and 'unshelve'
Differential Revision: https://phab.mercurial-scm.org/D8730
Augie Fackler <augie@google.com> [Wed, 01 Apr 2020 08:42:00 -0500] rev 45149
debugcommands: create new debugantivirusrunning command
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
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 03:28:52 +0200] rev 45148
windows: always work around EINVAL in case of broken pipe for stdout / stderr
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.
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 00:37:33 +0200] rev 45147
tests: make pipes / PTYs non-inheritable in test-stdio.py
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 <me@manueljacob.de> [Thu, 16 Jul 2020 23:49:04 +0200] rev 45146
util: enhance `nullcontextmanager` to be able to return __enter__ result
This makes its functionality and signature equivalent to Python 3.7’s
contextlib.nullcontext().
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 03:12:29 +0200] rev 45145
windows: augment docstring of `winstdout` class
Manuel Jacob <me@manueljacob.de> [Fri, 17 Jul 2020 09:20:48 +0200] rev 45144
discovery: change users of `outgoing.missingheads` to `outgoing.ancestorsof`
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.
Manuel Jacob <me@manueljacob.de> [Wed, 15 Jul 2020 11:38:54 +0200] rev 45143
discovery: fix docstring of `outgoing` class
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 <me@manueljacob.de> [Wed, 15 Jul 2020 09:51:11 +0200] rev 45142
discovery: weaken claim about returned common heads if ancestorsof are given
As the test case shows, the claim is not true in general.
Joerg Sonnenberger <joerg@bec.de> [Thu, 16 Jul 2020 19:48:49 +0200] rev 45141
cext: remove unused variables
Differential Revision: https://phab.mercurial-scm.org/D8760
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 14:18:18 -0400] rev 45140
phabupdate: allow resigning from revisions
Differential Revision: https://phab.mercurial-scm.org/D8756
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 14:14:58 -0400] rev 45139
phabupdate: allow revisions to be commandeered
Differential Revision: https://phab.mercurial-scm.org/D8755
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 14:13:16 -0400] rev 45138
phabupdate: allow revisions to be reopened
Differential Revision: https://phab.mercurial-scm.org/D8754
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 14:06:12 -0400] rev 45137
phabupdate: allow revisions to be marked "closed"
(Yes, the transaction name and final state in the comment here do differ.)
Differential Revision: https://phab.mercurial-scm.org/D8753
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 14:03:55 -0400] rev 45136
phabupdate: allows revisions to be marked "request-review"
Differential Revision: https://phab.mercurial-scm.org/D8752
Matt Harbison <matt_harbison@yahoo.com> [Wed, 15 Jul 2020 13:27:55 -0400] rev 45135
phabupdate: allow revisions to be marked with "plan changes"
Differential Revision: https://phab.mercurial-scm.org/D8751
Joerg Sonnenberger <joerg@bec.de> [Thu, 16 Jul 2020 15:56:13 +0200] rev 45134
status: match category text in the option description
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