Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Sep 2019 22:31:45 -0700] rev 42934
tests: move a config write to top of file since it applies to all tests
I'm about to add another test that depends on this config.
Differential Revision: https://phab.mercurial-scm.org/D6849
Augie Fackler <augie@google.com> [Tue, 10 Sep 2019 09:57:33 -0400] rev 42933
idirstate: group private methods and attrs that are in the interface
This makes it a little more obvious at a glance what work is
left. Fortunately there's not a whole lot left. I suspect the ignore
logic is going to be the tricky bit.
Differential Revision: https://phab.mercurial-scm.org/D6839
Augie Fackler <augie@google.com> [Tue, 10 Sep 2019 09:42:56 -0400] rev 42932
idirstate: remove now non-public _map attribute
Differential Revision: https://phab.mercurial-scm.org/D6838
Augie Fackler <augie@google.com> [Tue, 10 Sep 2019 09:21:38 -0400] rev 42931
interfaces: introduce an interface for dirstate implementations
As usual with adding interface definitions, this describes the way
things are, not the way we'd like things to be. There are some clear
problems in the interface right now (eg ._map leaks in a few places),
but I have plans to clean those up. There are also many missing
docstrings, but again, we'll make a second pass to clean that up.
Differential Revision: https://phab.mercurial-scm.org/D6836
Augie Fackler <augie@google.com> [Tue, 10 Sep 2019 09:41:58 -0400] rev 42930
cleanup: fix leakage of dirstate._map to client code
We already had proper accessors for most of the behavior of
dirstate._map that callers cared about exposed in the actual dirstate
class as public methods. Sigh.
There are two remaining privacy violations in the codebase after this change:
1) In the perf extension, which I suspect has to stick around because
it's really testing the dirstate implementation directly
2) In largefiles, where we deal with standins and mutating status. Looking at
this, I _strongly_ suspect a formal dirstate interface would allow
this to work via composition instead of inheritance and
monkeypatching. Fortunately, such wins are a part of my motivation
for this work. I anticipate we'll come back to this in due time.
Differential Revision: https://phab.mercurial-scm.org/D6837
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 08 Sep 2019 20:26:36 -0400] rev 42929
exchange: convert bookmark nodes from hex to bin ASAP
Differential Revision: https://phab.mercurial-scm.org/D6831
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 08 Sep 2019 20:10:32 -0400] rev 42928
exchange: avoid unnecessary conversion of bookmark nodes to hex (API)
Differential Revision: https://phab.mercurial-scm.org/D6830
Connor Sheehan <sheehan@mozilla.com> [Mon, 09 Sep 2019 14:26:43 -0400] rev 42927
highlight: fix encoding issues to enable Py3 compatibility
This commit fixes various encoding issues with the `highlight` extension
to enable compatibility with Python 3. Python `.encode()` and `.decode()`
requires the target encoding to be passed as a `str`, so the value of
`mercurial.encoding.encoding` must be converted before passing to the
function. Pygments also assumes the `str` type for values it works with,
so we must perform conversions before and after receiving values from its
APIs.
After applying this patch, `test-highlight.t` passes under Python 3. We
add it to `python3-whitelist` as well.
Tested with Pygments 2.4.2.
Differential Revision: https://phab.mercurial-scm.org/D6832
Connor Sheehan <sheehan@mozilla.com> [Tue, 10 Sep 2019 12:32:07 -0400] rev 42926
hgweb: add a `message` attribute to `hgweb.common.ErrorResponse`
This fixes a Python 3 bug where hgweb assumes an Exception
subclass will have a `.message` attribute after running
`Exception.__init__`.[1] The Python 3 way to get this info would
be `e.args[0]`, but adding a new named attribute is more
ergonomic in my view.
[1] https://www.mercurial-scm.org/repo/hg-committed/file/6ccf539aec71/mercurial/hgweb/hgwebdir_mod.py#l459
Differential Revision: https://phab.mercurial-scm.org/D6840
Matt Harbison <matt_harbison@yahoo.com> [Tue, 10 Sep 2019 22:52:04 -0400] rev 42925
uncommit: make -D/--date and -U/--user mutually exclusive
This is how amend and graft work (but not MQ). I'm not sure why this didn't
work for me when I first tried it.
Differential Revision: https://phab.mercurial-scm.org/D6842
Matt Harbison <matt_harbison@yahoo.com> [Tue, 10 Sep 2019 22:04:22 -0400] rev 42924
uncommit: drop the hyphen from --current-user and --current-date
I didn't pay enough attention to these long forms- graft, amend and MQ already
use the old style naming. It's probably more important to be consistent than
modern. The hypenated style came from evolve.
Yuya mentioned this naming discrepancy in 4145fd3569c3, but it didn't attract
any discussion[1]. There's also a bit of inconsistency in that the default
parameter for `currentdate` is `False` for graft, and `None` for the rest.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-January/126767.html
Differential Revision: https://phab.mercurial-scm.org/D6841
Connor Sheehan <sheehan@mozilla.com> [Mon, 09 Sep 2019 13:25:00 -0400] rev 42923
hgweb: fix websub regex flag syntax on Python 3
The `websub` config section for hgweb is broken under Python 3
when using regex flags syntax (ie the optional `i` in the example
from `hg help config.websub`:
patternname = s/SEARCH_REGEX/REPLACE_EXPRESSION/[i]
Flags are pulled out of the specified byte-string using a regular
expression, and uppercased. The flags are then iterated over and
passed to the `re` module using `re.__dict__[item]`, to get the
object attribute of the same name from the `re` module. So on Python
2 if the `il` flags are passed, this transition looks like:
`'il'` -> `'IL'` -> `'I'` -> `re.__dict__['I']` -> `re.I`
However on Python 3, these are bytes objects. When we iterate over
a bytes object in Python 3, instead of getting the individual characters
in the string as string objects of length one, we get the integer \
value corresponding to that byte. So the same transition looks like:
`b'il'` -> `b'IL'` -> `73` -> `re.__dict__[73]` -> `KeyError`
This commit fixes the type mismatch by converting the bytes to a
system string before iterating over each element to pass to `re`.
The transition will now look like:
`b'il'` -> `u'IL'` -> `u'I'` -> `re.__dict__[u'I']` -> `re.I`
In addition we expand `test-websub.t` to cover the regex flag case
(for both the `websub` section and `interhg`).
Differential Revision: https://phab.mercurial-scm.org/D6788
Augie Fackler <augie@google.com> [Mon, 09 Sep 2019 17:26:17 -0400] rev 42922
merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 09 Sep 2019 12:56:17 -0700] rev 42921
relnotes: we now require `sh` to support $(command) syntax to run test suite
For example, Solaris before version 11 had /bin/sh pointing to the old
Bourne Shell (which doesn't support $(command) syntax).
Differential Revision: https://phab.mercurial-scm.org/D6833
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 08 Sep 2019 20:09:31 -0400] rev 42920
doc: fix up confusing doc comment
Differential Revision: https://phab.mercurial-scm.org/D6829
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Sep 2019 23:15:52 -0700] rev 42919
strip: fix bug with treemanifests and unordered linkrevs
This is the treemanifest version of f45f7390c1c5 (strip: calculate
list of extra nodes to save and pass it to changegroupsubset,
2008-01-19).
Differential Revision: https://phab.mercurial-scm.org/D6795
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Sep 2019 23:10:28 -0700] rev 42918
repair: extract a helper for generating all manifest revlogs
We'll need to walk the manifest revlogs also to figure out which
manifests have linkrevs out of order (for fixing the bug shown in the
previous patch).
By the way, perhaps it would be more efficient in many cases to find
only the relevant directory manifest revlogs based on the files
instead of walking the entire store, but that can be changed later.
Differential Revision: https://phab.mercurial-scm.org/D6794
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Sep 2019 22:53:14 -0700] rev 42917
tests: show broken strip with treemanifests and unordered linkrevs
This is the treemanifest version of issue764.
Differential Revision: https://phab.mercurial-scm.org/D6793
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Dec 2018 11:06:26 -0800] rev 42916
tests: split out manifest case from test-strip-cross.t
The manifest case was added on after the other cases, in d67cfe0d4714
(test-strip-cross: test handling of linkrev crosses in the manifest,
2008-01-20). I think it's easier to read and modify if it's separated.
Differential Revision: https://phab.mercurial-scm.org/D6792
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Dec 2018 11:09:05 -0800] rev 42915
tests: don't log manifest-file in test-strip-cross.t
I'm confident that the file is there only to help produce a certain
manifest log; there is nothing special about the file's filelog
itself. (And there already is a `hg debugindex --manifest` call higher
up in the file that shows the crossed linkrevs.)
Differential Revision: https://phab.mercurial-scm.org/D6791
Martin von Zweigbergk <martinvonz@google.com> [Mon, 17 Dec 2018 10:27:00 -0800] rev 42914
tests: use positive revision numbers in test-strip-cross.t
It took me a long time to realize that '-r -1' was pulling revision -1
because I didn't even notice the minus sign until I tried changing the
revision number. The order of arguments doesn't matter, so I changed
from decreasing order to increasing while at it.
Differential Revision: https://phab.mercurial-scm.org/D6790
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Sep 2019 21:09:58 -0700] rev 42913
automation: implement "publish-windows-artifacts" command
The new command and associated functionality can be used to
automate the publishing of Windows release artifacts. It
supports uploading wheels to PyPI (using twine) and copying
the artifacts to mercurial-scm.org and updating the latest.dat
file to advertise them via the website.
I ran `automation.py publish-windows-artifacts 5.1.1` and it
appeared to "just work." But the real test will be to do this
on the next release...
Differential Revision: https://phab.mercurial-scm.org/D6786
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 05 Sep 2019 21:08:35 -0700] rev 42912
automation: upgrade to latest packages in requirements.txt
Let's stay modern.
Differential Revision: https://phab.mercurial-scm.org/D6785
Augie Fackler <augie@google.com> [Thu, 15 Aug 2019 14:53:27 -0400] rev 42911
localrepo: push manifestlog and changelog construction code into store
This feels substantially more appropriate, as the store is actually
the layer with knowledge of how to handle this storage. I didn't move
the caching decorators for now because that's going to require some
more involved work, and this unblocks my current experimentation.
Differential Revision: https://phab.mercurial-scm.org/D6732
Joerg Sonnenberger <joerg@bec.de> [Sat, 07 Sep 2019 12:49:33 +0200] rev 42910
notify: add option for deterministic message-id generation
Copied from email by durin42:
> Pierre-Yves asked offline why I asked a new option for this and why it
> is not the default. Message-Id is supposed to be unique world-wide and
> while it is desirable to have a deterministic mechanism for them for
> creating follow-up emails, it needs organisational control for ensuring
> the uniqueness.
Differential Revision: https://phab.mercurial-scm.org/D6824
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Sep 2019 23:20:11 -0400] rev 42909
uncommit: add options to update to the current user or current date
These are also from the evolve extension's version of uncommit.
I tried adding validation that both forms of user or date can't be specified at
the same time, but that fails because these show up in `opts` with a None value
whether or not the option was given on the command line. Presumably that means
the conditional in `resolvecommitoptions` could be simplified. But this is how
both evolve and MQ handle it.
Differential Revision: https://phab.mercurial-scm.org/D6828
Matt Harbison <matt_harbison@yahoo.com> [Sat, 07 Sep 2019 13:44:29 -0400] rev 42908
uncommit: add support to modify the commit message and date
Currently, the evolve extension's version of this command supports it.
Differential Revision: https://phab.mercurial-scm.org/D6827
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 14 Jun 2019 17:50:04 +0100] rev 42907
run-tests: add a dedicated 'isoptional' function
This is clearer than repeated manual call to to 'endswith'.
(This is a gratuitous cleanup that I made while investigating a bug).
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 14 Jun 2019 17:39:16 +0100] rev 42906
run-tests: remove the artificial indentation
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 14 Jun 2019 17:37:04 +0100] rev 42905
run-tests: extract a `process_out_line` from the main function
The main function doing line comparison is quite complex. Slicing it in smaller
piece should clarify it.
To avoid a huge diff, the code is kept at the same indentation. We'll re-indent
in the next changesets.
(This is a gratuitous cleanup that I made while investigating a bug).