Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 17:16:43 +0200] rev 43325
py3: fix headencode() with display=False
We previously called str() on a email.header.Header object. On Python 2,
this returns a bytestring and the __str__ method is actually an alias to
.encode() method. On Python 3, __str__ does not perform encoding (and
returns a unicode string). To keep a consistent behavior across Python
versions, we explicitly use .encode() and we wrap the result with
encoding.strtolocal() to get a bytestring in all cases. As a side effect
of forcing bytes conversion, we need to decode back in _addressencode().
This is to make test-notify.t pass on Python 3.
Also note that headers are now encoded in some patchbomb tests; this is
because the charset is not always "us-ascii" ("iso-8859-1" otherwise) on
Python 3.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 14:31:24 +0200] rev 43324
mail: catch LookupError in headdecode()
We already catch this exception in _encode() (called by headencode()).
It gets raised when running test-notify.t with Python 3.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 16:56:36 +0200] rev 43323
py3: account for extra line break in email headers in test-notify.t
Long headers appears to be wrapped with new lines. In test-notify.t, we
have a "filter.py" that replaces "\n" by " ", so we get an extra space
in a Message-Id with a long value.
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 10 Oct 2019 13:48:30 +0200] rev 43322
py3: use as_bytes() method of EmailMessage
In Python 3, as_bytes() corresponds to as_string() in Python 2.
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 23:00:58 +0100] rev 43321
py3: use %d instead of %s when formatting an int into a bytestring
The latter wasn't noticed before since no tests exercise --confirm at all, let
alone on an existing DREV.
The former is only hit during an intermittent network issue during amending at
the end of a phabsend, so doesn't seem testable.
Differential Revision: https://phab.mercurial-scm.org/D7153
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 17:18:16 +0200] rev 43320
packaging: ship only a single binary Debian package
We merge the mercurial and mercurial-common binary packages into a
single mercurial package. This is essentially to ease installation (and
upgrade) using a simple "dpkg -i" command. This also simplifies
debian/rules by removing arch (in)dependent cleanups during
installation.
We have the mercurial binary Breaks: and Replaces: mercurial-common so
that the latter will be removed upon upgrade.
Also note the change from "override_dh_install" to
"override_dh_auto_install" in debian/rules: this is because we do not
want "make install" to be run automatically as we need the
--install-layout=deb of "setup.py install" (otherwise, files would end
up in $DESTDIR/usr/local).
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 17:18:57 +0200] rev 43319
packaging: avoid running bare "make install" in debian/rules
We change the "override_dh_install" target to "override_dh_auto_install"
in debian/rules (see dh_auto_install(1) for details). This is because we
do not want "make install" to be run automatically as we need the
--install-layout=deb of "setup.py install". Otherwise, files end up in
$DESTDIR/usr/local. At the moment, this is not a problem since files
installed in debian/tmp (the default location) are not packed into
binary packages (because there are debian/mercurial and
debian/mercurial-common directories). This is cleaner to avoid running
make more than needed.
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 16:35:27 +0200] rev 43318
packaging: distinguish clean and build steps from install in Debian
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 16:25:41 +0200] rev 43317
packaging: also move Debian .buildinfo file in output directory
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:53:30 -0700] rev 43316
packaging: upgrade packages distributed with Windows installers
We like to use the latest versions of things.
I added pywin32-ctypes to the explicit list of packages so running
on !Windows will pull in the dependency.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:28:23 -0700] rev 43315
automation: install Python 2.7.17, 3.7.5, and PyPy 7.2.0
These were all recently released and we should use them in
automation.
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:25:06 -0700] rev 43314
contrib: install Python 2.7.17 and 3.7.5 in Windows environment
These are the latest Python versions and we should use them.
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:48:59 +0200] rev 43313
packaging: use /usr/bin/python3 shebang for scripts in Debian
"hg" script is already correct because it is handled by setup.py but
"hg-ssh" will be rewritten by dh_python into "/usr/bin/python" which is
not wanted as we target Python 3. By passing --shebang=/usr/bin/python3
to dh_python3, we force shebangs to be set with this value.
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:32:54 +0200] rev 43312
packaging: fix path where .deb files are looked for
In builddeb script, the path where .deb files are looked for should
simply be $OUTPUTDIR since the previous instruction moves those files
there.
This fixes "make deb".
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 09:52:31 +0200] rev 43311
packaging: let Debian package depends on sensible-utils
This fixes the following Lintian error:
E: mercurial-common: missing-depends-on-sensible-utils etc/mercurial/hgrc.d/default-tools.rc
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 10:59:54 +0200] rev 43310
packaging: upgrade Debian packaging to build with Python 3
Also drop the explicit "Depends: python" as debhelper will add it.
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:26:41 +0200] rev 43309
py3: decode bytes before logging in run-tests.py
Avoids messages like "Found prerequisite b'diff' at b'/usr/bin/diff'"
under Python 3.
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:28 -0400] rev 43308
Added signature for changeset
59338f956109
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:27 -0400] rev 43307
Added tag 5.2rc0 for changeset
59338f956109
Augie Fackler <augie@google.com> [Mon, 21 Oct 2019 11:09:48 -0400] rev 43306
merge default into stable for 5.2 release
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 18 Oct 2019 11:18:41 -0400] rev 43305
grep: update docs to reflect new --all-files default
These docs no longer even mention the old weird behaviour that was
poorly understood and underutilised. I think this undocumentation
effectively deprecates it.
Sushil khanchi <sushilkhanchi97@gmail.com> [Sun, 06 Oct 2019 11:06:10 -0400] rev 43304
grep: enable all-files by default (BC)
This patch deprecates the `--all-files` flag and make the all-files
behaviour as default.
In test-grep.t, I removed '--all-files' from every command where it was
used, to reflect that all-files behaviour is default and there is no
change even after the removal.
And other changes in test files are because of changed behaviour.
Differential Revision: https://phab.mercurial-scm.org/D7000
.. bc::
`hg grep` now searches working copy file contents by default. We
recognize this is a significant change from past behavior, but
surveys of large bodies of users indicated nobody used (and almost
nobody understood) the previous no-flags behavior of `hg
grep`. The new behavior aligns with the behavior most users
expected (including hg's maintainers), which also happens to be
the behavior of `git grep`. Given that the old behavior was
confusing to the point of being unusable, we were comfortable
changing this behavior.
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:08:23 +0200] rev 43303
lfs: dedent documentation section about .hglfs file
The leading ".hglfs::" is interpreted as a macro in generated man page
and, as it is unknown, the whole section does not render. Also, having
the section marked as preformatted (::) makes it render verbatim in
HTML, which is not desired as the text contains formatting markers. So
we just dedent the section and remove the ".hglfs::" line. The example
file is still indented and rendered preformatted.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 17 Oct 2019 16:06:06 +0200] rev 43302
copies: simplify chain loop
This is a mostly gratuitous change to make the code more direct.
Differential Revision: https://phab.mercurial-scm.org/D7131
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 17 Oct 2019 02:17:24 +0200] rev 43301
sidedatacopies: only fetch information once for merge
Before this change, merge would result in reading the data from revlog twice.
With this change, we keep the information in memory until we encounter the other
parent.
When looking at pypy, I see about 1/3 of the changesets with copy information
being merge. Not doing duplicated fetch for them provide a significant speedup.
revision: large amount; added files: large amount; rename small amount;
c3b14617fbd7 9ba6ab77fd29
before: ! wall 0.767042 comb 0.760000 user 0.750000 sys 0.010000 (median of 11)
after: ! wall 0.671162 comb 0.670000 user 0.650000 sys 0.020000 (median of 13)
revision: large amount; added files: small amount; rename small amount;
c3b14617fbd7 f650a9b140d2
before: ! wall 1.170169 comb 1.170000 user 1.130000 sys 0.040000 (median of 10)
after: ! wall 1.030596 comb 1.040000 user 1.010000 sys 0.030000 (median of 10)
revision: large amount; added files: large amount; rename large amount;
08ea3258278e d9fa043f30c0
before: ! wall 0.209846 comb 0.200000 user 0.200000 sys 0.000000 (median of 46)
after: ! wall 0.170981 comb 0.170000 user 0.170000 sys 0.000000 (median of 56)
revision: small amount; added files: large amount; rename large amount;
df6f7a526b60 a83dc6a2d56f
before: ! wall 0.013248 comb 0.010000 user 0.010000 sys 0.000000 (median of 223)
after: ! wall 0.013295 comb 0.020000 user 0.020000 sys 0.000000 (median of 222)
revision: small amount; added files: large amount; rename small amount;
4aa4e1f8e19a 169138063d63
before: ! wall 0.001672 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
after: ! wall 0.001666 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
revision: small amount; added files: small amount; rename small amount;
4bc173b045a6 964879152e2e
before: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8010)
after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8007)
revision: medium amount; added files: large amount; rename medium amount;
c95f1ced15f2 2c68e87c3efe
before: ! wall 0.168599 comb 0.160000 user 0.160000 sys 0.000000 (median of 58)
after: ! wall 0.133316 comb 0.140000 user 0.140000 sys 0.000000 (median of 73)
revision: medium amount; added files: medium amount; rename small amount;
d343da0c55a8 d7746d32bf9d
before: ! wall 0.036052 comb 0.030000 user 0.030000 sys 0.000000 (median of 100)
after: ! wall 0.032558 comb 0.030000 user 0.030000 sys 0.000000 (median of 100)
Differential Revision: https://phab.mercurial-scm.org/D7127
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2019 18:23:34 +0200] rev 43300
copies: move from a copy on branchpoint to a copy on write approach
Before this changes, any branch points results in a copy of the dictionary containing the
copy information. This can be very costly for branchy history with few rename
information. Instead, we take a "copy on write" approach. Copying the input data
only when we are about to update them.
In practice we where already doing the copying in half of these case (because
`_chain` makes a copy), so we don't add a significant cost here even in the
linear case. However the speed up in branchy case is very significant. Here are
some timing on the pypy repository.
revision: large amount; added files: large amount; rename small amount;
c3b14617fbd7 9ba6ab77fd29
before: ! wall 1.399863 comb 1.400000 user 1.370000 sys 0.030000 (median of 10)
after: ! wall 0.766453 comb 0.770000 user 0.750000 sys 0.020000 (median of 11)
revision: large amount; added files: small amount; rename small amount;
c3b14617fbd7 f650a9b140d2
before: ! wall 1.876748 comb 1.890000 user 1.870000 sys 0.020000 (median of 10)
after: ! wall 1.167223 comb 1.170000 user 1.150000 sys 0.020000 (median of 10)
revision: large amount; added files: large amount; rename large amount;
08ea3258278e d9fa043f30c0
before: ! wall 0.242457 comb 0.240000 user 0.240000 sys 0.000000 (median of 39)
after: ! wall 0.211476 comb 0.210000 user 0.210000 sys 0.000000 (median of 45)
revision: small amount; added files: large amount; rename large amount;
df6f7a526b60 a83dc6a2d56f
before: ! wall 0.013193 comb 0.020000 user 0.020000 sys 0.000000 (median of 224)
after: ! wall 0.013290 comb 0.010000 user 0.010000 sys 0.000000 (median of 222)
revision: small amount; added files: large amount; rename small amount;
4aa4e1f8e19a 169138063d63
before: ! wall 0.001673 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
after: ! wall 0.001677 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
revision: small amount; added files: small amount; rename small amount;
4bc173b045a6 964879152e2e
before: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8023)
after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 7997)
revision: medium amount; added files: large amount; rename medium amount;
c95f1ced15f2 2c68e87c3efe
before: ! wall 0.201898 comb 0.210000 user 0.200000 sys 0.010000 (median of 48)
after: ! wall 0.167415 comb 0.170000 user 0.160000 sys 0.010000 (median of 58)
revision: medium amount; added files: medium amount; rename small amount;
d343da0c55a8 d7746d32bf9d
before: ! wall 0.036820 comb 0.040000 user 0.040000 sys 0.000000 (median of 100)
after: ! wall 0.035797 comb 0.040000 user 0.040000 sys 0.000000 (median of 100)
The extra cost in the linear case can be reclaimed later with some extra logic.
Differential Revision: https://phab.mercurial-scm.org/D7124
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2019 18:35:14 +0200] rev 43299
copies: compute the exact set of revision to walk
This change make the code clearer by removing the revision queue. It comes
without very noticeable performance impact. However the simpler code will be
easier to update in later changesets.
revision: large amount; added files: large amount; rename small amount;
c3b14617fbd7 9ba6ab77fd29
before: ! wall 1.430082 comb 1.430000 user 1.390000 sys 0.040000 (median of 10)
after: ! wall 1.405192 comb 1.410000 user 1.390000 sys 0.020000 (median of 10)
revision: large amount; added files: small amount; rename small amount;
c3b14617fbd7 f650a9b140d2
before: ! wall 1.971366 comb 1.970000 user 1.950000 sys 0.020000 (median of 10)
after: ! wall 1.892541 comb 1.890000 user 1.870000 sys 0.020000 (median of 10)
revision: large amount; added files: large amount; rename large amount;
08ea3258278e d9fa043f30c0
before: ! wall 0.252594 comb 0.250000 user 0.240000 sys 0.010000 (median of 38)
after: ! wall 0.240075 comb 0.240000 user 0.240000 sys 0.000000 (median of 40)
revision: small amount; added files: large amount; rename large amount;
df6f7a526b60 a83dc6a2d56f
before: ! wall 0.013100 comb 0.010000 user 0.010000 sys 0.000000 (median of 226)
after: ! wall 0.013247 comb 0.010000 user 0.010000 sys 0.000000 (median of 223)
revision: small amount; added files: large amount; rename small amount;
4aa4e1f8e19a 169138063d63
before: ! wall 0.001633 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
after: ! wall 0.001670 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
revision: small amount; added files: small amount; rename small amount;
4bc173b045a6 964879152e2e
before: ! wall 0.000078 comb 0.000000 user 0.000000 sys 0.000000 (median of 11984)
after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 7982)
revision: medium amount; added files: large amount; rename medium amount;
c95f1ced15f2 2c68e87c3efe
before: ! wall 0.207093 comb 0.210000 user 0.210000 sys 0.000000 (median of 47)
after: ! wall 0.201551 comb 0.200000 user 0.200000 sys 0.000000 (median of 48)
revision: medium amount; added files: medium amount; rename small amount;
d343da0c55a8 d7746d32bf9d
before: ! wall 0.038462 comb 0.040000 user 0.040000 sys 0.000000 (median of 100)
after: ! wall 0.036578 comb 0.030000 user 0.030000 sys 0.000000 (median of 100)
Differential Revision: https://phab.mercurial-scm.org/D7076
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2019 17:53:29 +0200] rev 43298
copies: add an explicit test using multiple roots
We explicitly add a test checking for copies of connected revision but involving
a different roots. This make sure the copies coming purely from the new roots
does not interfere with the merge.
Differential Revision: https://phab.mercurial-scm.org/D7075
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 02 Oct 2019 18:16:02 -0400] rev 43297
sidedatacopies: fast path data fetching if revision has no sidedata
When using the side data mode, we know their won't be any copy information
sidedata. Skipping revision restoration give an important speed boost.
In the future, there will be other user of sidedata, reducing the efficiency of
this. We should consider adding a dedicated flag in revlog V2 to preserve this
optimisation. The current situation is good enough for now.
revision: large amount; added files: large amount; rename small amount;
c3b14617fbd7 9ba6ab77fd29
before: ! wall 2.401569 comb 2.400000 user 2.390000 sys 0.010000 (median of 10)
after: ! wall 1.429294 comb 1.430000 user 1.410000 sys 0.020000 (median of 10)
revision: large amount; added files: small amount; rename small amount;
c3b14617fbd7 f650a9b140d2
before: ! wall 3.519140 comb 3.520000 user 3.470000 sys 0.050000 (median of 10)
after: ! wall 1.963332 comb 1.960000 user 1.960000 sys 0.000000 (median of 10)
revision: large amount; added files: large amount; rename large amount;
08ea3258278e d9fa043f30c0
before: ! wall 0.593880 comb 0.600000 user 0.590000 sys 0.010000 (median of 15)
after: ! wall 0.251679 comb 0.250000 user 0.250000 sys 0.000000 (median of 38)
revision: small amount; added files: large amount; rename large amount;
df6f7a526b60 a83dc6a2d56f
before: ! wall 0.013414 comb 0.020000 user 0.020000 sys 0.000000 (median of 220)
after: ! wall 0.013222 comb 0.020000 user 0.020000 sys 0.000000 (median of 223)
revision: small amount; added files: large amount; rename small amount;
4aa4e1f8e19a 169138063d63
before: ! wall 0.002711 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
after: ! wall 0.001631 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000)
revision: small amount; added files: small amount; rename small amount;
4bc173b045a6 964879152e2e
before: ! wall 0.000077 comb 0.000000 user 0.000000 sys 0.000000 (median of 12208)
after: ! wall 0.000078 comb 0.000000 user 0.000000 sys 0.000000 (median of 12012)
revision: medium amount; added files: large amount; rename medium amount;
c95f1ced15f2 2c68e87c3efe
before: ! wall 0.410067 comb 0.410000 user 0.410000 sys 0.000000 (median of 23)
after: ! wall 0.207786 comb 0.200000 user 0.200000 sys 0.000000 (median of 46)
revision: medium amount; added files: medium amount; rename small amount;
d343da0c55a8 d7746d32bf9d
before: ! wall 0.097004 comb 0.090000 user 0.090000 sys 0.000000 (median of 100)
after: ! wall 0.038495 comb 0.030000 user 0.030000 sys 0.000000 (median of 100)
Differential Revision: https://phab.mercurial-scm.org/D7074
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 15:16:57 -0700] rev 43296
largefiles: use context manager for setting "lfstatus" on subrepos too
It's safe since we now reset to the previous value.
Differential Revision: https://phab.mercurial-scm.org/D7138