Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 17:49:21 -0800] rev 44177
merge: don't auto-pick destination with `hg merge 'wdir()'`
If the user doesn't specify a commit to merge with, we'll have
`node==None` in `commands.merge()`. We'll then try to find a good
commit to merge with. However, if the user, for some strange reason,
runs `hg merge 'wdir()'`, we'll also have `node==None` and we'll do
that same. That's clearly not the intent, so let's not do that.
It turns out we'd instead crash on that command after this patch, so I
added special handling of it too.
Differential Revision: https://phab.mercurial-scm.org/D7996
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 16:05:11 -0800] rev 44176
merge: call hg.abortmerge() directly and return early
It's seem really weird to go through a lot of unrelated code before we
call `hg.merge(..., abort=True)` when we can just call
`hg.abortmerge()` and return early.
Differential Revision: https://phab.mercurial-scm.org/D7995
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 16:00:54 -0800] rev 44175
merge: check that there are no conflicts after --abort
Same idea as in
abcc82bf0717 (clean: check that there are no conflicts
after, 2020-01-24). We should reuse more code here, but that will come
later.
Differential Revision: https://phab.mercurial-scm.org/D7994
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 15:07:44 -0800] rev 44174
merge: use check_incompatible_arguments() for --abort
Differential Revision: https://phab.mercurial-scm.org/D7993
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Jan 2020 20:27:59 -0800] rev 44173
wix: use original version string for MSI filename
Version string normalization is mostly to placate MSI requirements.
I think it makes sense to use the original version string in
filenames.
Since we can have distinct versions normalizing to the same MSI
version string, this will allow us to distinguish between different
actual version strings based on the filename.
Differential Revision: https://phab.mercurial-scm.org/D8005
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Jan 2020 20:24:29 -0800] rev 44172
wix: always normalize version string
Before, it was possible to pass in a custom version string
which would not be valid in MSI. So we always normalize the
version string.
While we're here, also print when we normalize the version string,
for better visibility.
Differential Revision: https://phab.mercurial-scm.org/D8004
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 24 Jan 2020 20:21:53 -0800] rev 44171
wix: more robust normalization of RC version components
MSI has strict version requirements where the format is
`A.B.C[.D]` and all fields must be numeric
(https://docs.microsoft.com/en-us/windows/win32/msi/productversion?redirectedfrom=MSDN).
Only the first 3 are used by the installer itself.
Mercurial's version strings can have `rcN` and an optional
`+<commit>-<date>` fragment at the end.
This commit teaches the MSI version normalization to handle
both of these more robustly.
Before, we would throw away the `.rcN` component completely.
e.g. `5.3rc1` would get normalized to `5.3.0`. And worse,
`5.3rc0+5-abcdef` would get normalized to `5.3.5`.
After this commit, presence of an `.rcN` provides the
value for a 4th field. e.g. `5.3rc1` -> `5.3.0.1`. In
addition, the commit count from the `+` suffix gets
normalized into the 4th version component, but only if
the original version string didn't have a 4th version
component or if no `rcN` is present. e.g. `5.3+5-abcdef`
is `5.3.0.5`.
Differential Revision: https://phab.mercurial-scm.org/D8003
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Jan 2020 00:16:04 -0500] rev 44170
copyright: update to 2020
Differential Revision: https://phab.mercurial-scm.org/D8006
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Jan 2020 01:06:46 -0500] rev 44169
phabricator: fix a crash when submitting binaries (
issue6260)
I think this assumed that `p1()` returned the changectx instead of the previous
filelog entry.
Differential Revision: https://phab.mercurial-scm.org/D8010
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Jan 2020 17:15:45 -0800] rev 44168
rebase: move some variables after an error cases where they're not needed
Differential Revision: https://phab.mercurial-scm.org/D7905
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Jan 2020 10:44:23 -0800] rev 44167
rebase: clarify a little by calculating a set in Python instead of in revset
By calculating the set in Python, we can give it a name, which helps
readability.
Differential Revision: https://phab.mercurial-scm.org/D7904
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Jan 2020 15:12:50 -0800] rev 44166
merge: avoid a negation in the definition of updatedirstate
We only use `partial` in one place: the definition of
`updatedirstate`. Let's simplify that a little.
Differential Revision: https://phab.mercurial-scm.org/D7900
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 08:32:35 -0800] rev 44165
merge: move definition of `partial` closer to where it's used
Differential Revision: https://phab.mercurial-scm.org/D7983
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jan 2020 13:06:56 -0800] rev 44164
copies: extract function for finding directory renames
The directory rename code is logically quite isolated, so it makes
sense to make it physically isolated as well.
Differential Revision: https://phab.mercurial-scm.org/D7977
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jan 2020 15:23:30 -0800] rev 44163
copies: avoid calculating debug-only stuff without --debug
`renamedeleteset` and `divergeset` is only used with
`repo.ui.debugflag`, so let's avoid calculating them otherwise. While
at it, I also added a `del renamedeleteset` for consistency.
Differential Revision: https://phab.mercurial-scm.org/D7976
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 Jan 2020 15:20:12 -0800] rev 44162
copies: move early return in mergecopies() earlier
It wasn't obvious that the early return happened only when there are
no copies. That is the case, however, because if `fullcopy` is empty,
then so is `copies1` and `copies2`, and then so is `inversecopies1`
and `inversecopies2`, and then so is `allsources`, and then so is
`copy`, `diverge` and `renamedelete`.
By moving the early return earlier, we also avoid calculating the set
of added files from the base to each side.
Differential Revision: https://phab.mercurial-scm.org/D7975
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 07:00:45 -0800] rev 44161
tests: test merge of renames of different sources to same target
This is a really obscure scenario, but let's still have it tested so
we know when it changes.
Differential Revision: https://phab.mercurial-scm.org/D7985
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 09:33:02 -0800] rev 44160
clean: check that there are no conflicts after
As noted by Pulkit, there should never be any conflicts after doing a
clean update, so `hg.clean()` should never return `True`. Let's check
that assertion instead to clarify the code. The callers will now get a
`None` instead of a `False` returned, but that should be fine (both
result in a 0 exit status).
Differential Revision: https://phab.mercurial-scm.org/D7984
Martin von Zweigbergk <martinvonz@google.com> [Fri, 24 Jan 2020 14:32:53 -0800] rev 44159
progress: delete deprecated ui.progress()
Differential Revision: https://phab.mercurial-scm.org/D7991
Raphaël Gomès <rgomes@octobus.net> [Fri, 17 Jan 2020 15:34:11 +0100] rev 44158
rust-dependencies: update rayon
This is just to make sure we use the latest version and also makes it easier
to peruse the docs.
Differential Revision: https://phab.mercurial-scm.org/D7926
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Jan 2020 20:01:38 -0800] rev 44157
packaging: add configparser to inno requirements file
This dependency is missing and pip complains about it in
strict hashing mode. How this was missed, I have no clue.
Differential Revision: https://phab.mercurial-scm.org/D7973
Augie Fackler <augie@google.com> [Fri, 24 Jan 2020 11:05:42 -0500] rev 44156
merge with stable
Augie Fackler <raf@durin42.com> [Fri, 24 Jan 2020 11:02:59 -0500] rev 44155
Added signature for changeset
e4344e463c0c
Augie Fackler <raf@durin42.com> [Fri, 24 Jan 2020 11:02:58 -0500] rev 44154
Added tag 5.3rc1 for changeset
e4344e463c0c
Matt Harbison <matt_harbison@yahoo.com> [Fri, 24 Jan 2020 01:37:18 -0500] rev 44153
packaging: rename hgrc.d to defaultrc for Windows config files next to the exe
The code and the help still says that it will read hgrc.d next to the
executable. But this directory needs to exist to read the resource based config
files. Otherwise even `hg version` errors out:
$ /c/Program\ Files/Mercurial/hg.exe version
Traceback (most recent call last):
File "hg", line 43, in <module>
File "mercurial\dispatch.pyc", line 110, in run
File "mercurial\dispatch.pyc", line 226, in dispatch
File "mercurial\ui.pyc", line 308, in load
File "mercurial\rcutil.pyc", line 99, in rccomponents
File "mercurial\rcutil.pyc", line 69, in default_rc_resources
File "mercurial\utils\resourceutil.pyc", line 84, in contents
WindowsError: [Error 3] The system cannot find the path specified: 'c:\\Program Files\\mercurial\\defaultrc\\*.*'
Differential Revision: https://phab.mercurial-scm.org/D7981
Matt Harbison <matt_harbison@yahoo.com> [Fri, 24 Jan 2020 01:11:19 -0500] rev 44152
resourceutil: ensure `_rootpath` is defined under py2exe
Can't even run `hg version` without this.
Differential Revision: https://phab.mercurial-scm.org/D7980
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Jan 2020 15:08:42 -0800] rev 44151
merge: define updatedirstate a little earlier and reuse it
Differential Revision: https://phab.mercurial-scm.org/D7899
Martin von Zweigbergk <martinvonz@google.com> [Wed, 15 Jan 2020 15:07:43 -0800] rev 44150
merge: don't call update hook when using in-memory context
I'm pretty sure many hook implementors will assume that they can
inspect the working copy and/or dirstate parents when the hook is
called, so I don't think we should call the hook when using an
in-memory context. The new behavior matches that of the preupdate
hook.
Differential Revision: https://phab.mercurial-scm.org/D7898
Martin von Zweigbergk <martinvonz@google.com> [Thu, 23 Jan 2020 13:10:48 -0800] rev 44149
merge with stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Jan 2020 20:01:38 -0800] rev 44148
packaging: add configparser to inno requirements file
This dependency is missing and pip complains about it in
strict hashing mode. How this was missed, I have no clue.
Differential Revision: https://phab.mercurial-scm.org/D7973