Thu, 18 Jun 2020 15:13:38 +0200 ui: add option to timestamp status and diagnostic messages
Joerg Sonnenberger <joerg@bec.de> [Thu, 18 Jun 2020 15:13:38 +0200] rev 45025
ui: add option to timestamp status and diagnostic messages Differential Revision: https://phab.mercurial-scm.org/D8640
Tue, 30 Jun 2020 01:32:17 +0200 tests: use path inside test dir stable
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 01:32:17 +0200] rev 45024
tests: use path inside test dir This will make the diff for the next patch less noisy.
Tue, 30 Jun 2020 05:30:47 +0200 convert: convert URLs to UTF-8 for Subversion stable
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 05:30:47 +0200] rev 45023
convert: convert URLs to UTF-8 for Subversion Preamble: for comprehension, note that the `path` of geturl() would better be called `path_or_url` (the argument of the call of getsvn() is called `url`). For HTTP(S) URLs, the changes don’t make a difference, as they are restricted to ASCII. For file URLs, the reasoning is the same as for paths: we have to roundtrip with what Subversion is doing. When the locale encoding is ISO-8859-15, trying to convert a SVN repo `file:///tmp/a€` failed before like this: file:///tmp/a%A4 does not look like a Subversion repository to libsvn version 1.14.0 Decoding the path using the locale encoding can fail. In this case, we have to bail out, as Subversion won’t be able to do anything useful with the path.
Mon, 29 Jun 2020 15:03:36 +0200 convert: correctly convert paths to UTF-8 for Subversion stable
Manuel Jacob <me@manueljacob.de> [Mon, 29 Jun 2020 15:03:36 +0200] rev 45022
convert: correctly convert paths to UTF-8 for Subversion The previous code using encoding.tolocal() only worked by chance in these situations: * The string is ASCII: The fast path was triggered and the string was returned unmodified. * The local encoding is UTF-8: The source and target encoding is the same. * The string is not valid UTF-8 and the native encoding is ISO-8859-1: If the string doesn’t decode using UTF-8, ISO-8859-1 is tried as a fallback. During `hg convert`, the local encoding is always UTF-8. The irony is that in this case, encoding.tolocal() behaves like what someone would expect the reverse function, encoding.fromlocal(), to do. When the locale encoding is ISO-8859-15, trying to convert a SVN repo `/tmp/a€` failed before like this: file:///tmp/a%C2%A4 does not look like a Subversion repository to libsvn version 1.14.0 The correct URL is `file:///tmp/a%E2%82%AC`. Unlike previously (with the ISO-8859-1 fallback), decoding the path using the locale encoding can fail. In this case, we have to bail out, as Subversion won’t be able to do anything useful with the path.
Tue, 30 Jun 2020 05:04:36 +0200 py3: pass URL as str stable
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 05:04:36 +0200] rev 45021
py3: pass URL as str Before the patch, HTTP(S) URLs were never recognized as a Subversion repository on Python 3.
Tue, 30 Jun 2020 04:55:52 +0200 convert: bail out in Subversion source if encountering non-ASCII HTTP(S) URL stable
Manuel Jacob <me@manueljacob.de> [Tue, 30 Jun 2020 04:55:52 +0200] rev 45020
convert: bail out in Subversion source if encountering non-ASCII HTTP(S) URL Before this patch, in the tested case, urllib raised `httplib.InvalidURL: URL can't contain control characters. '/\xff/!svn/ver/0/.svn' (found at least '\xff')`, which resulted in that the URL was never recognized as a Subversion repository. This patch adds a check that bails out if the URL contains non-ASCII characters. The warning is not overly user-friendly, but giving the user something to type into a search engine is definitively better than not explaining why the repository was not recognized. We could support non-ASCII chracters by quoting them before passing them to urllib. However, we would want to be compatible with what the `svn` command does, which converts the URL from the locale encoding to UTF-8, percent-encodes it and sends it to the server. If the locale encoding is not UTF-8, the behavior is IMHO not very intuitive, as the `svn` command may send different (percent-encoded) octets than what was passed on the console. Instead of copying this behavior, we better leave it forbidden.
Mon, 29 Jun 2020 20:53:32 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Jun 2020 20:53:32 +0900] rev 45019
merge with stable
Sun, 28 Jun 2020 17:52:29 +0200 compat: back out a25343d16ebe (initialize LC_CTYPE locale on all Python ...)
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 17:52:29 +0200] rev 45018
compat: back out a25343d16ebe (initialize LC_CTYPE locale on all Python ...) As Yuya Nishihara pointed out, setting LC_CTYPE changes the behavior of some str methods on Python 2.
Sun, 28 Jun 2020 17:49:14 +0200 curses: back out d2227d4c9e6b (do not initialize LC_ALL to user settings)
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 17:49:14 +0200] rev 45017
curses: back out d2227d4c9e6b (do not initialize LC_ALL to user settings) The changeset was based on a25343d16ebe, which will be backed out, too. Another fix for the problem will be resubmitted to the stable branch.
Thu, 25 Jun 2020 11:22:34 +0200 test: redirect stderr so warning messages don't change output (issue6237)
Julien Cristau <jcristau@debian.org> [Thu, 25 Jun 2020 11:22:34 +0200] rev 45016
test: redirect stderr so warning messages don't change output (issue6237) clone and commit race for the lock, and if commit has to wait more than a second it prints a warning to stderr. Since this is somewhat expected here, silence it. Differential Revision: https://phab.mercurial-scm.org/D8664
Thu, 25 Jun 2020 12:02:34 -0700 locks: expect repo lock, not wlock, when writing to .hg/strip-backup/
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 12:02:34 -0700] rev 45015
locks: expect repo lock, not wlock, when writing to .hg/strip-backup/ There should be no need for a working copy lock when creating (or reading) bundles in `.hg/strip-backup/` since they don't affect the working copy. I noticed this because we have an extension that tries to strip some revisions while holding only a repo lock. I guess we have no such cases in core, which seems a bit surprising. Maybe we always take a wlock at a higher level so the working copy is not updated while the target commit is being stripped. Differential Revision: https://phab.mercurial-scm.org/D8666
Thu, 25 Jun 2020 13:37:56 -0700 graft: leverage cmdutil.check_incompatible_arguments() for --abort/--stop
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:37:56 -0700] rev 45014
graft: leverage cmdutil.check_incompatible_arguments() for --abort/--stop Differential Revision: https://phab.mercurial-scm.org/D8669
Mon, 29 Jun 2020 02:05:12 +0200 run-tests: fix escapes with conditions stable
Manuel Jacob <me@manueljacob.de> [Mon, 29 Jun 2020 02:05:12 +0200] rev 45013
run-tests: fix escapes with conditions Before this fix, escapes with conditions in tests failed like this on Python 3: $ $PYTHON -c 'from mercurial.utils.procutil import stdout; stdout.write(b"\xff")' - \xff (no-eol) (esc) (true !) + \xff (no-eol) (esc) The unicode_escape encoding decodes br'\xff' to u'\xff'. To convert the first 256 code points to bytes with the same ordinal, the latin-1 encoding must be used. Escapes without conditions already worked before on Python 3, but not through `el == l` a few lines below the changed line in run-tests.py. I didn’t investigate further.
Sun, 28 Jun 2020 18:02:45 +0200 convert: set LC_CTYPE around calls to Subversion bindings stable
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 18:02:45 +0200] rev 45012
convert: set LC_CTYPE around calls to Subversion bindings The Subversion bindings require that LC_CTYPE is set. However, we don’t want to set it all the time, as it changes the behavior of str methods on Python 2. The taken approach is hopefully fine-grained enough to not trigger any locale-specfic behavior of the str methods and coarse-grained enough to not clutter the code. Emulating the with-statement behavior in before() and after() should be safe, as after() is always called when before() is called. hgext.convert.hg takes a similar approach.
Sun, 28 Jun 2020 18:02:45 +0200 curses: do not initialize LC_ALL to user settings (issue6358) stable
Manuel Jacob <me@manueljacob.de> [Sun, 28 Jun 2020 18:02:45 +0200] rev 45011
curses: do not initialize LC_ALL to user settings (issue6358) 701341f57ceb moved the setlocale() call to right before curses was used. This didn’t fully solve the problem it was supposed to solve (locale-dependent functions, like date formatting/parsing and str methods on Python 2), but only postponed it. Initializing LC_CTYPE seems to be sufficient for curses to work correctly. Therefore LC_CTYPE is set while curses is used and reset afterwards. Some locale-dependent str methods might behave differently on Python 2 while curses is used, but that shouldn’d be a problem.
Thu, 25 Jun 2020 13:29:05 -0700 graft: leverage cmdutil.check_incompatible_arguments() for --no-commit
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:29:05 -0700] rev 45010
graft: leverage cmdutil.check_incompatible_arguments() for --no-commit Differential Revision: https://phab.mercurial-scm.org/D8668
Thu, 25 Jun 2020 13:27:37 -0700 graft: leverage cmdutil.check_at_most_one_arg() for --abort/--stop/--continue
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 13:27:37 -0700] rev 45009
graft: leverage cmdutil.check_at_most_one_arg() for --abort/--stop/--continue Differential Revision: https://phab.mercurial-scm.org/D8667
Sat, 27 Jun 2020 21:45:20 -0400 version: sort extensions by name in verbose mode
Matt Harbison <matt_harbison@yahoo.com> [Sat, 27 Jun 2020 21:45:20 -0400] rev 45008
version: sort extensions by name in verbose mode External extensions can be assigned any name, but presumably most enabled extensions will be internal ones and having them sorted makes it easier to find specific ones if the list is long. The lists in `hg help extensions` are already sorted. Differential Revision: https://phab.mercurial-scm.org/D8671
Sat, 27 Jun 2020 20:19:41 +0200 crecord: stop trying to import wcurses
Manuel Jacob <me@manueljacob.de> [Sat, 27 Jun 2020 20:19:41 +0200] rev 45007
crecord: stop trying to import wcurses The original import of crecord in 2008 already said "I have no idea if wcurses works with crecord...". The last reference to a Python package called wcurses is https://web.archive.org/web/20101025073658/http://adamv.com/dev/python/curses/. However, the Python package from there is called "curses" and not "wcurses". I didn’t find any evidence that it ever worked.
Thu, 18 Jun 2020 10:48:27 -0700 debian: support building a single deb for multiple py3 versions
Kyle Lippincott <spectral@google.com> [Thu, 18 Jun 2020 10:48:27 -0700] rev 45006
debian: support building a single deb for multiple py3 versions Around transitions from one python minor version to another (such as 3.7 to 3.8), the current packaging can be slightly problematic - it produces a `control` file that requires that the version of `python3` that's installed be exactly the one that was used on the build machine for the `mercurial` package, by containing a line like: Depends: sensible-utils, libc6 (>= 2.14), python3 (<< 3.8), python3 (>= 3.7~), python3:any (>= 3.5~) This is because it "knows" we only built for v3.7, which is the current default on my system. By building the native components for multiple versions, we can make it produce a line like this, which is compatible with 3.7 AND 3.8: Depends: sensible-utils, libc6 (>= 2.14), python3 (<< 3.9), python3 (>= 3.7~), python3:any (>= 3.5~) This isn't *normally* required, so I'm not making it the default. For those that receive their python3 and mercurial packages from their distro, and/or don't have to worry about a situation where the team that manages the python3 installation isn't the same as the team that manages the mercurial installation, this is probably not necessary. I chose the names `DEB_HG_*` because `DEB_*` is passed through `debuild` automatically (otherwise we'd have to explicitly allow the options through, which is a nuisance), and the `HG` part is to make it clear that this isn't a "standard" debian option that other packages might respect. Test Plan: 1. "nothing changed": - built a deb without these changes - built a deb with these changes but everything at the default - used diffoscope to compare, all differences were due to timestamps 2. "explicit is the same as implicit" (single version) - built a deb with everything at the default - built a deb with DEB_HG_PYTHON_VERSIONS=3.7 - used diffoscope to compare, all differences were due to timestamps 3. "explicit is the same as implicit" (multi version) - built a deb with DEB_HG_MULTI_VERSION=1 - built a deb with DEB_HG_PYTHON_VERSIONS=3.7 - used diffoscope to compare, all differences were due to timestamps 4. (single version, 3.7) doesn't work with python3.8 - `/usr/bin/python3.7 /usr/bin/hg debuginstall` works - `/usr/bin/python3.8 /usr/bin/hg debuginstall` crashes 5. (multi version, 3.7 + 3.8) - `/usr/bin/python3.7 /usr/bin/hg debuginstall` works - `/usr/bin/python3.8 /usr/bin/hg debuginstall` works Differential Revision: https://phab.mercurial-scm.org/D8642
Fri, 26 Jun 2020 11:20:58 -0400 merge with stable
Augie Fackler <augie@google.com> [Fri, 26 Jun 2020 11:20:58 -0400] rev 45005
merge with stable
Thu, 25 Jun 2020 03:46:07 +0200 hgweb: encode WSGI environment like OS environment stable
Manuel Jacob <me@manueljacob.de> [Thu, 25 Jun 2020 03:46:07 +0200] rev 45004
hgweb: encode WSGI environment like OS environment Previously, the WSGI environment keys and values were encoded using latin-1. This resulted in a crash if a WSGI environment key or value could not be encoded using latin-1. On Unix, the OS environment is byte-based. Therefore we should do the reverse of what Python does for os.environ. On Windows, there’s no native byte-based OS environment. Therefore we should do the same as what mercurial.encoding does with the OS environment.
Thu, 25 Jun 2020 03:10:13 +0200 hgweb: deduplicate code stable
Manuel Jacob <me@manueljacob.de> [Thu, 25 Jun 2020 03:10:13 +0200] rev 45003
hgweb: deduplicate code A following patch will change the way keys and values are encoded. To reduce the diff, I’ve split off the uninteresting part.
Fri, 26 Jun 2020 09:37:34 +0200 curses: do not initialize LC_ALL to user settings (issue6358)
Manuel Jacob <me@manueljacob.de> [Fri, 26 Jun 2020 09:37:34 +0200] rev 45002
curses: do not initialize LC_ALL to user settings (issue6358) 701341f57ceb moved the setlocale() call to right before curses was used. This didn’t fully solve the problem it was supposed to solve (locale-dependent functions, like date formatting/parsing), but only postponed it. Initializing LC_CTYPE seems to be sufficient for curses to work correctly. Luckily this is already done at interpreter startup on modern Python versions and, since recently, by Mercurial in the pycompat module in all other cases.
Fri, 26 Jun 2020 04:07:50 +0200 compat: initialize LC_CTYPE locale on all Python versions and platforms
Manuel Jacob <me@manueljacob.de> [Fri, 26 Jun 2020 04:07:50 +0200] rev 45001
compat: initialize LC_CTYPE locale on all Python versions and platforms Previously, the LC_CTYPE locale was not initialized according to user settings on all Python versions (e.g. never on Python 2) and platforms (e.g. not on some Python < 3.8 on Windows). This broke e.g. non-ASCII filenames passed to the Subversion bindings on Python 2, resulting in error messages like "file:///tmp/a%C3%A4 does not look like a Subversion repository to libsvn version 1.14.0". The following command could be used to test this functionality. Adding it to the test suite would be pointless, as the locale is always set to "C" during test runs. @command(b'check_initial_codeset', norepo=True) def check_initial_codeset(ui): codeset1 = locale.nl_langinfo(locale.CODESET) locale.setlocale(locale.LC_ALL, '') codeset2 = locale.nl_langinfo(locale.CODESET) assert codeset1 == codeset2
Thu, 25 Jun 2020 10:32:51 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 10:32:51 -0700] rev 45000
merge with stable
Wed, 24 Jun 2020 23:17:56 -0700 merge: don't grab wlock when merging in memory
Martin von Zweigbergk <martinvonz@google.com> [Wed, 24 Jun 2020 23:17:56 -0700] rev 44999
merge: don't grab wlock when merging in memory I noticed this because we have an internal extension that does an in-memory rebase while holding only a repo lock, which resulted in a developer warning about the working copy lock being taken after the repo lock. Differential Revision: https://phab.mercurial-scm.org/D8665
Wed, 24 Jun 2020 14:44:21 +0200 pycompat: use os.fsencode() to re-encode sys.argv
Manuel Jacob <me@manueljacob.de> [Wed, 24 Jun 2020 14:44:21 +0200] rev 44998
pycompat: use os.fsencode() to re-encode sys.argv Historically, the previous code made sense, as Py_EncodeLocale() and fs.fsencode() could possibly use different encodings. However, this is not the case anymore for Python 3.2, which uses the locale encoding as the filesystem encoding (this is not true for later Python versions, but see below). See https://vstinner.github.io/painful-history-python-filesystem-encoding.html for a source and more background information. Using os.fsencode() is safer, as the documentation for sys.argv says that it can be used to get the original bytes. When doing further changes, the Python developers will take care that this continues to work. One concrete case where os.fsencode() is more correct is when enabling Python's UTF-8 mode. Py_DecodeLocale() will use UTF-8 in this case. Our previous code would have encoded it using the locale encoding (which might be different), whereas os.fsencode() will encode it with UTF-8. Since we don’t claim to support the UTF-8 mode, this is not really a bug and the patch can go to the default branch. It might be a good idea to not commit this to the stable branch, as it could in theory introduce regressions.
Thu, 25 Jun 2020 22:40:04 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Thu, 25 Jun 2020 22:40:04 +0900] rev 44997
merge with stable
Fri, 05 Jun 2020 01:54:13 +0200 perf: make `hg perfwrite` more flexible
Manuel Jacob <me@manueljacob.de> [Fri, 05 Jun 2020 01:54:13 +0200] rev 44996
perf: make `hg perfwrite` more flexible The more flexible command was used recently while finding a solution for a buffering bug (eventually fixed in f9734b2d59cc (the changeset description uses a different benchmark)). In comparison to the previous version, the new version is much more flexible. While using it, the focus was on testing small writes. For this reason, by default it calls ui.write() 100 times with a single byte plus one newline byte, for 100 lines. To get the previous behavior, run `hg perfwrite --nlines=100000 --nitems=1 --item='Testing write performance' --batch-line`.
Tue, 23 Jun 2020 04:55:27 +0200 chg: fix typo
Manuel Jacob <me@manueljacob.de> [Tue, 23 Jun 2020 04:55:27 +0200] rev 44995
chg: fix typo
Fri, 19 Jun 2020 09:27:02 -0700 copies: implement __repr__ on branch_copies for debugging
Martin von Zweigbergk <martinvonz@google.com> [Fri, 19 Jun 2020 09:27:02 -0700] rev 44994
copies: implement __repr__ on branch_copies for debugging Differential Revision: https://phab.mercurial-scm.org/D8650
Sat, 20 Jun 2020 11:10:23 +0900 phases: remove useless lookup of repo[rev].rev() in _retractboundary
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Jun 2020 11:10:23 +0900] rev 44993
phases: remove useless lookup of repo[rev].rev() in _retractboundary changectx object is no longer needed thanks to a54ee130210a.
Thu, 04 Jun 2020 06:44:00 +0200 ui: replace `self._ferr` with identical `dest`
Manuel Jacob <me@manueljacob.de> [Thu, 04 Jun 2020 06:44:00 +0200] rev 44992
ui: replace `self._ferr` with identical `dest` Originally, it was part of a larger change that was abandoned. IMHO it makes the code slightly cleaner and saves one attribute access, so I decided to send it anyway instead of throwing it away.
Sat, 20 Jun 2020 11:51:34 +0530 absorb: make it clear what happens when no input
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 20 Jun 2020 11:51:34 +0530] rev 44991
absorb: make it clear what happens when no input Differential Revision: https://phab.mercurial-scm.org/D8643
Wed, 17 Jun 2020 17:46:30 +0530 tests: add hghave rule 'setprocname' to check if osutil.setprocname and use it
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 17 Jun 2020 17:46:30 +0530] rev 44990
tests: add hghave rule 'setprocname' to check if osutil.setprocname and use it setprocname is not present when we build a pure version. This leads to output changes in test-chg.t This should make test suite green on Python 2 pure build with chg. Differential Revision: https://phab.mercurial-scm.org/D8638
Fri, 19 Jun 2020 20:42:14 +0530 util: flush stderr explicitly after using warnings.warn()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 Jun 2020 20:42:14 +0530] rev 44989
util: flush stderr explicitly after using warnings.warn() Due to some unknown reasons, when using chg with python3, the warnings.warn() output is not flushed. Fixes test-devel-warnings.t on py3 with chg.
Thu, 18 Jun 2020 22:23:22 +0200 phases: improve performance of _retractboundary
Joerg Sonnenberger <joerg@bec.de> [Thu, 18 Jun 2020 22:23:22 +0200] rev 44988
phases: improve performance of _retractboundary The old version repeatedly converts nodes to revisions, which is a moderately expensive operation. Mapping all new changes once to revisions and back at the end reduces the time spend in _retractboundary during the unbundling of NetBSD's src from 67s to 17s. Differential Revision: https://phab.mercurial-scm.org/D8641
Thu, 18 Jun 2020 17:54:39 +0530 tests: use proctutil.stdout.write() instead of print() in test-extension.t
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 18 Jun 2020 17:54:39 +0530] rev 44987
tests: use proctutil.stdout.write() instead of print() in test-extension.t I was debugging this test failure on python3 + chg. I get the following hunk as test failure: ``` @@ -206,6 +206,18 @@ Check normal command's load order of ext 4) bar uipopulate 5) foo reposetup 5) bar reposetup + 4) foo uipopulate (chg !) + 4) bar uipopulate (chg !) + 4) foo uipopulate (chg !) + 4) bar uipopulate (chg !) + 4) foo uipopulate (chg !) + 4) bar uipopulate (chg !) + 4) foo uipopulate (chg !) + 4) bar uipopulate (chg !) + 4) foo uipopulate (chg !) + 4) bar uipopulate (chg !) + 5) foo reposetup (chg !) + 5) bar reposetup (chg !) 0:c24b9ac61126 ``` After hours of debugging and head scracthing, I figured out that something is wrong with output flushing. I initially switched the print() statements to ui.warn() but thanks to Yuya who suggested using procutil.stdout.write() instead.
Wed, 08 Jan 2020 11:33:41 -0500 fuzz: tell manifest fuzzer about longer node hashes
Augie Fackler <augie@google.com> [Wed, 08 Jan 2020 11:33:41 -0500] rev 44986
fuzz: tell manifest fuzzer about longer node hashes Differential Revision: https://phab.mercurial-scm.org/D8374
Mon, 01 Jun 2020 20:57:14 +0200 absorb: preserve changesets which were already empty
Manuel Jacob <me@manueljacob.de> [Mon, 01 Jun 2020 20:57:14 +0200] rev 44985
absorb: preserve changesets which were already empty Most commands in Mercurial (commit, rebase, absorb itself) don’t create empty changesets or drop them if they become empty. If there’s a changeset that’s empty, it must be a deliberate choice of the user. At least it shouldn’t be absorb’s responsibility to prune them. The fact that changesets that became empty during absorb are pruned, is unaffected by this. This case was found while writing patches which make it possible to configure absorb and rebase to not drop empty changesets. Even without having such config set, I think it’s valuable to preserve changesets which were already empty.
Mon, 01 Jun 2020 11:07:33 +0200 absorb: preserve branch-closing changesets even if empty
Manuel Jacob <me@manueljacob.de> [Mon, 01 Jun 2020 11:07:33 +0200] rev 44984
absorb: preserve branch-closing changesets even if empty This makes the behavior consistent with 'hg commit', which allows to create otherwise empty changesets if they close the branch. A lost branch closure can inadvertently re-open a branch, so it should be preserved.
Mon, 01 Jun 2020 10:33:00 +0200 absorb: preserve branch-changing changesets even if empty
Manuel Jacob <me@manueljacob.de> [Mon, 01 Jun 2020 10:33:00 +0200] rev 44983
absorb: preserve branch-changing changesets even if empty This makes the behavior consistent with 'hg commit', which allows to create otherwise empty changesets if the branch changes compared to the parent. A branch change can denote important information, so it should be preserved.
Mon, 22 Jun 2020 15:19:35 +0530 rhg: add Command trait for subcommands implemented by rhg
Antoine Cezar <antoine.cezar@octobus.net> [Mon, 22 Jun 2020 15:19:35 +0530] rev 44982
rhg: add Command trait for subcommands implemented by rhg Normalizes the interface of the cli's commands Differential Revision: https://phab.mercurial-scm.org/D8611 Differential Revision: https://phab.mercurial-scm.org/D8648
Fri, 05 Jun 2020 10:28:58 +0200 rhg: add rhg crate
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 05 Jun 2020 10:28:58 +0200] rev 44981
rhg: add rhg crate The goal of rhg is to speedup some of hg's commands when possible by bypassing python entirely for the time being. It is by no means a replacement for hg as it will not support extentions or configuration and implement only a subset of hg's commands and options. Only use rhg if you understand what the tradeoffs are. Differential Revision: https://phab.mercurial-scm.org/D8610
Fri, 05 Jun 2020 08:48:09 +0200 hg-core: add FindRoot operation to find repository root path
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 05 Jun 2020 08:48:09 +0200] rev 44980
hg-core: add FindRoot operation to find repository root path Differential Revision: https://phab.mercurial-scm.org/D8609
Tue, 23 Jun 2020 16:07:18 +0200 share: provide a more useful text for hg help stable
Joerg Sonnenberger <joerg@bec.de> [Tue, 23 Jun 2020 16:07:18 +0200] rev 44979
share: provide a more useful text for hg help Differential Revision: https://phab.mercurial-scm.org/D8651
Thu, 25 Jun 2020 00:06:23 -0700 procutil: make recent fix for zombies compatible with py2 stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 25 Jun 2020 00:06:23 -0700] rev 44978
procutil: make recent fix for zombies compatible with py2 The fix in ed684a82e29b (procutil: always waiting on child processes to prevent zombies with 'hg serve', 2020-05-07) works only on Python 3 because it passes a `daemon` argument to `threading.Thread()`. Python 2 requires you to assign to the `.daemon` property instead. Python 3 also seems to support that, so this patch fixes the code by unconditionally using the old form. Differential Revision: https://phab.mercurial-scm.org/D8657
Wed, 24 Jun 2020 04:25:34 +0200 pycompat: fix crash when default locale is unknown stable
Manuel Jacob <me@manueljacob.de> [Wed, 24 Jun 2020 04:25:34 +0200] rev 44977
pycompat: fix crash when default locale is unknown Instead, fall back to the filesystem encoding if the default locale is unknown.
Mon, 22 Jun 2020 22:15:57 -0700 help: document meaning of '%' in graphlog output stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 Jun 2020 22:15:57 -0700] rev 44976
help: document meaning of '%' in graphlog output I added the feature in 14d0e89520a2 (graphlog: use '%' for other context in merge conflict, 2020-01-28), but I didn't think to look for documentation until today (because an internal user asked about it). Differential Revision: https://phab.mercurial-scm.org/D8649
Wed, 17 Jun 2020 16:11:11 -0700 py3: fix broken man page generation, it was generating `(default: NUL*)` stable
Kyle Lippincott <spectral@google.com> [Wed, 17 Jun 2020 16:11:11 -0700] rev 44975
py3: fix broken man page generation, it was generating `(default: NUL*)` `bytes(default)` was producing things like `(default: \x00)` when handed non-bytes values such as `1`, `10`, or `True`. The man page generation would apparently ignore these bytes and produce man pages that had the string `(default: )`. Test Plan: - Ran `cd doc; python3 gendoc.py "hg.1.gendoc"` and grepped for bad output - Ran `make deb`, extracted the deb, manually inspected `hg.1` file. Differential Revision: https://phab.mercurial-scm.org/D8639
Fri, 05 Jun 2020 08:46:35 +0200 hg-core: add Operation interface for high-level hg operations
Antoine Cezar <antoine.cezar@octobus.net> [Fri, 05 Jun 2020 08:46:35 +0200] rev 44974
hg-core: add Operation interface for high-level hg operations A distinction is made between operations and commands. An operation is a high-level function of mercurial whereas a command is what is exposed by the cli. A single command can use several operations to achieve its goal. Differential Revision: https://phab.mercurial-scm.org/D8608
Mon, 15 Jun 2020 18:26:40 +0200 rust: do a clippy pass
Raphaël Gomès <rgomes@octobus.net> [Mon, 15 Jun 2020 18:26:40 +0200] rev 44973
rust: do a clippy pass This is the result of running `cargo clippy` on hg-core/hg-cpython and fixing the lints that do not require too much code churn (and would warrant a separate commit/complete refactor) and only come from our code (a lot of warnings in hg-cpython come from `rust-cpython`). Most of those were good lints, two of them was the linter not being smart enough (or compiler to get up to `clippy`'s level depending on how you see it). Maybe in the future we could have `clippy` be part of the CI. Differential Revision: https://phab.mercurial-scm.org/D8635
Tue, 16 Jun 2020 14:38:50 +0200 py3: fix comparison between int and None stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 14:38:50 +0200] rev 44972
py3: fix comparison between int and None If stop is None, the condition was always false on Python 2, as None compares smaller than ints. Therefore we make the condition false if stop is None.
Tue, 16 Jun 2020 14:33:49 +0200 py3: pass regex as bytes stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 14:33:49 +0200] rev 44971
py3: pass regex as bytes
Tue, 16 Jun 2020 14:32:10 +0200 py3: avoid using %r format on bytes stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 14:32:10 +0200] rev 44970
py3: avoid using %r format on bytes Before the patch, the 'b' prefix appeared in the formatted string. Wrapping the bytes as pycompat.bytestr solves this problem. Eventually, I think that we should move away from using %r (like 975e517451a6 and 4d6019c0e0ef did), but that would change output of non-ASCII bytes on Python 2, so we can’t do it on the stable branch. Also, many places continue to use %r, so it would be a good idea to do the change all at once.
Tue, 16 Jun 2020 14:03:00 +0200 py3: use `%d` for int in % formatting stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 14:03:00 +0200] rev 44969
py3: use `%d` for int in % formatting On Python 3, `%s` is an alias to `%b`, which requires that the object implements `__bytes__()`, which is not the case for `int`.
Tue, 16 Jun 2020 14:00:20 +0200 py3: pass native string to urlreq.url2pathname() stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 14:00:20 +0200] rev 44968
py3: pass native string to urlreq.url2pathname() Of course, I’m not happy with the warning, but it’s better than crashing. Solving the problem properly is hard, and non-UTF-8 percent-encoded bytes in file URLs seem rare enough to block solving that all file URLs (even if not SVN-specific) will cause a crash.
Tue, 16 Jun 2020 12:59:45 +0200 py3: suppress DeprecationWarning about deprecated base64 module aliases stable
Manuel Jacob <me@manueljacob.de> [Tue, 16 Jun 2020 12:59:45 +0200] rev 44967
py3: suppress DeprecationWarning about deprecated base64 module aliases base64.encodestring() / base64.decodestring() were renamed to base64.encodebytes() / base64.decodebytes() in Python 3. The old names still worked, but raised a DeprecationWarning.
Mon, 15 Jun 2020 03:38:02 +0200 py3: use `pycompat.ziplist()` stable
Manuel Jacob <me@manueljacob.de> [Mon, 15 Jun 2020 03:38:02 +0200] rev 44966
py3: use `pycompat.ziplist()`
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 tip