Thu, 21 Nov 2019 23:35:29 -0500 cleanup: update references to /help/ that should now be /helptext/
Augie Fackler <augie@google.com> [Thu, 21 Nov 2019 23:35:29 -0500] rev 43736
cleanup: update references to /help/ that should now be /helptext/ I noticed this only because the WiX build was broken after 2e017696181f. I haven't tested this change with WiX, but it seems pretty obvious by inspection this should fix it. Differential Revision: https://phab.mercurial-scm.org/D7472
Fri, 22 Nov 2019 21:42:04 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Nov 2019 21:42:04 +0900] rev 43735
merge with stable
Wed, 20 Nov 2019 19:07:02 +0100 singlehead: making config item a bool again stable
Georges Racinet <georges.racinet@octobus.net> [Wed, 20 Nov 2019 19:07:02 +0100] rev 43734
singlehead: making config item a bool again with the use of `configsuboptions`, the main config item has become a string (unless it's just the default value). This makes it in particular hard to override in a cascade of HGRC files, as we do in Heptapod to re-allow multiple heads on specific repositories while the default behaviour is to forbid them. The added test case reflects that use-case
Thu, 21 Nov 2019 15:46:35 -0500 tests: byteify a few more things in simplestorerepo.py
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 15:46:35 -0500] rev 43733
tests: byteify a few more things in simplestorerepo.py Differential Revision: https://phab.mercurial-scm.org/D7471
Thu, 21 Nov 2019 15:39:03 -0500 profiling: add a missing argument to the ProgrammingError constructor
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 15:39:03 -0500] rev 43732
profiling: add a missing argument to the ProgrammingError constructor Differential Revision: https://phab.mercurial-scm.org/D7470
Thu, 21 Nov 2019 15:38:23 -0500 profiling: disable the import-error warning for the flamegraph module
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 15:38:23 -0500] rev 43731
profiling: disable the import-error warning for the flamegraph module The module being missing is properly handled, but pytype was complaining. Differential Revision: https://phab.mercurial-scm.org/D7469
Thu, 21 Nov 2019 15:31:33 -0500 phases: make `allphases` a list on py3 also
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 15:31:33 -0500] rev 43730
phases: make `allphases` a list on py3 also Pytype complained that `range` doesn't support slicing, so make this a list like it was on py2. Differential Revision: https://phab.mercurial-scm.org/D7468
Wed, 20 Nov 2019 09:55:59 -0500 wireprotov1server: capture Abort type before accessing the `hint` attribute
Matt Harbison <matt_harbison@yahoo.com> [Wed, 20 Nov 2019 09:55:59 -0500] rev 43729
wireprotov1server: capture Abort type before accessing the `hint` attribute Although the previous code worked, pytypes complained because `exc` is caught above as `BundleValueError, Abort, PushRaced`, and the other two don't have this attribute. Differential Revision: https://phab.mercurial-scm.org/D7463
Wed, 20 Nov 2019 08:55:24 +0100 tests: add more tests for "hg shelve --delete"
Denis Laxalde <denis@laxalde.org> [Wed, 20 Nov 2019 08:55:24 +0100] rev 43728
tests: add more tests for "hg shelve --delete" It appears that the only tests for "hg shelve --delete" concern command errors (e.g. incompatible command options). Adding some more to check that non-existent names are handled and a success case. Differential Revision: https://phab.mercurial-scm.org/D7460
Tue, 19 Nov 2019 14:13:04 -0500 scmutil: add assertions to help pytype
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:13:04 -0500] rev 43727
scmutil: add assertions to help pytype Differential Revision: https://phab.mercurial-scm.org/D7456
Tue, 19 Nov 2019 14:04:09 -0500 revset: add an assertion to help pytype
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:04:09 -0500] rev 43726
revset: add an assertion to help pytype Differential Revision: https://phab.mercurial-scm.org/D7455
Thu, 21 Nov 2019 09:25:50 +0100 import: add a --secret option
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 21 Nov 2019 09:25:50 +0100] rev 43725
import: add a --secret option Similarly to "hg commit", we add a --secret option to "hg import" for committing with the secret phase. The option has no short form since there already is a "-s" for "--similarity". .. feature:: ``hg import`` has a new --secret option for committing with the secret phase.
Thu, 21 Nov 2019 17:25:24 -0500 util: convert an exception to bytes when passing to Abort() stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 17:25:24 -0500] rev 43724
util: convert an exception to bytes when passing to Abort() I happened to notice this searching for how to convert an exception to bytes in the previous patch. I'm pretty sure I've got a bunch of other instances that use `pycompat.bytestr()` suppressed locally. Differential Revision: https://phab.mercurial-scm.org/D7467
Thu, 21 Nov 2019 14:28:28 -0500 patch: fix a str + bytes issue in an exception handler stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 21 Nov 2019 14:28:28 -0500] rev 43723
patch: fix a str + bytes issue in an exception handler Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D7466
Wed, 20 Nov 2019 08:11:21 -0800 py3: wrap a __func__ in sysbytes() before logging as bytes stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 20 Nov 2019 08:11:21 -0800] rev 43722
py3: wrap a __func__ in sysbytes() before logging as bytes Differential Revision: https://phab.mercurial-scm.org/D7461
Wed, 20 Nov 2019 19:16:11 -0800 py3: make doc strings containing deprecated '\.' escape sequence raw strings stable
Daniel Ploch <dploch@google.com> [Wed, 20 Nov 2019 19:16:11 -0800] rev 43721
py3: make doc strings containing deprecated '\.' escape sequence raw strings Differential Revision: https://phab.mercurial-scm.org/D7462
Tue, 19 Nov 2019 14:59:23 -0500 shelve: add the missing `create` parameter to the bundlerepo constructor stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:59:23 -0500] rev 43720
shelve: add the missing `create` parameter to the bundlerepo constructor Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7458
Tue, 19 Nov 2019 14:36:22 -0500 shelve: fix a missing variable in the exception handler for delete stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 19 Nov 2019 14:36:22 -0500] rev 43719
shelve: fix a missing variable in the exception handler for delete Caught by pytype. I haven't paid much attention to the progress of this extension, but I *think* this was the intent. Differential Revision: https://phab.mercurial-scm.org/D7457
Fri, 15 Nov 2019 15:58:56 -0500 hgweb: add diffs to the json changeset template
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Nov 2019 15:58:56 -0500] rev 43718
hgweb: add diffs to the json changeset template While it's possible to get the diff for each file individually via an obscure url that I'm not even sure is documented, (e.g. diff/{rev}/{filename}?style=json ), it is more convenient to provide the full diff from the changeset view. This is already normally computed for other non-JSON templates, so it seems like an oversight to omit it for the JSON one. The output format is a bit unwieldy but it's consistent with the existing format output by the aforementioned obscure url.
Fri, 15 Nov 2019 15:56:25 -0500 hgweb: add files to the json changeset template
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Nov 2019 15:56:25 -0500] rev 43717
hgweb: add files to the json changeset template As far as I can tell, it's currently impossible via JSON to figure out what files are touched by a particular revision. Reusing the filenodelink and filenolink templates from the other hgweb templates should provide this information.
Fri, 15 Nov 2019 16:02:01 -0500 hgweb: add a status property to file list context
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Nov 2019 16:02:01 -0500] rev 43716
hgweb: add a status property to file list context The web templates merely indicate if files touched by this revision are in the commit or not, i.e. if they are removed. It would be helpful to have more context and also indicate whether the files are added, modified, or removed.
Fri, 15 Nov 2019 14:50:13 -0800 match: remove explicitdir attribute
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 14:50:13 -0800] rev 43715
match: remove explicitdir attribute No one sets it or reads it anymore. Differential Revision: https://phab.mercurial-scm.org/D7441
Fri, 15 Nov 2019 15:36:14 -0800 dirstate: stop caring about match.explicitdir
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 15:36:14 -0800] rev 43714
dirstate: stop caring about match.explicitdir No one passes it in anymore. Differential Revision: https://phab.mercurial-scm.org/D7440
Fri, 15 Nov 2019 15:36:09 -0800 dirstate: include explicit matches in match.traversedir calls
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 15:36:09 -0800] rev 43713
dirstate: include explicit matches in match.traversedir calls The caller should not have to register to get both explicit and non-explicit matches. Differential Revision: https://phab.mercurial-scm.org/D7439
Fri, 15 Nov 2019 14:47:31 -0800 commit: drop unused "vdirs" argument from repo.checkcommitpatterns()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 14:47:31 -0800] rev 43712
commit: drop unused "vdirs" argument from repo.checkcommitpatterns() Differential Revision: https://phab.mercurial-scm.org/D7438
Fri, 15 Nov 2019 14:41:00 -0800 commit: rewrite check for `hg ci <path>` being a directory
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 14:41:00 -0800] rev 43711
commit: rewrite check for `hg ci <path>` being a directory The matcher API is complicated by match.bad, match.explicitdir, and match.traversedir. We already have very few users of match.explicitdir. By rewriting this check we get close to being able to remove match.explicitdir. This may make the check slower, but I think that will be very marginal. Disclosure: I actually wrote this patch to solve a bug we've seen with an internal extension. The internal extension overrides the dirstate walk to only walk the files that our FUSE tells us are modified. That led to "vdirs" not getting populated as this code expected. I have wanted to get rid of match.explicitdir for a very long time, though. Differential Revision: https://phab.mercurial-scm.org/D7437
Tue, 19 Nov 2019 11:59:43 +0100 py3: use pycompat.bytestr() instead of pycompat.sysstr() stable
Manuel Jacob <me@manueljacob.de> [Tue, 19 Nov 2019 11:59:43 +0100] rev 43710
py3: use pycompat.bytestr() instead of pycompat.sysstr() pycompat.sysstr() doesn’t work because it doesn’t accept arguments of type `type` and returns a unicode object on Python3, while the format string wants a bytes-like object.
Mon, 18 Nov 2019 20:10:38 -0800 lock: fix race in lock-breaking code
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 18 Nov 2019 20:10:38 -0800] rev 43709
lock: fix race in lock-breaking code With low frequency, I see hg pulls fail with output like: abort: no such file or directory: .hg/store/lock I think what happens is, in lock.py, in: def _testlock(self, locker): if not self._lockshouldbebroken(locker): return locker # if locker dead, break lock. must do this with another lock # held, or can race and break valid lock. try: with lock(self.vfs, self.f + b'.break', timeout=0): self.vfs.unlink(self.f) except error.LockError: return locker if a lock is breakable on disk, and two hg processes concurrently get to the "if locker dead" comment, a possible interleaving is: process1 finishes executing the function and then process2 finishes executing the function. If that happens, process2 will either get ENOENT in self.vfs.unlink (resulting in the spurious failure above), or break a valid lock and potentially cause repository corruption. The fix is simple enough: make sure the lock is breakable _inside_ the critical section, because only then can we know that no other process can invalidate our knowledge on the lock on disk. I don't think there are tests for this. I've tested this manually with: diff --git a/mercurial/lock.py b/mercurial/lock.py --- a/mercurial/lock.py +++ b/mercurial/lock.py @@ -351,6 +351,8 @@ class lock(object): if not self._lockshouldbebroken(locker): return locker + import random + time.sleep(1. + random.random()) # if locker dead, break lock. must do this with another lock # held, or can race and break valid lock. try: @@ -358,6 +360,7 @@ class lock(object): self.vfs.unlink(self.f) except error.LockError: return locker + time.sleep(1) def testlock(self): """return id of locker if lock is valid, else None. and I see this change of behavior before/after this commit: $ $hg init repo $ cd repo $ ln -s $HOSTNAME/effffffc:987654321 .hg/wlock $ touch a $ $hg commit -Am_ & $hg commit -Am _; wait -abort: No such file or directory: '/tmp/repo/.hg/wlock' adding a +warning: ignoring unknown working parent 679a8959a8ca! +nothing changed Differential Revision: https://phab.mercurial-scm.org/D7199
Fri, 01 Nov 2019 19:59:07 -0400 lock: refactor in preparation for next commit
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Fri, 01 Nov 2019 19:59:07 -0400] rev 43708
lock: refactor in preparation for next commit Differential Revision: https://phab.mercurial-scm.org/D7198
Fri, 15 Nov 2019 11:30:33 -0500 extensions: suppress a pytype failure due to a typeshed bug
Augie Fackler <augie@google.com> [Fri, 15 Nov 2019 11:30:33 -0500] rev 43707
extensions: suppress a pytype failure due to a typeshed bug Bug filed upstream, suppress the failure here so we can move on. Differential Revision: https://phab.mercurial-scm.org/D7410
Thu, 14 Nov 2019 15:49:21 -0500 dispatch: add some assertions to give pytype a helping hand
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:49:21 -0500] rev 43706
dispatch: add some assertions to give pytype a helping hand Differential Revision: https://phab.mercurial-scm.org/D7409
Thu, 14 Nov 2019 15:49:01 -0500 extensions: hide two confusing import statements from pytype
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:49:01 -0500] rev 43705
extensions: hide two confusing import statements from pytype Differential Revision: https://phab.mercurial-scm.org/D7408
Thu, 14 Nov 2019 13:27:57 -0500 debugcommands: add assertions to convince pytype peer is not None
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 13:27:57 -0500] rev 43704
debugcommands: add assertions to convince pytype peer is not None This function is moderately annoyingly defined, and peer is set up iff we're not in raw-proto mode. That's fine, but it confuses pytype. Adding these assertions is a low-overhead way to convince pytype we're doing reasonable things. Differential Revision: https://phab.mercurial-scm.org/D7407
Wed, 13 Nov 2019 22:35:15 -0500 debugcommands: suppress import errors for pytype
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 22:35:15 -0500] rev 43703
debugcommands: suppress import errors for pytype Differential Revision: https://phab.mercurial-scm.org/D7385
Wed, 13 Nov 2019 22:22:49 -0500 state: add a pytype annotation
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 22:22:49 -0500] rev 43702
state: add a pytype annotation Differential Revision: https://phab.mercurial-scm.org/D7383
Wed, 13 Nov 2019 22:22:31 -0500 logcmdutil: add a type annotation
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 22:22:31 -0500] rev 43701
logcmdutil: add a type annotation This wasn't actually required in the end, as there was a real bug found by pytype, but the annotation helped me figure that out. We can drop this patch if that's the preference. Differential Revision: https://phab.mercurial-scm.org/D7382
Wed, 13 Nov 2019 22:21:38 -0500 cmdutil: add a pytype annotation to help out some callsites
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 22:21:38 -0500] rev 43700
cmdutil: add a pytype annotation to help out some callsites I think we could constrain the values here more than Any, but this lets us move forward with typechecking commands.py. Differential Revision: https://phab.mercurial-scm.org/D7381
Tue, 12 Nov 2019 17:47:42 -0500 hghave: add a check for the `xz` compression utility
Matt Harbison <matt_harbison@yahoo.com> [Tue, 12 Nov 2019 17:47:42 -0500] rev 43699
hghave: add a check for the `xz` compression utility This isn't install by default on Mac, which causes a test failure. The logic for avoiding the command is a little goofy, but nested `#if` isn't supported, and it still seems worth running the hg command to see if anything explodes. With this, the py3 tests run (almost) cleanly on 10.14.6: # Ran 835 tests, 58 skipped, 1 failed. Alas, the mac-packaging test is skipped because it's slow. The failure here is in test-releasenotes-merging.t, complaining about not being able to import the `fuzzywuzzy` module. I have it installed on py3 (thus the test isn't skipped), but not on py2. So there must be some unintended cross pollination here when running `hg` commands. Differential Revision: https://phab.mercurial-scm.org/D7374
Thu, 14 Nov 2019 22:31:21 -0800 py3: use '%d' for formatting a revnum in `hg co --date` code
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 22:31:21 -0800] rev 43698
py3: use '%d' for formatting a revnum in `hg co --date` code Differential Revision: https://phab.mercurial-scm.org/D7429
Mon, 18 Nov 2019 17:37:59 +0100 py3: send bytes from Rust-created warning patterns
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Nov 2019 17:37:59 +0100] rev 43697
py3: send bytes from Rust-created warning patterns Python code expects bytes in both Python 2 and Python 3, so we should send bytes. Differential Revision: https://phab.mercurial-scm.org/D7454
Mon, 18 Nov 2019 17:34:44 +0100 py3: pass bytes to `configint` and `configbool`
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Nov 2019 17:34:44 +0100] rev 43696
py3: pass bytes to `configint` and `configbool` Both functions require bytes, even in Python 3. Differential Revision: https://phab.mercurial-scm.org/D7453
Fri, 15 Nov 2019 10:16:27 -0800 templates: make {indent("", " ")} be empty
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 10:16:27 -0800] rev 43695
templates: make {indent("", " ")} be empty indent() is documented to indent all non-empty lines, but it made an exception for the first line, which always got indented. I also made indent() not indent the first line even if an indent override was given for the first line. I think that is what one would usually want. Differential Revision: https://phab.mercurial-scm.org/D7432
Fri, 15 Nov 2019 10:16:22 -0800 tests: document behavior of indent() with empty first line
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Nov 2019 10:16:22 -0800] rev 43694
tests: document behavior of indent() with empty first line indent() is documented to indent all non-empty lines, but it still indents the first line even if it's empty. Let's have tests for that. Differential Revision: https://phab.mercurial-scm.org/D7431
Sat, 16 Nov 2019 12:08:02 -0800 tests: check for Windows line endings
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 12:08:02 -0800] rev 43693
tests: check for Windows line endings We shouldn't generally be using Windows line endings in files under version control. I've accidentally committed a few files with Windows line endings recently. So let's add a test for this. Differential Revision: https://phab.mercurial-scm.org/D7448
Sat, 16 Nov 2019 11:54:39 -0800 tests: verify that Python scripts are blackened
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 11:54:39 -0800] rev 43692
tests: verify that Python scripts are blackened Scripts are Python too. They should be blackened. (As suggested by Pierre-Yves in D7420.) Differential Revision: https://phab.mercurial-scm.org/D7447
Sat, 16 Nov 2019 11:53:47 -0800 black: blacken scripts
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 11:53:47 -0800] rev 43691
black: blacken scripts These scripts weren't blackened. I found these as part of adding script checking to test-check-format.t. # skip-blame black Differential Revision: https://phab.mercurial-scm.org/D7446
Sat, 16 Nov 2019 11:59:22 -0800 doc: don't use mutable default arguments
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 16 Nov 2019 11:59:22 -0800] rev 43690
doc: don't use mutable default arguments It appears our mutable default arguments checker doesn't find arguments not on the first line of a function definition :( The arguments aren't used, so the default value is irrelevant. I found this when blackening this script in a future commit. Differential Revision: https://phab.mercurial-scm.org/D7445
Thu, 14 Nov 2019 21:58:36 -0800 tags: don't check for clean files when checking for dirty working copy
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 21:58:36 -0800] rev 43689
tags: don't check for clean files when checking for dirty working copy We didn't request status for clean files so there should never be any entries in the list of clean files (at least not since dd773340a085), but it's misleading to check the list. Differential Revision: https://phab.mercurial-scm.org/D7428
Thu, 14 Nov 2019 21:13:46 -0800 branchmap: make "closed" a set from beginning instead of converting from list
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 21:13:46 -0800] rev 43688
branchmap: make "closed" a set from beginning instead of converting from list Differential Revision: https://phab.mercurial-scm.org/D7427
Sun, 17 Nov 2019 01:34:52 -0500 debugextensions: gracefully handle missing __file__ attributes
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 Nov 2019 01:34:52 -0500] rev 43687
debugextensions: gracefully handle missing __file__ attributes This was crashing PyOxidizer. Differential Revision: https://phab.mercurial-scm.org/D7452
Sun, 17 Nov 2019 01:00:06 -0500 debuginstall: gracefully handle missing __file__ attributes
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 Nov 2019 01:00:06 -0500] rev 43686
debuginstall: gracefully handle missing __file__ attributes This was crashing PyOxidizer. While here, point "Python lib" and "installed modules" to the oxidized binary when read from memory instead of pretending their location is unknown. Differential Revision: https://phab.mercurial-scm.org/D7451
Sat, 16 Nov 2019 16:25:28 +0900 typing: add pseudo localstr.__init__() to help pytype
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 16:25:28 +0900] rev 43685
typing: add pseudo localstr.__init__() to help pytype Apparently, pytype failed to parse localstr.__new__()? This fixes the following errors: line 126, in __hash__: No attribute '_utf8' on localstr [attribute-error] line 188, in tolocal: Function localstr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, string: str, ...) Actually passed: (self, string: bytes, ...)
Sat, 16 Nov 2019 15:24:49 +0900 typing: fix argument type of encoding.localstr()
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:24:49 +0900] rev 43684
typing: fix argument type of encoding.localstr() It takes both utf-8 and local strings in bytes type.
Sat, 16 Nov 2019 16:09:39 +0900 typing: suppress error of py2 encoding.strtolocal() and .strfromlocal()
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 16:09:39 +0900] rev 43683
typing: suppress error of py2 encoding.strtolocal() and .strfromlocal() I don't know how to conditionally get rid of these py2/py3 overloads from .pyi file. Instead, this patch makes pytype ignore the false-positives: line 271, in strtolocal: bad option in return type [bad-return-type] Expected: bytes Actually returned: str
Sat, 16 Nov 2019 15:34:47 +0900 typing: constrain argument/return types of encoding.toutf8b()
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:34:47 +0900] rev 43682
typing: constrain argument/return types of encoding.toutf8b()
Sat, 16 Nov 2019 15:27:12 +0900 typing: fix argument type of encoding.tolocal() and .fromutf8b()
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:27:12 +0900] rev 43681
typing: fix argument type of encoding.tolocal() and .fromutf8b() Fixes various pytype errors.
Sat, 16 Nov 2019 15:10:41 +0900 typing: fix forward reference in _Tlocalstr type bound
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:10:41 +0900] rev 43680
typing: fix forward reference in _Tlocalstr type bound AFAIK, a quoted string in type position is translated to its ForwardRef. https://github.com/python/typing/issues/34 This fixes the following error: File "mercurial/encoding.py", line 38, in <module>: Name 'localstr' is not defined [name-error]
Sat, 16 Nov 2019 15:43:21 +0900 encoding: make getcols() raise exception explicitly
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Nov 2019 15:43:21 +0900] rev 43679
encoding: make getcols() raise exception explicitly This helps pytype. File "mercurial/encoding.py", line 329, in getcols: bad option in return type [bad-return-type] Expected: bytes Actually returned: None
Sat, 16 Nov 2019 12:19:43 -0500 setup: conditionalize access to `sys.dllhandle` when building extensions
Matt Harbison <matt_harbison@yahoo.com> [Sat, 16 Nov 2019 12:19:43 -0500] rev 43678
setup: conditionalize access to `sys.dllhandle` when building extensions This code is only run on Windows, and was crashing PyOxidizer when running in `setup-py-install` mode. Now an oxidized binary can be built by simply pointing to setup.py. Something is slightly different now that it's not being built from a virtualenv. Previously, `hg version` could print to the screen, but now it aborts saying "Incorrect function". But I can see the output if redirected to a file, and it's not complaining about missing C extensions, so I think those are loading now (unlike from the virtualenv). The interesting this about this incorrect function output is that it failed when initially built. I then went back and did a `make clean` and `make local` with py3 and then py2 to ensure I didn't break the existing code. At that point I ran the oxidized executable again and it was able to print to the screen normally! So I ran `pyoxidizer build` again, it only output the following, and then running the executable failed to output again: (pyO2_venv) C:\Users\Matt\hg3\hg_pyO2>pyoxidizer build Finished dev [unoptimized + debuginfo] target(s) in 0.12s packaging application into C:/Users/Matt/hg3/hg_pyO2\build\apps\hg_pyO2\x86_64-pc-windows-msvc\debug purging C:/Users/Matt/hg3/hg_pyO2\build\apps\hg_pyO2\x86_64-pc-windows-msvc\debug copying C:/Users/Matt/hg3/hg_pyO2\build\target\x86_64-pc-windows-msvc\debug\hg_pyO2.exe to C:/Users/Matt/hg3/hg_pyO2\build\apps\hg_pyO2\x86_64-pc-windows-msvc\debug\hg_pyO2.exe resolving packaging state... writing license for [...] hg_pyO2 packaged into C:/Users/Matt/hg3/hg_pyO2\build\apps\hg_pyO2\x86_64-pc-windows-msvc\debug executable path: C:/Users/Matt/hg3/hg_pyO2\build\apps\hg_pyO2\x86_64-pc-windows-msvc\debug\hg_pyO2.exe Differential Revision: https://phab.mercurial-scm.org/D7444
Wed, 13 Nov 2019 22:40:32 +0100 zeroconf: fix traceback under py3 stable
Kim Alvefur <zash@zash.se> [Wed, 13 Nov 2019 22:40:32 +0100] rev 43677
zeroconf: fix traceback under py3 hg serve under py3 caused struct.error: char format requires a bytes object of length 1 <pulkit25> ah, I think that should be `pycompat.bytechr` instead of chr
Sat, 16 Nov 2019 11:48:47 -0500 setup: use bytes for assumed python version
Matt Harbison <matt_harbison@yahoo.com> [Sat, 16 Nov 2019 11:48:47 -0500] rev 43676
setup: use bytes for assumed python version Caught by PyOxidizer when hacking on Windows. # skip-blame for b'' prefixing Differential Revision: https://phab.mercurial-scm.org/D7443
Sat, 16 Nov 2019 11:42:27 -0500 setup: combine two contiguous string literals
Matt Harbison <matt_harbison@yahoo.com> [Sat, 16 Nov 2019 11:42:27 -0500] rev 43675
setup: combine two contiguous string literals Differential Revision: https://phab.mercurial-scm.org/D7442
Thu, 14 Nov 2019 13:18:22 -0800 util: remove datapath and swith users over to resourceutil
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 13:18:22 -0800] rev 43674
util: remove datapath and swith users over to resourceutil The util module no longer needs the datapath for injecting it into the i18n module, so we can remove it from there and update other users. Differential Revision: https://phab.mercurial-scm.org/D7436
Thu, 14 Nov 2019 12:41:33 -0800 i18n: get datapath directly from resourceutil
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 12:41:33 -0800] rev 43673
i18n: get datapath directly from resourceutil The new resourceutil module is lower in the dependency graph, so we can depend directly on it and won't have to depend on the util module to inject the datapath. Differential Revision: https://phab.mercurial-scm.org/D7435
Thu, 14 Nov 2019 12:33:10 -0800 util: move definition of datapath to resourceutil
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 12:33:10 -0800] rev 43672
util: move definition of datapath to resourceutil Since this means moving the function into a subdirectory, we have to compensate by adding another layer of os.path.dirname(). Differential Revision: https://phab.mercurial-scm.org/D7434
Thu, 14 Nov 2019 11:52:22 -0800 procutil: move mainfrozen() to new resourceutil.py
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 11:52:22 -0800] rev 43671
procutil: move mainfrozen() to new resourceutil.py The i18n module practically depends on procutil for mainfrozen() but since procutil depends on i18n, it would be a circular dependency if i18n depended directly on procutil. The cycle is currently resolved by having the higher-level util module calculate the "datapath" and inject it into i18n. Extracting mainfrozen() to a new module lets us clean up the dependencies. Differential Revision: https://phab.mercurial-scm.org/D7433
Thu, 14 Nov 2019 17:36:01 -0800 defaults: rename default.d to defaultrc to make it a valid package name
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 17:36:01 -0800] rev 43670
defaults: rename default.d to defaultrc to make it a valid package name "default.d" is not a valid Python package name, and it needs to be a valid package name if we want to be able to load the files from here as resources. Differential Revision: https://phab.mercurial-scm.org/D7426
Thu, 14 Nov 2019 17:30:52 -0800 help: remove references to default.d/ from user-facing docs
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 17:30:52 -0800] rev 43669
help: remove references to default.d/ from user-facing docs The user doesn't need to know what we call the internal directory and I'm about to rename it. Differential Revision: https://phab.mercurial-scm.org/D7425
Sun, 17 Nov 2019 19:55:01 +0100 cffi: fix build on Python 3 stable
Manuel Jacob <me@manueljacob.de> [Sun, 17 Nov 2019 19:55:01 +0100] rev 43668
cffi: fix build on Python 3 CFFI expects the arguments to be of type str, which means that the string literals should not have the `b` prefix.
Sat, 16 Nov 2019 20:08:35 +0100 pure: use string for another exception in the pure version of base85 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:08:35 +0100] rev 43667
pure: use string for another exception in the pure version of base85 That message does not seems tested, but I am assuming that the same reasoning as for the previous changeset applies.
Sat, 16 Nov 2019 20:07:49 +0100 pure: use string for exception in the pure version of base85 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Nov 2019 20:07:49 +0100] rev 43666
pure: use string for exception in the pure version of base85 Without this change, running the test with python3 and --pure gives the following error:: --- /home/marmoute/src/mercurial-dev/tests/test-import-git.t +++ /home/marmoute/src/mercurial-dev/tests/test-import-git.t.err @@ -518,7 +518,7 @@ > > EOF applying patch from stdin - abort: could not decode "binary2" binary patch: bad base85 character at position 6 + abort: could not decode "binary2" binary patch: b'bad base85 character at position 6' [255] $ hg revert -aq To make the cext implementation, we use a "native" string for the exception. This fix the test failure.
Thu, 14 Nov 2019 10:47:04 +0100 bisect: replace try:/finally: by a "restore_state" context manager
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 14 Nov 2019 10:47:04 +0100] rev 43665
bisect: replace try:/finally: by a "restore_state" context manager This should help pytype to not consider "bgood" variable as NameError. See https://phab.mercurial-scm.org/D7384 for context. Differential Revision: https://phab.mercurial-scm.org/D7430
Wed, 30 Oct 2019 19:19:57 -0400 histedit: render a rolled up description using the proper roll colours
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 30 Oct 2019 19:19:57 -0400] rev 43664
histedit: render a rolled up description using the proper roll colours Users have rightfully complained that the old behaviour of completely removing the description of a rolled commit makes it difficult to remember what was in that commit. Instead, we now render the removed description in red. I couldn't think of a simpler way to do this. You can't just combine existing curses colours into new effects; only secondary effects like bold or underline can be logically OR'ed to generate a combined text effect. It seems easier to just redundantly keep track of what the roll colour should be.
Wed, 30 Oct 2019 19:34:57 -0400 histedit: define new colour pairs for roll action
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 30 Oct 2019 19:34:57 -0400] rev 43663
histedit: define new colour pairs for roll action Red seems like a good colour to indicate removal, since that's the colour we use in diffs. We need three varieties with three different backgrounds corresponding to the possible ways we can display a rule.
Wed, 30 Oct 2019 19:27:09 -0400 histeditrule: split __bytes__ property into prefix and desc
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 30 Oct 2019 19:27:09 -0400] rev 43662
histeditrule: split __bytes__ property into prefix and desc In order to be able to colourise the description of the rule, we need to have it as a separate bytestring. Curses doesn't make it easy to take existing text on the screen and give it different properties; we can only add new text with new properties.
Fri, 15 Nov 2019 22:22:55 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Fri, 15 Nov 2019 22:22:55 +0900] rev 43661
merge with stable
Thu, 14 Nov 2019 20:40:54 -0800 packaging: convert to UNIX line endings
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 14 Nov 2019 20:40:54 -0800] rev 43660
packaging: convert to UNIX line endings I must have my editor on Windows configured incorrectly because I submitted patches with Windows line endings :( # skip-blame whitespace only line ending changes Differential Revision: https://phab.mercurial-scm.org/D7421
Thu, 14 Nov 2019 20:35:11 -0800 black: blacken scripts
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 14 Nov 2019 20:35:11 -0800] rev 43659
black: blacken scripts test-check-format.t doesn't appear to detect Python scripts with shebangs. But my editor which is configured to auto run black on Python files does and it appears some files are not blackened. This commit blackens scripts that need it. # skip-blame reformatting Differential Revision: https://phab.mercurial-scm.org/D7420
Tue, 12 Nov 2019 10:17:59 -0500 dirs: resolve fuzzer OOM situation by disallowing deep directory hierarchies
Augie Fackler <augie@google.com> [Tue, 12 Nov 2019 10:17:59 -0500] rev 43658
dirs: resolve fuzzer OOM situation by disallowing deep directory hierarchies It seems like 2048 directories ought to be enough for any reasonable use of Mercurial? A previous version of this patch scanned for slashes before any allocations occurred. That approach is slower than this in the happy path, but much faster than this in the case that too many slashes are encountered. We may want to revisit it in the future using memchr() so it'll be well-optimized by the libc we're using. .. bc: Mercurial will now defend against OOMs by refusing to operate on paths with 2048 or more components. This means that _extremely_ deep path hierarchies will be rejected, but we anticipate nobody is using hierarchies this deep. Differential Revision: https://phab.mercurial-scm.org/D7411
Thu, 14 Nov 2019 14:14:11 -0800 py3: use native string for 'macosx_app'
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 14:14:11 -0800] rev 43657
py3: use native string for 'macosx_app' I couldn't find any definitive information on this, but all examples (except for ours) seem to use a native string. Differential Revision: https://phab.mercurial-scm.org/D7414
Thu, 14 Nov 2019 14:07:36 -0800 py3: drop an unnecessary fsencode() before comparing with constant
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 14:07:36 -0800] rev 43656
py3: drop an unnecessary fsencode() before comparing with constant Differential Revision: https://phab.mercurial-scm.org/D7413
Thu, 14 Nov 2019 14:03:02 -0800 py3: use native string as fallback value for __file__ for consistency
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 14:03:02 -0800] rev 43655
py3: use native string as fallback value for __file__ for consistency This is not a bugfix (pycommpat.fsencode(b'') is a no-op on py3), but the b'' value was inconsistent and confusing. Differential Revision: https://phab.mercurial-scm.org/D7412
Thu, 14 Nov 2019 13:38:17 -0500 scmutil: convert status data object from a tuple to an attrs (API)
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 13:38:17 -0500] rev 43654
scmutil: convert status data object from a tuple to an attrs (API) We've been pushing towards the property names for a while, and the subclassing of the tuple confuses pytype. Rather than bend over backwards to try and annotate the tuple subclass, let's just use attrs here. Differential Revision: https://phab.mercurial-scm.org/D7406
Thu, 14 Nov 2019 15:29:27 -0500 perf: bool() elements of dirstate.status return instead of len()
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:29:27 -0500] rev 43653
perf: bool() elements of dirstate.status return instead of len() I'm about to make scmutil.status no longer have a len(), so we need to do something else to "use" the results in this perf method. Differential Revision: https://phab.mercurial-scm.org/D7405
Thu, 14 Nov 2019 15:28:44 -0500 tags: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:28:44 -0500] rev 43652
tags: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7404
Thu, 14 Nov 2019 15:28:34 -0500 subrepo: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:28:34 -0500] rev 43651
subrepo: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7403
Thu, 14 Nov 2019 15:28:08 -0500 revset: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:28:08 -0500] rev 43650
revset: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7402
Thu, 14 Nov 2019 15:27:58 -0500 patch: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:27:58 -0500] rev 43649
patch: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7401
Thu, 14 Nov 2019 15:27:50 -0500 logcmdutil: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:27:50 -0500] rev 43648
logcmdutil: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7400
Thu, 14 Nov 2019 15:27:40 -0500 context: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:27:40 -0500] rev 43647
context: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7399
Thu, 14 Nov 2019 15:27:32 -0500 commands: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:27:32 -0500] rev 43646
commands: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7398
Thu, 14 Nov 2019 15:27:20 -0500 cmdutil: convert terse status result back to an scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:27:20 -0500] rev 43645
cmdutil: convert terse status result back to an scmutil.status This is also part of detupling scmutil.status. Differential Revision: https://phab.mercurial-scm.org/D7397
Thu, 14 Nov 2019 15:26:17 -0500 cmdutil: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:26:17 -0500] rev 43644
cmdutil: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7396
Thu, 14 Nov 2019 15:26:05 -0500 uncommit: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:26:05 -0500] rev 43643
uncommit: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7395
Thu, 14 Nov 2019 15:25:57 -0500 transplant: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:25:57 -0500] rev 43642
transplant: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7394
Thu, 14 Nov 2019 15:25:48 -0500 split: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:25:48 -0500] rev 43641
split: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7393
Thu, 14 Nov 2019 15:25:40 -0500 mq: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:25:40 -0500] rev 43640
mq: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7392
Thu, 14 Nov 2019 15:25:26 -0500 hgk: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:25:26 -0500] rev 43639
hgk: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7391
Thu, 14 Nov 2019 15:24:22 -0500 extdiff: use field names instead of field numbers on scmutil.status
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 15:24:22 -0500] rev 43638
extdiff: use field names instead of field numbers on scmutil.status As part of my pytype adventures I want to make scmutil.status no longer a subclass of tuple. This is part of that process. Differential Revision: https://phab.mercurial-scm.org/D7390
Wed, 13 Nov 2019 20:32:24 -0500 encoding: fix bad type annotation
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 20:32:24 -0500] rev 43637
encoding: fix bad type annotation This function returns utf-8 in a bytes, not a unicode. Differential Revision: https://phab.mercurial-scm.org/D7379
Thu, 14 Nov 2019 13:13:36 -0500 branchmap: annotate constructor type for branchcache
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 13:13:36 -0500] rev 43636
branchmap: annotate constructor type for branchcache This type signature is...big. But it's correct as far as I can tell, and it detected a bug. Differential Revision: https://phab.mercurial-scm.org/D7389
Wed, 13 Nov 2019 22:30:33 -0500 debugcommands: don't shadow the error module
Augie Fackler <augie@google.com> [Wed, 13 Nov 2019 22:30:33 -0500] rev 43635
debugcommands: don't shadow the error module Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7378
Thu, 14 Nov 2019 13:14:02 -0500 branchmap: correctly set()-ify list argument
Augie Fackler <augie@google.com> [Thu, 14 Nov 2019 13:14:02 -0500] rev 43634
branchmap: correctly set()-ify list argument Caught with pytype. I'm more than a little curious how this never caused problems. Differential Revision: https://phab.mercurial-scm.org/D7289
Thu, 14 Nov 2019 08:03:26 -0800 utils: move finddirs() to pathutil
Martin von Zweigbergk <martinvonz@google.com> [Thu, 14 Nov 2019 08:03:26 -0800] rev 43633
utils: move finddirs() to pathutil This is a follow-up to c21aca51b392 (utils: move the `dirs` definition in pathutil (API), 2019-11-06). finddirs() is closely related to dirs and used by it. Differential Revision: https://phab.mercurial-scm.org/D7388
Wed, 13 Nov 2019 21:52:25 -0500 help: create packages for the help text
Matt Harbison <matt_harbison@yahoo.com> [Wed, 13 Nov 2019 21:52:25 -0500] rev 43632
help: create packages for the help text These files need to be loaded as resources with PyOxidizer, instead of using filesystem representations. AFAICT, the resource loading mechanisms only work for the named package given to it, and can't reach into a subdirectory. While here, the `help` directory is renamed to `helptext`. Without this, trying to load external help text crashed in mercurial/help.py when importing `.i18n`, saying there's no `mercurial.help.i18n` module. Differential Revision: https://phab.mercurial-scm.org/D7376
Thu, 14 Nov 2019 11:33:05 +0100 tests: test "hg log" with --line-range and --copies
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 14 Nov 2019 11:33:05 +0100] rev 43631
tests: test "hg log" with --line-range and --copies This now works (does not crash), due to previous changeset. Since --line-range implies --follow, --copies option is redundant.
Thu, 14 Nov 2019 11:11:38 +0100 logcmdutil: let getlinerangerevs() return "revs" as a smartset
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 14 Nov 2019 11:11:38 +0100] rev 43630
logcmdutil: let getlinerangerevs() return "revs" as a smartset This makes it consistent in "hg log" command where 'revs' can come from logcmdutil.getrevs() as a smartset or from getlinerangerevs(), previously as a list. This will help type hinting as noticed in https://phab.mercurial-scm.org/D7377.
Wed, 13 Nov 2019 17:06:05 +0100 patchbomb: fix wrong argument type when calling mail generator.flatten()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Nov 2019 17:06:05 +0100] rev 43629
patchbomb: fix wrong argument type when calling mail generator.flatten()
Wed, 13 Nov 2019 16:46:28 +0100 mail: move strtolocal call in _addressencode()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Nov 2019 16:46:28 +0100] rev 43628
mail: move strtolocal call in _addressencode()
Wed, 13 Nov 2019 15:23:04 +0100 mail: use a native string for "subtype" value
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Nov 2019 15:23:04 +0100] rev 43627
mail: use a native string for "subtype" value This is somehow similar to previous changeset and avoids one str conversion.
Tue, 12 Nov 2019 22:52:30 +0100 mail: let all charset values be native strings
Denis Laxalde <denis@laxalde.org> [Tue, 12 Nov 2019 22:52:30 +0100] rev 43626
mail: let all charset values be native strings Charset values will typically be used to build email.header.Header instances, which takes str (though it tolerates bytes) or passed to decode()/encode() methods of string values (which want str). It seems that using native str involves less conversions than before and this also helps type hinting (as illustrates removal of pytype disabling instructions).
Wed, 13 Nov 2019 22:20:44 +0100 mail: add type hints for pytype
Denis Laxalde <denis@laxalde.org> [Wed, 13 Nov 2019 22:20:44 +0100] rev 43625
mail: add type hints for pytype We essentially annotate functions in which handling of bytes/str is not obvious in order to hopefully clear things out. See also changeset 2ade00f3b03b introducing typing hints in Mercurial. Most types are straightforward but a few is wrong, and we need to either disable pytype on respective instructions or use wrong annotations. These will be fixed in next changesets. Notice the type Union[bytes, str] of "s" parameter of headencode(), this reflects how email.header.Header.append() behaves.
Tue, 12 Nov 2019 17:12:16 +0100 mail: fix a bad return type in _encode()
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Nov 2019 17:12:16 +0100] rev 43624
mail: fix a bad return type in _encode() This particular instruction returned only a string and omitted the charset value.
Mon, 11 Nov 2019 18:55:42 -0800 packaging: stage files and dynamically generate WiX installer
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 11 Nov 2019 18:55:42 -0800] rev 43623
packaging: stage files and dynamically generate WiX installer Like we did for Inno, we want to make the WiX installer "dumb" and simply consume source files from a directory tree rather than have to define every single file in installer files. This will greatly decrease the amount of effort required to maintain the WiX installer since we don't have to think that much about keeping files in sync. This commit changes the WiX packager to populate a staging directory as part of packaging. After it does so, it scans that directory and dynamically generates WiX XML defining the content within. The IDs and GUIDs being generated are deterministic. So, upgrades should work as expected in Windows Installer land. (WiX has a "heat" tool that can generate XML by walking the filesystem but it doesn't have this deterministic property, sadly.) As part of this change, GUIDs are now effectively reset. So the next upgrade should be a complete wipe and replace. This could potentially cause issues. But in my local testing, I was able to upgrade an existing 5.1.2 install without issue. Compared to the previous commit, the installed files differ in the following: * A ReleaseNotes.txt file is now included * A hgrc.d/editor.rc file is now generated (mercurial.rc has been updated to reflect this logical change to the content source) * All files are marked as read-only. Previously, only a subset of files were. This should help prevent unwanted tampering. Although we may want to consider use cases like modifying template files... This change also means that Inno and WiX are now using very similar code for managing the install layout. This means that on disk both packages are nearly identical. The differences in install layout are as follows: * Inno has a Copying.txt vs a COPYING.rtf for WiX. (The WiX installer wants to use RTF.) * Inno has a Mercurial.url file that is an internet shortcut to www.mercurial-scm.org. (This could potentially be removed.) * Inno includes msvc[mpr]90.dll files and WiX does not. (WiX installs the MSVC runtime via merge modules.) * Inno includes unins000.{dat,exe} files. (WiX's state is managed by Windows Installer, which places things elsewhere.) Because file lists are dynamically generated now, the test ensuring things remain in sync has been deleted. Good riddance. While this is a huge step towards unifying the Windows installers, there's still some improvements that can be made. But I think it is worth celebrating the milestone of getting both Inno and WiX to essentially share core packaging code and workflows. That should make it much easier to change the installers going forward. This will aid support of Python 3. Differential Revision: https://phab.mercurial-scm.org/D7173
Mon, 11 Nov 2019 19:04:49 -0800 tests: add optional output when wheel is missing
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 11 Nov 2019 19:04:49 -0800] rev 43622
tests: add optional output when wheel is missing If the `wheel` package isn't installed, pip will emit a warning on stderr complaining about that. Alternatively, we could redirect stderr to stdout and swallow the warning. But I like tests having visibility of warnings, as it helps keep us honest regarding edge cases. Differential Revision: https://phab.mercurial-scm.org/D7371
Wed, 28 Aug 2019 17:43:56 -0700 py3: replace "%r" by"'%s'% for py3-compatible (and clearer) quoting in chg
Martin von Zweigbergk <martinvonz@google.com> [Wed, 28 Aug 2019 17:43:56 -0700] rev 43621
py3: replace "%r" by"'%s'% for py3-compatible (and clearer) quoting in chg Differential Revision: https://phab.mercurial-scm.org/D7375
Tue, 22 Oct 2019 23:21:26 -0700 dirstate: respect request to not list unknown/ignored/clean files (API)
Martin von Zweigbergk <martinvonz@google.com> [Tue, 22 Oct 2019 23:21:26 -0700] rev 43620
dirstate: respect request to not list unknown/ignored/clean files (API) Unknown files that are explicitly mentioned by the matcher are returned even if the caller said unknown=False (and it seems the same is done for ignored files). That seems pretty surprising. Let's make the interface less surprising by respecting the caller's request. Differential Revision: https://phab.mercurial-scm.org/D7150
Wed, 13 Nov 2019 09:09:42 +0100 py3: pass a bytes value for "msg" to nouideprecwarn()
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 13 Nov 2019 09:09:42 +0100] rev 43619
py3: pass a bytes value for "msg" to nouideprecwarn() That function formats "msg" with the "version" value. On Python 3, this leads to "TypeError: can only concatenate str (not "bytes") to str". Also eliminate spurious strings concatenation in single-line declarations. Differential Revision: https://phab.mercurial-scm.org/D7373
Tue, 12 Nov 2019 15:53:58 -0800 remotefilelog: handle **kwargs correctly when overriding changelog.add()
Daniel Ploch <dploch@google.com> [Tue, 12 Nov 2019 15:53:58 -0800] rev 43618
remotefilelog: handle **kwargs correctly when overriding changelog.add() Differential Revision: https://phab.mercurial-scm.org/D7372
Mon, 11 Nov 2019 18:51:55 -0800 packaging: ship all help .txt files on WiX
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 11 Nov 2019 18:51:55 -0800] rev 43617
packaging: ship all help .txt files on WiX These are technically not needed. But it is easier to ship all files than to cherry-pick. A `make install` will copy these files, so the new behavior is consistent with that. This also makes WiX consistent with Inno, which is my main reason for doing this. If we don't want to ship the files (which is a valid argument), I think we can do that in a follow up. Differential Revision: https://phab.mercurial-scm.org/D7166
Wed, 23 Oct 2019 12:31:15 -0700 packaging: install contrib/mq.el on WiX
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 12:31:15 -0700] rev 43616
packaging: install contrib/mq.el on WiX This makes things consistent with the Inno installer. Differential Revision: https://phab.mercurial-scm.org/D7167
Mon, 11 Nov 2019 16:45:22 -0500 fuzz: clean out most of fuzzutil
Augie Fackler <augie@google.com> [Mon, 11 Nov 2019 16:45:22 -0500] rev 43615
fuzz: clean out most of fuzzutil It's now a header-only setup that just selects absl:: or std:: versions of things as needed, and a logging helper. There's some room for future cleanups here: we could move to just requiring a C++17 compiler and get rid of the absl stuff. Also, the mpatch parser has a fair amount of parsing the input string into char* blocks that we can and probably should fix that up to use FuzzedDataProvider as well. Differential Revision: https://phab.mercurial-scm.org/D7370
Mon, 11 Nov 2019 16:37:18 -0500 fuzz: migrate xdiff fuzzer to use FuzzedDataProvider
Augie Fackler <augie@google.com> [Mon, 11 Nov 2019 16:37:18 -0500] rev 43614
fuzz: migrate xdiff fuzzer to use FuzzedDataProvider Differential Revision: https://phab.mercurial-scm.org/D7369
Mon, 11 Nov 2019 14:48:30 -0500 fuzz: migrate bdiff fuzzer to use FuzzedDataProvider
Augie Fackler <augie@google.com> [Mon, 11 Nov 2019 14:48:30 -0500] rev 43613
fuzz: migrate bdiff fuzzer to use FuzzedDataProvider Differential Revision: https://phab.mercurial-scm.org/D7368
Mon, 11 Nov 2019 16:14:35 -0500 dirstate: re-blacken file
Augie Fackler <augie@google.com> [Mon, 11 Nov 2019 16:14:35 -0500] rev 43612
dirstate: re-blacken file This got overlooked in landing a recent patch, but it's easy to fix up. Differential Revision: https://phab.mercurial-scm.org/D7367
Wed, 06 Nov 2019 16:24:24 +0100 rust-matchers: remove default implementations for `Matcher` trait
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Nov 2019 16:24:24 +0100] rev 43611
rust-matchers: remove default implementations for `Matcher` trait We don't expect a whole lot of matchers to be defined, and this makes it more obvious what a matcher does by reading its `impl Matcher for FooMatcher`. This patch has the added benefit of fixing the `AlwaysMatcher`, its `matches` function differs from the former default. Differential Revision: https://phab.mercurial-scm.org/D7255
Wed, 23 Oct 2019 13:55:12 -0700 packaging: use lower case for RC files
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:55:12 -0700] rev 43610
packaging: use lower case for RC files The file case doesn't matter. I'm not sure why it is capitalized. This is a source of inconsistency between Inno and WiX. So let's standardize on the lower case names. The MSI should remove the old files before installing the new one, so there shouldn't be a problem with a case collision. And, users should not have modified these files, so it should be safe to rename them. Differential Revision: https://phab.mercurial-scm.org/D7172
Wed, 23 Oct 2019 18:42:19 -0700 packaging: write out editor.rc in Python
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:42:19 -0700] rev 43609
packaging: write out editor.rc in Python Let's dynamically generate the file from Python instead of relying on Inno functionality, as that will give more visibility into what's going on. I spotted this as part of converging the install layout of Inno and WiX: the former doesn't install an editor.rc and instead defines the editor via its mercurial.rc file. We will change the behavior of WiX later once it is consuming the staged install directory for packaging. Differential Revision: https://phab.mercurial-scm.org/D7171
Wed, 23 Oct 2019 13:25:01 -0700 packaging: stop installing Contributors.txt
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:25:01 -0700] rev 43608
packaging: stop installing Contributors.txt This file isn't up to date. If we are going to call out contributors, we should auto generate a file from `hg log` or something. I don't think we need to include it in the Windows install. This change makes Inno more consistent with WiX, which doesn't ship this file. Differential Revision: https://phab.mercurial-scm.org/D7170
Wed, 23 Oct 2019 13:21:35 -0700 packaging: remove hg-ssh.8.html from Inno installer
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:21:35 -0700] rev 43607
packaging: remove hg-ssh.8.html from Inno installer We don't ship hg-ssh because it requires a python.exe to run, which we don't ship. So it doesn't make sense to ship the HTML documentation for this tool. This change makes the Inno install layout more consistent with WiX, which doesn't ship this file. Functionality for removing files has been made generic, in anticipation of future expansion. Differential Revision: https://phab.mercurial-scm.org/D7169
Wed, 23 Oct 2019 13:00:14 -0700 packaging: install .rc files to hgrc.d
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 13:00:14 -0700] rev 43606
packaging: install .rc files to hgrc.d Currently, Inno installs these .rc files to a default.d directory and WiX to a hgrc.d directory. Mercurial automatically loads files in an hgrc.d directory next to the executable and in an "internal" default.d directory. This "internal" directory is util.datadir, which on Windows installs made with py2exe is the directory containing hg.exe. So on Windows both hgrc.d and default.d directories relative to hg.exe are loaded. For the install layout, I think it makes sense for hgrc.d to be used, as that path is documented as non-internal. So this commit changes the Inno install layout to use hgrc.d instead of default.d. .. bc:: Changed default config file location in Windows .exe installers Mercurial's installer installs some default .rc config files. Previously, these were installed in a default.d directory. These are now installed in an hgrc.d directory. Custom default.d/*.rc files should still be loaded. But it is recommended to move these to hgrc.d/*.rc. This change only affects the .exe installers (not the .msi installers). Differential Revision: https://phab.mercurial-scm.org/D7168
Thu, 07 Nov 2019 11:13:31 +0100 rust: introduce SIZE_FROM_OTHER_PARENT constant
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 11:13:31 +0100] rev 43605
rust: introduce SIZE_FROM_OTHER_PARENT constant This will clarify what `-2` meant in the codebase. This change also merged imports in affected files for cleanup. Differential Revision: https://phab.mercurial-scm.org/D7301
Thu, 07 Nov 2019 10:32:26 +0100 rust-status: refactor dispatch case for normal files
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 10:32:26 +0100] rev 43604
rust-status: refactor dispatch case for normal files This should make the code easier to read and more idiomatic. Differential Revision: https://phab.mercurial-scm.org/D7300
Thu, 07 Nov 2019 10:23:42 +0100 rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries
Raphaël Gomès <rgomes@octobus.net> [Thu, 07 Nov 2019 10:23:42 +0100] rev 43603
rust-status: return a ParallelIterator instead of a Vec from stat_dmap_entries This allows the caller function to choose when and how the iteration and/or collection happens. This change also cleans up the now unused `filter_map`. Differential Revision: https://phab.mercurial-scm.org/D7299
Wed, 06 Nov 2019 13:43:18 +0100 rust-status: improve status performance
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Nov 2019 13:43:18 +0100] rev 43602
rust-status: improve status performance This change does more things in the parallel loop, refactors the file-level logic into two functions for added clarity. This bit of Rust code takes 55ms to execute on a repo where the stat'ing part of Valentin's fast path takes 40ms. While the code differs a bit and it's hard to get an exact measurement of how much of a performance impact it has, I can be fairly certain that this implementation is *at worse* twice as slow. Differential Revision: https://phab.mercurial-scm.org/D7254
Sat, 09 Nov 2019 12:55:56 +0900 bookmarks: accept explicit -r 'wdir()' when adding new bookmarks (issue6218)
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:55:56 +0900] rev 43601
bookmarks: accept explicit -r 'wdir()' when adding new bookmarks (issue6218) Even though the bookmark semantics can't be fully encoded to the virtual working changeset idea, the active bookmark can be considered a bookmark of the working revision. Before, 'tgt' was None, and changes=[(bm, None)] means deleting a bookmark named 'bm'.
Sat, 09 Nov 2019 12:44:00 +0900 bookmarks: use changectx instead of remembering hex of hidden revision
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:44:00 +0900] rev 43600
bookmarks: use changectx instead of remembering hex of hidden revision It should be better to not depend on the ctx variable which was assigned conditionally.
Sat, 09 Nov 2019 12:32:20 +0900 bookmarks: resolve target revision out of the bookmarks loop
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:32:20 +0900] rev 43599
bookmarks: resolve target revision out of the bookmarks loop The target revision doesn't depend on the bookmark to be added.
Sat, 09 Nov 2019 12:09:50 +0900 bookmarks: fix handling of multiple bookmarks with one to be deactivated
Yuya Nishihara <yuya@tcha.org> [Sat, 09 Nov 2019 12:09:50 +0900] rev 43598
bookmarks: fix handling of multiple bookmarks with one to be deactivated Before, "hg bookmark --inactive Z Y" would ignore "Y" if "Z" were currently active. I'm pretty sure it is a bug.
Tue, 12 Nov 2019 11:05:03 +0100 py3: avoid iterating over a literal bytes in highlight stable
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 12 Nov 2019 11:05:03 +0100] rev 43597
py3: avoid iterating over a literal bytes in highlight In Python 3, iterating over a bytes literal yields integers. Since we use the value in `text.replace()`, this fails on Python 3 with the following trackback: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgwebdir_mod.py", line 378, in run_wsgi for r in self._runwsgi(req, res): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 326, in run_wsgi for r in self._runwsgi(req, res, repo): File "/usr/lib/python3/dist-packages/mercurial/hgweb/hgweb_mod.py", line 449, in _runwsgi return getattr(webcommands, cmd)(rctx) File "/usr/lib/python3/dist-packages/mercurial/hgweb/webcommands.py", line 211, in file return _filerevision(web, webutil.filectx(web.repo, web.req)) File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 72, in filerevision_highlight pygmentize(web, b'fileline', fctx, web.tmpl) File "/usr/lib/python3/dist-packages/hgext/highlight/__init__.py", line 58, in pygmentize field, fctx, style, tmpl, guessfilenameonly=filenameonly File "/usr/lib/python3/dist-packages/hgext/highlight/highlight.py", line 62, in pygmentize text = text.replace(c, b'') TypeError: a bytes-like object is required, not 'int'
Mon, 11 Nov 2019 22:10:26 +0900 import-checker: allow 'from typing import ...'
Yuya Nishihara <yuya@tcha.org> [Mon, 11 Nov 2019 22:10:26 +0900] rev 43596
import-checker: allow 'from typing import ...' Suppresses the following error in test-check-module-imports.t: mercurial/encoding.py:24: relative import of stdlib module
Tue, 29 Oct 2019 23:33:34 -0700 match: drop support for passing '.' for root dir to visit*() methods
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Oct 2019 23:33:34 -0700] rev 43595
match: drop support for passing '.' for root dir to visit*() methods We said we'd drop support for it after 5.1, so it's time to clean it up now. Differential Revision: https://phab.mercurial-scm.org/D7249
Wed, 16 Oct 2019 21:31:40 -0700 tests: use time.time() for relative start and stop times
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 16 Oct 2019 21:31:40 -0700] rev 43594
tests: use time.time() for relative start and stop times os.times() does not work on Windows. This was resulting in the test start, stop, and duration times being reported as 0. This commit swaps in time.time() for wall clock measurements. This isn't ideal, as time.time() is not monotonic. But Python 2.7 does not have a monotonic timer that works on Windows. So it is the best we have which is trivially usable. And test times aren't terribly important, so variances due to clock skew are arguably acceptable. Differential Revision: https://phab.mercurial-scm.org/D7126
Wed, 16 Oct 2019 21:25:08 -0700 tests: rename stopped and started variables to reflect times
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 16 Oct 2019 21:25:08 -0700] rev 43593
tests: rename stopped and started variables to reflect times In preparation for introducing more variables that will have similar names. Differential Revision: https://phab.mercurial-scm.org/D7125
Wed, 30 Oct 2019 00:00:21 -0700 revset: simplify checkstatus() by using any()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 30 Oct 2019 00:00:21 -0700] rev 43592
revset: simplify checkstatus() by using any() Differential Revision: https://phab.mercurial-scm.org/D7179
Wed, 06 Nov 2019 18:28:11 -0800 rebase: check for unfinished ops even when inmemory (issue6214)
Kyle Lippincott <spectral@google.com> [Wed, 06 Nov 2019 18:28:11 -0800] rev 43591
rebase: check for unfinished ops even when inmemory (issue6214) When using rebase.experimental.inmemory, we should be able to work well with a dirty working directory, but we can not reliably work if we're in the middle of another operation (such as another rebase), as we'll potentially stomp on some state that the other operation needs. Differential Revision: https://phab.mercurial-scm.org/D7298
Fri, 18 Oct 2019 23:18:47 -0700 status: move initialization closer together
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 23:18:47 -0700] rev 43590
status: move initialization closer together The default initialization happened long before it needed to happen. Differential Revision: https://phab.mercurial-scm.org/D7145
Sat, 19 Oct 2019 00:15:41 -0700 largefiles: avoid dynamically subclassing context instances
Martin von Zweigbergk <martinvonz@google.com> [Sat, 19 Oct 2019 00:15:41 -0700] rev 43589
largefiles: avoid dynamically subclassing context instances E.g. copies.pathcopies() compares context objects for equality and basectx.__eq__ compares the type. But since largefiles was dynamically creating classes, they would all be unequal. That led pathcopies(), after some changes I made, to not short-circuit to get copy info only from the dirstate. This patch fixes that short-circuiting (and other places where context are being compared for equality). Differential Revision: https://phab.mercurial-scm.org/D7143
Tue, 05 Nov 2019 13:31:40 -0800 relnotes: copy "next" to "5.2" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 13:31:40 -0800] rev 43588
relnotes: copy "next" to "5.2" and clear "next" This is the same thing as we did for 5.1 in cba59b338976 (relnotes: copy "next" to "5.1" and clear "next", 2019-08-01). Differential Revision: https://phab.mercurial-scm.org/D7231
Fri, 08 Nov 2019 10:13:05 -0800 py3: avoid `b'%s' % type(...)` in a ProgrammingError stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Nov 2019 10:13:05 -0800] rev 43587
py3: avoid `b'%s' % type(...)` in a ProgrammingError Differential Revision: https://phab.mercurial-scm.org/D7363
Fri, 18 Oct 2019 22:08:20 -0700 largefiles: delete unused repo.status_nolfiles()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 22:08:20 -0700] rev 43586
largefiles: delete unused repo.status_nolfiles() Differential Revision: https://phab.mercurial-scm.org/D7142
Fri, 18 Oct 2019 21:36:19 -0700 largefiles: use context manager for wlock in repo.status() override
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 21:36:19 -0700] rev 43585
largefiles: use context manager for wlock in repo.status() override Differential Revision: https://phab.mercurial-scm.org/D7141
Fri, 18 Oct 2019 17:52:19 -0700 largefiles: allow "lfstatus" context manager to set value to False
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 17:52:19 -0700] rev 43584
largefiles: allow "lfstatus" context manager to set value to False Differential Revision: https://phab.mercurial-scm.org/D7140
Fri, 18 Oct 2019 17:46:37 -0700 largefiles: move lfstatus context manager to lfutil
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 17:46:37 -0700] rev 43583
largefiles: move lfstatus context manager to lfutil Differential Revision: https://phab.mercurial-scm.org/D7139
Fri, 08 Nov 2019 14:35:53 -0800 revlog: delete references to deleted nullid sentinel value
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Nov 2019 14:35:53 -0800] rev 43582
revlog: delete references to deleted nullid sentinel value We stopped keeping the nullid in the index in 781b2720d2ac (index: don't include nullid in len(), 2018-07-20). I forgot to update some comments about it. Differential Revision: https://phab.mercurial-scm.org/D7366
Sun, 10 Nov 2019 18:15:54 +0100 revlog: remove the, now unused, `revlog._nodepos` attribute
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2019 18:15:54 +0100] rev 43581
revlog: remove the, now unused, `revlog._nodepos` attribute Spotted by Yuya Nishihara.
Sat, 09 Nov 2019 10:31:58 +0100 py3: fix sorting of obsolete markers in obsutil (issue6217) stable
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 10:31:58 +0100] rev 43580
py3: fix sorting of obsolete markers in obsutil (issue6217) This is similar to 01e8eefd9434 and others. We move the sortedmarkers() function from exchange module to obsutil.
Sun, 10 Nov 2019 18:12:50 +0100 nodemap: use bytes for the error message
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 10 Nov 2019 18:12:50 +0100] rev 43579
nodemap: use bytes for the error message Spotted by Yuya Nishihara.
Sat, 09 Nov 2019 16:16:31 +0100 py3: use native strings when forming email headers in patchbomb
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 16:16:31 +0100] rev 43578
py3: use native strings when forming email headers in patchbomb Per previous changesets, encoded header's values are native str. We complete the change in patchbomb extension to have literal header values native str as well. Then we can also change headers' keys to be str. In _msgid(), we still need to use encoding.strfromlocal() because usage of os.environ is not allowed by check-code. This finally removes the "if pycompat.ispy3:" TODO.
Sat, 09 Nov 2019 16:54:33 +0100 mail: convert addr to str early in addrlistencode()
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 16:54:33 +0100] rev 43577
mail: convert addr to str early in addrlistencode()
Sat, 09 Nov 2019 15:16:52 +0100 mail: let addressencode() / addrlistencode() return native strings
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 15:16:52 +0100] rev 43576
mail: let addressencode() / addrlistencode() return native strings Avoids conversion to "str" on py3.
Sat, 09 Nov 2019 12:45:14 +0100 mail: let headencode() return a native string
Denis Laxalde <denis@laxalde.org> [Sat, 09 Nov 2019 12:45:14 +0100] rev 43575
mail: let headencode() return a native string This is to avoid conversion to/from str on py3.
Sat, 09 Nov 2019 13:23:55 +0100 revlog: deprecate direct `nodemap` access
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43574
revlog: deprecate direct `nodemap` access Now that all in-core user have been updated to the new API, we can deprecated direct access to nodemap. Differential Revision: https://phab.mercurial-scm.org/D7362
Sat, 09 Nov 2019 13:23:55 +0100 revlog: drop special hack in the `nodemap` property
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43573
revlog: drop special hack in the `nodemap` property This code does not seems necessary anymore. Differential Revision: https://phab.mercurial-scm.org/D7361
Sat, 09 Nov 2019 13:23:55 +0100 perf: make `perfrevlogindex` use the new `index.rev` api if available
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:55 +0100] rev 43572
perf: make `perfrevlogindex` use the new `index.rev` api if available Differential Revision: https://phab.mercurial-scm.org/D7360
Sat, 09 Nov 2019 13:23:54 +0100 perf: make `perfnodemap` use the new `index.get_rev` api if available
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43571
perf: make `perfnodemap` use the new `index.get_rev` api if available Differential Revision: https://phab.mercurial-scm.org/D7358
Sat, 09 Nov 2019 13:23:54 +0100 index: use `index.get_rev` in `remotefilelog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43570
index: use `index.get_rev` in `remotefilelog` Differential Revision: https://phab.mercurial-scm.org/D7357
Sat, 09 Nov 2019 13:23:54 +0100 index: use `index.get_rev` in `histedit.processreplacement`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43569
index: use `index.get_rev` in `histedit.processreplacement` Differential Revision: https://phab.mercurial-scm.org/D7354
Sat, 09 Nov 2019 13:23:54 +0100 index: use `index.get_rev` in `histedit.adjustreplacementsfrommarkers`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43568
index: use `index.get_rev` in `histedit.adjustreplacementsfrommarkers` Differential Revision: https://phab.mercurial-scm.org/D7353
Sat, 09 Nov 2019 13:23:54 +0100 index: use `index.get_rev` in `rebase._computeobsoletenotrebased`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:54 +0100] rev 43567
index: use `index.get_rev` in `rebase._computeobsoletenotrebased` Differential Revision: https://phab.mercurial-scm.org/D7350
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.get_rev` in `rebase.successorrevs`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43566
index: use `index.get_rev` in `rebase.successorrevs` The code is slightly updated in the process for simplicity. Differential Revision: https://phab.mercurial-scm.org/D7349
Sat, 09 Nov 2019 13:23:52 +0100 index: use `index.get_rev` in `unionrepo.unionrevlog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43565
index: use `index.get_rev` in `unionrepo.unionrevlog` Differential Revision: https://phab.mercurial-scm.org/D7338
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.rev` in `bundlerepo.bundlerevlog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43564
index: use `index.rev` in `bundlerepo.bundlerevlog` Differential Revision: https://phab.mercurial-scm.org/D7340
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.get_rev` in `exchange._pullapplyphases`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43563
index: use `index.get_rev` in `exchange._pullapplyphases` Differential Revision: https://phab.mercurial-scm.org/D7347
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.rev` in `exchange.fallbackheads`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43562
index: use `index.rev` in `exchange.fallbackheads` Differential Revision: https://phab.mercurial-scm.org/D7345
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.get_rev` in `revset._mapbynodefunc`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43561
index: use `index.get_rev` in `revset._mapbynodefunc` We slightly update the code in the process. Differential Revision: https://phab.mercurial-scm.org/D7343
Sat, 09 Nov 2019 13:23:53 +0100 index: use `index.get_rev` in `discovery._postprocessobsolete`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:53 +0100] rev 43560
index: use `index.get_rev` in `discovery._postprocessobsolete` Differential Revision: https://phab.mercurial-scm.org/D7341
Sat, 09 Nov 2019 13:23:52 +0100 index: use `index.get_rev` in `repoview.pinnedrevs`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43559
index: use `index.get_rev` in `repoview.pinnedrevs` We simplify the code in the process Differential Revision: https://phab.mercurial-scm.org/D7337
Sat, 09 Nov 2019 13:23:52 +0100 index: use `index.get_rev` in `obsolete._computephasedivergentset`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43558
index: use `index.get_rev` in `obsolete._computephasedivergentset` Differential Revision: https://phab.mercurial-scm.org/D7336
Sat, 09 Nov 2019 13:23:52 +0100 index: use `index.get_rev` in `obsutil.getobsoleted`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43557
index: use `index.get_rev` in `obsutil.getobsoleted` Differential Revision: https://phab.mercurial-scm.org/D7335
Sat, 09 Nov 2019 13:23:52 +0100 index: use `index.get_rev` in `phases.newheads`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:52 +0100] rev 43556
index: use `index.get_rev` in `phases.newheads` Differential Revision: https://phab.mercurial-scm.org/D7332
Sat, 09 Nov 2019 13:23:51 +0100 index: use `index.get_rev` in `localrepo.known`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43555
index: use `index.get_rev` in `localrepo.known` Differential Revision: https://phab.mercurial-scm.org/D7327
Sat, 09 Nov 2019 13:23:51 +0100 index: add a `get_rev` method (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43554
index: add a `get_rev` method (API) The new `index.getrev(node)` is to be preferred over using: `index.nodemap.get(node)`. This get us closer to be able to remove the `nodemap` attribute of the index. Differential Revision: https://phab.mercurial-scm.org/D7326
Sat, 09 Nov 2019 13:23:51 +0100 index: use `index.rev` in `revlog.rev`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43553
index: use `index.rev` in `revlog.rev` Differential Revision: https://phab.mercurial-scm.org/D7325
Sat, 09 Nov 2019 13:23:51 +0100 index: add a `rev` method (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 13:23:51 +0100] rev 43552
index: add a `rev` method (API) The new `index.rev(node)` is to be preferred over using `node index.nodemap[node]`. This get us closer to be able to remove the `nodemap` attribute of the index. Differential Revision: https://phab.mercurial-scm.org/D7324
Fri, 08 Nov 2019 13:26:55 +0100 perf: make `perfphasesremote` use the new `index.has_node` api
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:26:55 +0100] rev 43551
perf: make `perfphasesremote` use the new `index.has_node` api (If available) Differential Revision: https://phab.mercurial-scm.org/D7359
Fri, 08 Nov 2019 17:08:24 +0100 index: use `index.has_node` in `infinitypush`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 17:08:24 +0100] rev 43550
index: use `index.has_node` in `infinitypush` Differential Revision: https://phab.mercurial-scm.org/D7356
Fri, 08 Nov 2019 13:26:33 +0100 index: use `index.has_node` in `phabricator.getoldnodedrevmap`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:26:33 +0100] rev 43549
index: use `index.has_node` in `phabricator.getoldnodedrevmap` Differential Revision: https://phab.mercurial-scm.org/D7355
Fri, 08 Nov 2019 15:09:09 +0100 index: use `index.has_node` in `histedit.cleanupnode`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 15:09:09 +0100] rev 43548
index: use `index.has_node` in `histedit.cleanupnode` Differential Revision: https://phab.mercurial-scm.org/D7352
Fri, 08 Nov 2019 15:08:27 +0100 index: use `index.has_node` in `histedit._finishhistedit
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 15:08:27 +0100] rev 43547
index: use `index.has_node` in `histedit._finishhistedit Differential Revision: https://phab.mercurial-scm.org/D7351
Fri, 08 Nov 2019 13:25:25 +0100 index: use `index.has_node` in `exchangev2._pullchangesetdiscovery`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:25:25 +0100] rev 43546
index: use `index.has_node` in `exchangev2._pullchangesetdiscovery` Differential Revision: https://phab.mercurial-scm.org/D7348
Fri, 08 Nov 2019 16:00:47 +0100 index: use `index.has_node` in `exchange._pulldiscoverychangegroup`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 16:00:47 +0100] rev 43545
index: use `index.has_node` in `exchange._pulldiscoverychangegroup` Differential Revision: https://phab.mercurial-scm.org/D7346
Fri, 08 Nov 2019 13:36:02 +0100 index: use `index.has_node` in `bookmarks.bmstore`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:36:02 +0100] rev 43544
index: use `index.has_node` in `bookmarks.bmstore` Differential Revision: https://phab.mercurial-scm.org/D7344
Fri, 08 Nov 2019 11:44:23 +0100 index: use `index.has_node` in `tags.findglobaltags`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 11:44:23 +0100] rev 43543
index: use `index.has_node` in `tags.findglobaltags` Differential Revision: https://phab.mercurial-scm.org/D7342
Fri, 08 Nov 2019 13:24:54 +0100 index: use `index.has_node` in `bundlerepo.bundlerevlog`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 13:24:54 +0100] rev 43542
index: use `index.has_node` in `bundlerepo.bundlerevlog` Differential Revision: https://phab.mercurial-scm.org/D7339
Fri, 08 Nov 2019 14:20:48 +0100 index: use `index.has_node` in `obsutil.foreground`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:20:48 +0100] rev 43541
index: use `index.has_node` in `obsutil.foreground` Differential Revision: https://phab.mercurial-scm.org/D7334
Fri, 08 Nov 2019 14:19:53 +0100 index: use `index.has_node` in `obsutil.exclusivemarkers`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:19:53 +0100] rev 43540
index: use `index.has_node` in `obsutil.exclusivemarkers` Differential Revision: https://phab.mercurial-scm.org/D7333
Fri, 08 Nov 2019 14:17:03 +0100 index: use `index.has_node` in `phases.filterunknown`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:17:03 +0100] rev 43539
index: use `index.has_node` in `phases.filterunknown` Differential Revision: https://phab.mercurial-scm.org/D7331
Fri, 08 Nov 2019 14:16:24 +0100 index: use `index.has_node` in `analyzeremotephases`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:16:24 +0100] rev 43538
index: use `index.has_node` in `analyzeremotephases` Differential Revision: https://phab.mercurial-scm.org/D7330
Fri, 08 Nov 2019 14:00:22 +0100 index: use `index.has_node` in `repo._rollback`
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 14:00:22 +0100] rev 43537
index: use `index.has_node` in `repo._rollback` Differential Revision: https://phab.mercurial-scm.org/D7329
Sun, 03 Nov 2019 00:49:55 +0100 index: use `index.has_node` in `revlog.addgroup`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:49:55 +0100] rev 43536
index: use `index.has_node` in `revlog.addgroup` Differential Revision: https://phab.mercurial-scm.org/D7328
Sun, 03 Nov 2019 00:05:20 +0100 index: use `index.has_node` in `revlog.addrevision`
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:05:20 +0100] rev 43535
index: use `index.has_node` in `revlog.addrevision` Differential Revision: https://phab.mercurial-scm.org/D7323
Sun, 03 Nov 2019 00:01:09 +0100 index: add a `has_node` method (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:01:09 +0100] rev 43534
index: add a `has_node` method (API) The new `index.has_node(node)` is to be preferred over: `node in index.nodemap`. This get us closer to be able to remove the `nodemap` attribute of the index. Differential Revision: https://phab.mercurial-scm.org/D7322
Sat, 09 Nov 2019 05:54:22 +0100 revlog: deal with nodemap deletion within the index
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 09 Nov 2019 05:54:22 +0100] rev 43533
revlog: deal with nodemap deletion within the index Since the nodemap data now live in the index, it should be the index responsibility to ensure the data are up to date. The C version of the index is already dealing with such deletion. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7321
Fri, 08 Nov 2019 10:01:10 +0100 revlog: clean up the node of all revision stripped in the C code
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 08 Nov 2019 10:01:10 +0100] rev 43532
revlog: clean up the node of all revision stripped in the C code For some obscure reason, the loop cleaning up node was skipping the first element… I cannot see a reason for it. The overall code is running fine nevertheless because the node are also explicitly deleted from python. We want to delete this explicit deletion, so we need to fix that code first. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7320
Sun, 03 Nov 2019 00:15:12 +0100 revlog: move nodemap update within the index code
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 03 Nov 2019 00:15:12 +0100] rev 43531
revlog: move nodemap update within the index code Since the nodemap data now live in the index, it should be the index responsibility to ensure the data are up to date. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7319
Sat, 02 Nov 2019 15:46:47 +0100 revlog: deprecate the _nodecache attribute (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:46:47 +0100] rev 43530
revlog: deprecate the _nodecache attribute (API) This attribute have been the same object for a long time. Code should directly access the nodemap in case of need. (Or the final API when this will be done). This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7318
Sat, 02 Nov 2019 15:25:31 +0100 revlog: access the nodemap through the index
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:25:31 +0100] rev 43529
revlog: access the nodemap through the index The `revlog.rev` method now access the nodemap through `self.index.nodemap`, instead of using the `_nodecache` attribute that we are trying to remove. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7317
Sat, 02 Nov 2019 15:21:28 +0100 revlog: return the nodemap as the nodecache
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 15:21:28 +0100] rev 43528
revlog: return the nodemap as the nodecache Ultimately, the nodecache is the nodemap. To stop having this disctinction, we start using the nodemap where the nodecache was used. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7316
Sat, 02 Nov 2019 14:45:57 +0100 revlog: clarify which version use the older API in perf
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 02 Nov 2019 14:45:57 +0100] rev 43527
revlog: clarify which version use the older API in perf This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7315
Wed, 06 Nov 2019 14:13:19 +0100 revlog: no longer return the nodemap after parsing
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43526
revlog: no longer return the nodemap after parsing Now that both pure and cext version have a `nodemap` attribute, we do not need to return the `nodemap` object after parsing. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7314
Wed, 06 Nov 2019 14:13:19 +0100 revlog: move the nodemap into the index object (for pure)
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43525
revlog: move the nodemap into the index object (for pure) This make the pure code closer to the C extension one. The ultimate goal is to merge the two into a single object and offer a unified API. This changeset focus on gathering the data on the same object. For now the code for `revlogoldindex` and `BaseIndexObject` index object are quite similar. However, there will be larger divergence later on, so I don't think is worth doing a base case. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7313
Wed, 06 Nov 2019 14:13:19 +0100 revlog: introduce an explicit NodeMap class for pure code
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43524
revlog: introduce an explicit NodeMap class for pure code This class make the "pure" nodemap raise the same exception than the C-extension one. This is a step toward unifying nodemap and index, the class is not meant to survive on the long run. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. There is a new `isinstance` call, it will be cleaned up in coming changesets. Differential Revision: https://phab.mercurial-scm.org/D7312
Wed, 06 Nov 2019 14:13:19 +0100 utils: move the `dirs` definition in pathutil (API)
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 06 Nov 2019 14:13:19 +0100] rev 43523
utils: move the `dirs` definition in pathutil (API) Before this change, the `dirs` class was accessible through the `mercurial.util` module. That module is expected to stay free of scm specific content. The `pathutil` destination has been selection by Martin von Zweigbergk. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7311
Wed, 23 Oct 2019 12:15:42 -0700 packaging: stop installing i18n files
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 12:15:42 -0700] rev 43522
packaging: stop installing i18n files The WiX installer has been shipping the content of the i18n/ directory since it was introduced in 2010 in 1e022c88a0a5. And the installer was subsequently refactored to only ship the .po files and hggettext. The .po files and the hggettext script are only used at build time to produce .mo files, which Mercurial does use at run-time. It doesn't make sense to install these files on Windows. So this commit stops doing that. This change further converges the file layout of the Inno and WiX installers. Differential Revision: https://phab.mercurial-scm.org/D7165
Wed, 23 Oct 2019 11:54:22 -0700 packaging: install hgk as hgk.tcl
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 11:54:22 -0700] rev 43521
packaging: install hgk as hgk.tcl Giving it a file extension will give Windows a better chance at being able to execute it via standard means. This also makes WiX consistent with the Inno installer. Differential Revision: https://phab.mercurial-scm.org/D7164
Wed, 23 Oct 2019 12:01:31 -0700 packaging: add logo-droplets.svg
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 12:01:31 -0700] rev 43520
packaging: add logo-droplets.svg The WiX installer adds this file. Let's add it to the Inno installer for consistency. Differential Revision: https://phab.mercurial-scm.org/D7163
Wed, 23 Oct 2019 11:40:59 -0700 packaging: install documentation to doc/ directory
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 11:40:59 -0700] rev 43519
packaging: install documentation to doc/ directory The source directory is "doc" and "doc" is used by the WiX installer. I think it makes sense to converge on the canonical path name. While we're here, we also lower the case because we can. (I think lower case names make more sense plus it is more consistent.) This only affects the Inno installer at the moment because it is the only installer using the staging code. Differential Revision: https://phab.mercurial-scm.org/D7162
Tue, 22 Oct 2019 18:34:03 -0700 packaging: always pass VERSION into Inno invocation
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 22 Oct 2019 18:34:03 -0700] rev 43518
packaging: always pass VERSION into Inno invocation The code in the Inno file was a holdover from before we had Python driving execution. With Python in the driver's seat, we can now have it resolve the version string and pass it into Inno, making the code easier to understand for people who aren't packaging gurus. Differential Revision: https://phab.mercurial-scm.org/D7161
Thu, 24 Oct 2019 21:22:08 -0700 packaging: remove hg.exe.local file
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 24 Oct 2019 21:22:08 -0700] rev 43517
packaging: remove hg.exe.local file <exe>.local files are used by Windows to set up DLL redirection. But these files are ignored if you embed an application manifest in your binary, which we do. So the existence of this file serves no purpose. So we remove it. Differential Revision: https://phab.mercurial-scm.org/D7160
Wed, 23 Oct 2019 18:39:28 -0700 packaging: stage installed files for Inno
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:28 -0700] rev 43516
packaging: stage installed files for Inno Previously, the Inno installer maintained its own mapping of source files to install location. (We have to maintain a similar mapping in the WiX installer.) Managing the explicit file layout for Windows packages is cumbersome and redundant. Every time you want to change the layout you need to change N locations. We frequently forget to do this and we only find out when people install Mercurial from our packages at release time. This commit starts the process of consolidating and simplifying the logic for managing the install layout on Windows. We introduce a list of install layout rules. These are simply source filenames (which can contain wildcards) and destination paths. The Inno packaging code has been updated to assemble all files into a staging directory that mirrors the final install layout. The list of files to add to the installer is derived by walking this staging directory and dynamically emitting the proper entries for the Inno Setup script. I diffed the file layout before and after this commit and there is no difference. Another benefit of this change is that it facilitates easier testing of the Windows install layout. Before, in order to test the final install layout, you needed to build an installer and run it. Now, you can stage files into the final layout and test from there, without running the installer. This should cut down on overhead when changing Windows code. Differential Revision: https://phab.mercurial-scm.org/D7159
Wed, 23 Oct 2019 18:39:17 -0700 packaging: process Inno Setup files with Jinja2
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:17 -0700] rev 43515
packaging: process Inno Setup files with Jinja2 I want to make the Inno Setup files dynamically generated. This will enable us to do things like automatically derive the set of files to be packaged instead of having to manually keep lists of files in sync across installers. As the first step towards this, we process the Inno Setup files with Jinja2. As part of this conversion, we had to escape syntax in mercurial.iss that conflicts with Jinja2. I also took the opportunity to include modpath.iss via Jinja2 instead of using Inno's preprocessor. This keeps the Python code a bit simpler. Differential Revision: https://phab.mercurial-scm.org/D7158
Wed, 23 Oct 2019 18:39:08 -0700 packaging: install and run Inno files in a build directory
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:39:08 -0700] rev 43514
packaging: install and run Inno files in a build directory Upcoming commits will refactor the Windows installers so their content is dynamically derived. In preparation for this, we copy the Inno files into a new build directory and run them from there. This required changing some relative paths to work from a new directory level but is otherwise a pretty straightforward change. Differential Revision: https://phab.mercurial-scm.org/D7157
Wed, 23 Oct 2019 18:37:36 -0700 packaging: consolidate CLI functionality into packaging.py
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:37:36 -0700] rev 43513
packaging: consolidate CLI functionality into packaging.py Consolidating functionality for invoking code in the hgpackaging package through a single CLI entry point will make things simpler when we add more complexity to that package. For example, it will allow us to run things out of a virtualenv with third party packages. This commit consolidates functionality from the Inno and WiX build.py scripts into a new packaging.py script. That script simply creates a virtualenv and runs the CLI functionality in it. The new virtualenv is populated with jinja2 because I felt it easier to incorporate requirements file processing in this commit and we will soon use jinja2 in an upcoming commit. The unified CLI functionality will also make it easier to script other packaging workflows going forward. e.g. RPM, Debian, and macOS packaging. Differential Revision: https://phab.mercurial-scm.org/D7156
Wed, 23 Oct 2019 18:30:22 -0700 packaging: clean up excess packages for Inno
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 23 Oct 2019 18:30:22 -0700] rev 43512
packaging: clean up excess packages for Inno This partially reverts e97ffa5511ba. A bunch of package dependencies were getting picked up because I ran pip-compile on Linux and the keyring package has some Linux-only dependencies. I have run pip-compile again - this time from Windows - to undo the addition of these dependencies. I also normalized whitespace to LF. Differential Revision: https://phab.mercurial-scm.org/D7155
Fri, 08 Nov 2019 14:21:52 -0800 unshelve: correct help string; unshelve does not accept file list
Kyle Lippincott <spectral@google.com> [Fri, 08 Nov 2019 14:21:52 -0800] rev 43511
unshelve: correct help string; unshelve does not accept file list The non-option arguments to `hg unshelve` are interpreted as the name of the shelve to unshelve, not the list of files to unshelve. While that functionality would probably be nice to have, that's well beyond the scope of this documentation fix. Differential Revision: https://phab.mercurial-scm.org/D7365
Fri, 08 Nov 2019 11:23:22 -0800 repoview: use class literal for creating filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Nov 2019 11:23:22 -0800] rev 43510
repoview: use class literal for creating filteredchangelog The type name is constant, so we don't need to create it dynamically using type(). As suggested by Yuya. Differential Revision: https://phab.mercurial-scm.org/D7364
Thu, 07 Nov 2019 14:59:11 -0500 vagrant: update vagrant image to buster from jessie
Augie Fackler <augie@google.com> [Thu, 07 Nov 2019 14:59:11 -0500] rev 43509
vagrant: update vagrant image to buster from jessie I honestly have no idea if this works since I don't use vagrant, but looking around online suggests it should work fine. Differential Revision: https://phab.mercurial-scm.org/D7309
Thu, 07 Nov 2019 14:56:30 -0500 packaging: remove references to debian jessie
Augie Fackler <augie@google.com> [Thu, 07 Nov 2019 14:56:30 -0500] rev 43508
packaging: remove references to debian jessie Jessie is on life support at this point, so let's update the list of releases in the Makefiles. Differential Revision: https://phab.mercurial-scm.org/D7308
Thu, 07 Nov 2019 14:39:02 -0500 sqlitestore: remove superfluous r-prefixes on strings
Augie Fackler <augie@google.com> [Thu, 07 Nov 2019 14:39:02 -0500] rev 43507
sqlitestore: remove superfluous r-prefixes on strings I did this file separately because it's a _ton_ of hits and it had some manual reformatting fallout as a result of black squeezing some expressions onto a single line. Differential Revision: https://phab.mercurial-scm.org/D7307
Fri, 08 Nov 2019 11:19:20 -0800 cleanup: remove pointless r-prefixes on single-quoted strings
Augie Fackler <augie@google.com> [Fri, 08 Nov 2019 11:19:20 -0800] rev 43506
cleanup: remove pointless r-prefixes on single-quoted strings This is the promised second step on single-quoted strings. These had existed because our source transformer didn't turn r'' into b'', so we had tagged some strings as r-strings to get "native" strings on both Pythons. Now that the transformer is gone, we can dispense with this nonsense. Methodology: I ran hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$' | xargs egrep --color=never -n -- \[\^b\]\[\^a-z\]r\'\[\^\'\\\\\]\*\'\[\^\'\ in an emacs grep-mode buffer, and then used a keyboard macro to iterate over the results and remove the r prefix as needed. # skip-blame removing unneeded r prefixes left over from Python 3 migration. Differential Revision: https://phab.mercurial-scm.org/D7306
Sun, 10 Nov 2019 07:30:14 -0800 rust-threads: force Rayon to respect the worker count in config
Raphaël Gomès <rgomes@octobus.net> [Sun, 10 Nov 2019 07:30:14 -0800] rev 43505
rust-threads: force Rayon to respect the worker count in config As per the inline comment, this is a workaround because Rust code does not yet know how to read config files. Differential Revision: https://phab.mercurial-scm.org/D7310
Fri, 18 Oct 2019 07:20:26 +0100 phabricator: use context manager form of progress in uploadchunks
Ian Moody <moz-ian@perix.co.uk> [Fri, 18 Oct 2019 07:20:26 +0100] rev 43504
phabricator: use context manager form of progress in uploadchunks Follow-up to 453079605242 / D7046. Differential Revision: https://phab.mercurial-scm.org/D7134
Thu, 07 Nov 2019 13:18:19 -0500 cleanup: remove pointless r-prefixes on double-quoted strings
Augie Fackler <augie@google.com> [Thu, 07 Nov 2019 13:18:19 -0500] rev 43503
cleanup: remove pointless r-prefixes on double-quoted strings This is only double-quoted strings. I'll do single-quoted strings as a second step. These had existed because our source transformer didn't turn r"" into b"", so we had tagged some strings as r-strings to get "native" strings on both Pythons. Now that the transformer is gone, we can dispense with this nonsense. Methodology: I ran hg locate 'set:added() or modified() or clean()' | egrep '.*\.py$' | xargs egrep --color=never -n -- \[\^a-z\]r\"\[\^\"\\\\\]\*\"\[\^\"\] in an emacs grep-mode buffer, and then used a keyboard macro to iterate over the results and remove the r prefix as needed. # skip-blame removing unneeded r prefixes left over from Python 3 migration. Differential Revision: https://phab.mercurial-scm.org/D7305
Thu, 07 Nov 2019 03:59:22 -0800 formatting: remove another data-ogre from the config example
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Nov 2019 03:59:22 -0800] rev 43502
formatting: remove another data-ogre from the config example The fix extension will pass the contents on stdin and read the output from stdout. By invoking `rustfmt` as `rustfmt {rootpath}`, we tell rustfmt to format the given path and update it on disk. That also makes rustftm not produce the formatted output to stdout. So the fix extension ends up writing out empty files. Differential Revision: https://phab.mercurial-scm.org/D7304
Thu, 07 Nov 2019 03:46:48 -0800 fix: replace str() by b'%d' for formatting integer
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Nov 2019 03:46:48 -0800] rev 43501
fix: replace str() by b'%d' for formatting integer Differential Revision: https://phab.mercurial-scm.org/D7303
Thu, 08 Jan 2009 02:03:00 +0000 zeroconf: improve the extension's documentation
Vernon Tang <vt@foilhead.net> [Thu, 08 Jan 2009 02:03:00 +0000] rev 43500
zeroconf: improve the extension's documentation Differential Revision: https://phab.mercurial-scm.org/D7302
Wed, 06 Nov 2019 16:30:14 -0500 branchmap: pytype is confused about bytestr
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 16:30:14 -0500] rev 43499
branchmap: pytype is confused about bytestr Differential Revision: https://phab.mercurial-scm.org/D7290
Wed, 06 Nov 2019 15:34:40 -0500 mail: suppress a pytype error that's just experimentally wrong
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:34:40 -0500] rev 43498
mail: suppress a pytype error that's just experimentally wrong It's probably more correct to pass a str here, but I'm not going to worry about it for now. Differential Revision: https://phab.mercurial-scm.org/D7283
Wed, 06 Nov 2019 15:12:13 -0500 dagparser: suppress some pytype errors around pycompat.bytestring
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:12:13 -0500] rev 43497
dagparser: suppress some pytype errors around pycompat.bytestring I can't justify why we're getting these errors, but nothing I do fixes these handful of calls, so let's just move on with suppressions. Differential Revision: https://phab.mercurial-scm.org/D7277
Wed, 06 Nov 2019 14:48:34 -0500 encoding: add comment-based type hints for pytype
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:48:34 -0500] rev 43496
encoding: add comment-based type hints for pytype Differential Revision: https://phab.mercurial-scm.org/D7275
Fri, 08 Nov 2019 23:26:50 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Nov 2019 23:26:50 +0900] rev 43495
merge with stable
Thu, 17 Oct 2019 19:29:22 -0400 dirs: reject consecutive slashes in paths
Augie Fackler <augie@google.com> [Thu, 17 Oct 2019 19:29:22 -0400] rev 43494
dirs: reject consecutive slashes in paths We shouldn't ever see those, and the fuzzer go really excited that if it gives us a 65k string with 55k slashes in it we use a lot of RAM. This is a better fix than what I tried in D7105. It was suggested by Yuya, and I verified it does in fact cause the fuzzer to not OOM. This is a revision of D7234, but with the missing set of an error added. I added a unit test of the dirs behavior because I needed to reason more carefully about the failure modes around consecutive slashes. Differential Revision: https://phab.mercurial-scm.org/D7252
Tue, 05 Nov 2019 22:56:12 -0500 tests: quote $PYTHON in test-byteify-strings.t
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2019 22:56:12 -0500] rev 43493
tests: quote $PYTHON in test-byteify-strings.t This is needed because the default install location is "Program Files" on Windows. Differential Revision: https://phab.mercurial-scm.org/D7251
Wed, 06 Nov 2019 00:35:41 -0800 repoview: define filteredchangelog as a top-level (non-local) class
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Nov 2019 00:35:41 -0800] rev 43492
repoview: define filteredchangelog as a top-level (non-local) class As suggested by Greg. This makes it easier for extensions to override the filtering. Differential Revision: https://phab.mercurial-scm.org/D7256
Wed, 06 Nov 2019 17:35:24 -0500 cmdutil: suppress bogus pytype errors
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:35:24 -0500] rev 43491
cmdutil: suppress bogus pytype errors pytype seems to handle our subclass of tuple (scmutil.status) especially poorly. We should probably file a bug. Differential Revision: https://phab.mercurial-scm.org/D7294
Wed, 06 Nov 2019 17:25:43 -0500 changegroup: suppress pytype error that's wrong
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:25:43 -0500] rev 43490
changegroup: suppress pytype error that's wrong Differential Revision: https://phab.mercurial-scm.org/D7293
Wed, 06 Nov 2019 17:23:47 -0500 changegroup: avoid shadowing a set with an int
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:23:47 -0500] rev 43489
changegroup: avoid shadowing a set with an int This confuses the heck out of pytype, and I basically agree with it that this shadowing is confusing. There's a chance this causes some memory to be freed later, but I think it's probably not worth worrying about for now. Differential Revision: https://phab.mercurial-scm.org/D7292
Wed, 06 Nov 2019 17:19:33 -0500 bundle2: more pytype suppressions around bytestring
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:19:33 -0500] rev 43488
bundle2: more pytype suppressions around bytestring We clearly need to work around this somehow. Differential Revision: https://phab.mercurial-scm.org/D7291
Wed, 06 Nov 2019 16:26:53 -0500 archival: suppress some incorrect pytype failures
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 16:26:53 -0500] rev 43487
archival: suppress some incorrect pytype failures Again, I suspect some missing coverage in type stubs for the stdlib. I'll revisit these later. Differential Revision: https://phab.mercurial-scm.org/D7288
Wed, 06 Nov 2019 15:42:30 -0500 simplemerge: disable a pytype error where it's just confused
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:42:30 -0500] rev 43486
simplemerge: disable a pytype error where it's just confused Differential Revision: https://phab.mercurial-scm.org/D7287
Wed, 06 Nov 2019 15:42:12 -0500 match: suppress error about subscripting an exception
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:42:12 -0500] rev 43485
match: suppress error about subscripting an exception I get the sense I should file a bug about subscripting Exception subclasses. Differential Revision: https://phab.mercurial-scm.org/D7286
Wed, 06 Nov 2019 15:35:44 -0500 vfs: more attribute suppressions
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:35:44 -0500] rev 43484
vfs: more attribute suppressions Differential Revision: https://phab.mercurial-scm.org/D7285
Wed, 06 Nov 2019 15:35:21 -0500 mdiff: mark diffopts as having dynamic attributes
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:35:21 -0500] rev 43483
mdiff: mark diffopts as having dynamic attributes This class looks like we could move it to being an attrs and life would be better, but let's do that later. Differential Revision: https://phab.mercurial-scm.org/D7284
Wed, 06 Nov 2019 15:29:08 -0500 vfs: suppress some pytype errors around us using a private attribute
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:29:08 -0500] rev 43482
vfs: suppress some pytype errors around us using a private attribute Looking at threading._MainThread seems like we're probably a little unsupported, but since this code appears to work on both Python 2 and 3 I'm not going to sweat this for now. Differential Revision: https://phab.mercurial-scm.org/D7282
Wed, 06 Nov 2019 15:24:44 -0500 wireprototypes: disable pytype where it's just confused
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:24:44 -0500] rev 43481
wireprototypes: disable pytype where it's just confused By inspection validnames is always a Set[bytes] here, but for some reason pytype is convinced it's a bytes. Let's disable the error for now. Differential Revision: https://phab.mercurial-scm.org/D7281
Wed, 06 Nov 2019 15:16:04 -0500 scmposix: another suppression on IOError subscripting
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:16:04 -0500] rev 43480
scmposix: another suppression on IOError subscripting As before, this will clear up when we move to Python 3-only. Differential Revision: https://phab.mercurial-scm.org/D7280
Wed, 06 Nov 2019 15:15:42 -0500 pvec: add an explicit type hint to help pytype
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:15:42 -0500] rev 43479
pvec: add an explicit type hint to help pytype Differential Revision: https://phab.mercurial-scm.org/D7279
Wed, 06 Nov 2019 15:12:46 -0500 procutil: suppress pytype warnings around windows-only attributes
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:12:46 -0500] rev 43478
procutil: suppress pytype warnings around windows-only attributes Differential Revision: https://phab.mercurial-scm.org/D7278
Wed, 06 Nov 2019 15:03:02 -0500 posix: add a pytype suppression
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:03:02 -0500] rev 43477
posix: add a pytype suppression This one seems a little sketchier than the others, but this will clean up when we're Python 3-only. Differential Revision: https://phab.mercurial-scm.org/D7276
Wed, 06 Nov 2019 14:48:22 -0500 color: suppress pytype warning on a windows-only module
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:48:22 -0500] rev 43476
color: suppress pytype warning on a windows-only module Differential Revision: https://phab.mercurial-scm.org/D7274
Wed, 06 Nov 2019 14:20:27 -0500 compression: tell pytype to not sweat a missing `zstd` module
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:20:27 -0500] rev 43475
compression: tell pytype to not sweat a missing `zstd` module Differential Revision: https://phab.mercurial-scm.org/D7273
Wed, 06 Nov 2019 17:46:26 -0500 pytype: don't warn us about ignored-on-py3 metaclasses
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:46:26 -0500] rev 43474
pytype: don't warn us about ignored-on-py3 metaclasses We can remove this when we're Python 3-only, but for now it's just too awkward to deal with and it's harmless. Differential Revision: https://phab.mercurial-scm.org/D7272
Wed, 06 Nov 2019 14:12:53 -0500 linelog: be more careful about types before looking for _target attribute
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:12:53 -0500] rev 43473
linelog: be more careful about types before looking for _target attribute Without this, pytype (correctly) complains that fakejge might not have a _cmprev attribute. We're operating on some constraints not expressible in the type system, so we detect the invalid case and raise a nicer exception now. Sadly, we also need an `assert` to give PyType a clue that we know what we're doing, but I can absolutely live with that. Differential Revision: https://phab.mercurial-scm.org/D7271
Wed, 06 Nov 2019 14:11:29 -0500 linelog: suppress annoying pytype warning about an ignored metaclass
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:11:29 -0500] rev 43472
linelog: suppress annoying pytype warning about an ignored metaclass This isn't actively hurting us right now, and it's not trivial to set up this metaclass correctly on both Python 2 and Python 3 without dragging in all of `six`, but we still get lots of typechecking goodness with this error suppressed. Differential Revision: https://phab.mercurial-scm.org/D7270
Wed, 06 Nov 2019 14:10:09 -0500 hgignore: ignore generated pytype stubs
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:10:09 -0500] rev 43471
hgignore: ignore generated pytype stubs Differential Revision: https://phab.mercurial-scm.org/D7269
Wed, 06 Nov 2019 14:09:36 -0500 hghave: add a check for pytype, Google's Python type checker
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:09:36 -0500] rev 43470
hghave: add a check for pytype, Google's Python type checker I'm not unbiased, but I strongly prefer pytype to mypy: it does more inference, so we don't need as many annontations. In theory we can use both, but since I'm doing some tinkering with pytype I figured I'd just try setting it up. Differential Revision: https://phab.mercurial-scm.org/D7268
Wed, 06 Nov 2019 15:13:23 -0500 encoding: define local identify functions with explicit type comments
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:13:23 -0500] rev 43469
encoding: define local identify functions with explicit type comments This removes some obfuscation as far as pytype is concerned and corrects many bogus type errors. Differential Revision: https://phab.mercurial-scm.org/D7267
Wed, 06 Nov 2019 15:19:23 -0500 vfs: add NotImplementedError version of join
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:19:23 -0500] rev 43468
vfs: add NotImplementedError version of join Again, this helps out pytype. Differential Revision: https://phab.mercurial-scm.org/D7266
Wed, 06 Nov 2019 15:11:30 -0500 vfs: add a NotImplementedError implementation of __call__
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:11:30 -0500] rev 43467
vfs: add a NotImplementedError implementation of __call__ This helps pytype considerably on this file. Differential Revision: https://phab.mercurial-scm.org/D7265
Wed, 06 Nov 2019 15:19:56 -0500 vfs: fix erroneous bytes constants
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:19:56 -0500] rev 43466
vfs: fix erroneous bytes constants Detected with pytype. Differential Revision: https://phab.mercurial-scm.org/D7264
Wed, 06 Nov 2019 15:17:38 -0500 pvec: migrate to modern integer division
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:17:38 -0500] rev 43465
pvec: migrate to modern integer division Detected with pytype. Differential Revision: https://phab.mercurial-scm.org/D7263
Wed, 06 Nov 2019 17:46:12 -0500 templateutil: fix a missing ABCMeta assignment
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 17:46:12 -0500] rev 43464
templateutil: fix a missing ABCMeta assignment Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7262
Wed, 06 Nov 2019 15:15:00 -0500 pvec: fix overlooked chr() call
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:15:00 -0500] rev 43463
pvec: fix overlooked chr() call Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7261
Wed, 06 Nov 2019 15:29:28 -0500 vfs: another bytes-str confusion on thread name
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 15:29:28 -0500] rev 43462
vfs: another bytes-str confusion on thread name Differential Revision: https://phab.mercurial-scm.org/D7260
Wed, 06 Nov 2019 14:19:05 -0500 statprof: correctly always pass a str as the thread name
Augie Fackler <augie@google.com> [Wed, 06 Nov 2019 14:19:05 -0500] rev 43461
statprof: correctly always pass a str as the thread name Caught by pytype. Differential Revision: https://phab.mercurial-scm.org/D7259
Wed, 06 Nov 2019 16:54:34 +0100 py3: fix handling of ctrl keys in crecord (issue6213) stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Nov 2019 16:54:34 +0100] rev 43460
py3: fix handling of ctrl keys in crecord (issue6213) The "keypressed" value in handlekeypressed() is a key name obtained by curses's getkey(); this can be a multibyte string for special keys like CTRL keys. Calling curses.unctrl() with such a value fails on Python 3 with a TypeError as described in issue6213. (On Python 2, this does not crash, but I'm not sure the result is correct, though it does no matter here.) So instead of calling unctrl(), we compare "keypressed" with the expected "^L" obtained by curses.ascii.ctrl("L").
Wed, 06 Nov 2019 16:53:01 +0100 py3: keep "keypressed" a native str in crecord stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Nov 2019 16:53:01 +0100] rev 43459
py3: keep "keypressed" a native str in crecord This will help in the next changeset by avoiding a decode step. Also, the actual bytes conversion seems superfluous since values coming from curses's getkey() will be a native string. As a consequence, we open the "testcommands" file (used in test-interactive-curses.t) in text mode.
Wed, 06 Nov 2019 17:12:13 +0100 py3: compare response of crecord's confirmationwindow with str stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 06 Nov 2019 17:12:13 +0100] rev 43458
py3: compare response of crecord's confirmationwindow with str confirmationwindow() returns a native string, as a result of calling chr() on getch(). On Python 3, response.lower().startswith(b"y") leads to a TypeError. This fixes a crash when typing "r" in the curses interface of interactive commit.
Thu, 07 Nov 2019 08:58:26 +0100 py3: compare http server's command with a native string stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 07 Nov 2019 08:58:26 +0100] rev 43457
py3: compare http server's command with a native string The "command" attribute is an str, so comparing with a bytes would not work on Python 3. This might solve issues in test-lfs-serve-access.t that happens sometimes (especially in CI): --- /hgwork/src/tests/test-lfs-serve-access.t +++ /hgwork/src/tests/test-lfs-serve-access.t.err @@ -163,11 +163,13 @@ $ cat $TESTTMP/access.log $TESTTMP/errors.log $LOCALIP - - [$LOGDATE$] "POST /missing/objects/batch HTTP/1.1" 404 - (glob) + $LOCALIP - - [05/Nov/2019 16:32:34] "{"objects": [{"oid": "f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e", "size": 20}], "operation": "download"}" HTTPStatus.BAD_REQUEST - $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=capabilities HTTP/1.1" 200 - (glob) $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Aphases%253Dheads%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=525251863cad618e55d483555f3d00a2ca99597e&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull (glob) $LOCALIP - - [$LOGDATE$] "POST /subdir/mount/point/.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) $LOCALIP - - [$LOGDATE$] "GET /subdir/mount/point/.hg/lfs/objects/f03217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e HTTP/1.1" 200 - (glob) + $LOCALIP - - [05/Nov/2019 16:32:34] code 400, message Bad request version ('"download"}') Blobs that already exist in the usercache are linked into the repo store, even though the client doesn't send the blob. @@ -195,6 +197,7 @@ server2/.hg/store/lfs/objects/f0/3217a32529a28a42d03b1244fe09b6e0f9fd06d7b966d4d50567be2abe6c0e $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS $ cat $TESTTMP/errors.log + $LOCALIP - - [05/Nov/2019 16:32:34] code 400, message Bad request version ('"download"}') $ cat >> $TESTTMP/lfsstoreerror.py <<EOF > import errno (from https://ci.hg.gregoryszorc.com/job-info/hg-committed-ca3dca416f8d5863ca6f5a4a6a6bb835dcd5feeb-debian10-cpython-3.7-0)
Wed, 06 Nov 2019 13:46:16 +0100 rust-status: remove dead code
Raphaël Gomès <rgomes@octobus.net> [Wed, 06 Nov 2019 13:46:16 +0100] rev 43456
rust-status: remove dead code The `walk_explicit` function is only called when using a prefix matcher, which the Rust code does not yet support. This function will return in a future patch, probably with a different signature for performance reasons. With it, the `files` argument and its interface code can be removed for now. Differential Revision: https://phab.mercurial-scm.org/D7253
Tue, 05 Nov 2019 18:32:00 -0500 hghave: disallow symlinks on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2019 18:32:00 -0500] rev 43455
hghave: disallow symlinks on Windows Symlinks on Windows require either a special priviledge, or enabling Developer Mode. It's probably the latter that is enabled on the new CI machine. But since Mercurial itself is saying no to symlinks on Windows, the tests for symlinks shouldn't be attempted. This should fix a lot of the noise in the py3 tests. Differential Revision: https://phab.mercurial-scm.org/D7233
Tue, 05 Nov 2019 15:00:44 -0800 repoview: avoid wrapping changelog if there's nothing to filter
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 15:00:44 -0800] rev 43454
repoview: avoid wrapping changelog if there's nothing to filter This simplifies the code a bit by moving the optimizaton for no filtered revisions to one place. I assume it also makes working with repos without obsmarkers a little faster, but it doesn't seem significant. Differential Revision: https://phab.mercurial-scm.org/D7248
Tue, 05 Nov 2019 14:33:02 -0800 repoview: move changelog.flags() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:33:02 -0800] rev 43453
repoview: move changelog.flags() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7247
Tue, 05 Nov 2019 14:31:50 -0800 repoview: move changelog.parentrevs() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:31:50 -0800] rev 43452
repoview: move changelog.parentrevs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7246
Tue, 05 Nov 2019 14:23:32 -0800 repoview: move changelog.linkrev() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:23:32 -0800] rev 43451
repoview: move changelog.linkrev() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7245
Tue, 05 Nov 2019 14:22:25 -0800 repoview: move changelog.node() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:22:25 -0800] rev 43450
repoview: move changelog.node() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7244
Tue, 05 Nov 2019 14:21:47 -0800 repoview: move changelog.rev() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:21:47 -0800] rev 43449
repoview: move changelog.rev() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7243
Tue, 05 Nov 2019 14:17:58 -0800 repoview: move changelog.strip() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:17:58 -0800] rev 43448
repoview: move changelog.strip() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7242
Tue, 05 Nov 2019 14:16:46 -0800 repoview: move changelog.headrevs() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:16:46 -0800] rev 43447
repoview: move changelog.headrevs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7241
Tue, 05 Nov 2019 14:14:45 -0800 repoview: move changelog.revs() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:14:45 -0800] rev 43446
repoview: move changelog.revs() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7240
Tue, 05 Nov 2019 14:12:10 -0800 repoview: move changelog.__iter__() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:12:10 -0800] rev 43445
repoview: move changelog.__iter__() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7239
Tue, 05 Nov 2019 14:11:30 -0800 repoview: move changelog.__contains__() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:11:30 -0800] rev 43444
repoview: move changelog.__contains__() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7238
Tue, 05 Nov 2019 14:07:08 -0800 repoview: move changelog.tiprev() override to filteredchangelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:07:08 -0800] rev 43443
repoview: move changelog.tiprev() override to filteredchangelog Differential Revision: https://phab.mercurial-scm.org/D7237
Tue, 05 Nov 2019 14:06:11 -0800 repoview: wrap changelog class when filtering
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:06:11 -0800] rev 43442
repoview: wrap changelog class when filtering The class doesn't yet do anything. I'll move the filter-aware overrides from the changelog class over one by one to this class in coming patches. That will leave the changelog class simpler and will centralize more of the filtering logic to repoview. I could not measure any performance difference. Differential Revision: https://phab.mercurial-scm.org/D7236
Tue, 05 Nov 2019 14:00:46 -0800 repoview: extract a function for wrapping changelog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:00:46 -0800] rev 43441
repoview: extract a function for wrapping changelog I would like to clean up the changelog class by moving out knowledge of filtering. The filtering will instead be done in a class that wraps the changelog. This patch prepares for that. Differential Revision: https://phab.mercurial-scm.org/D7235
Tue, 05 Nov 2019 14:42:08 -0800 revlog: move tiprev() from changelog up to revlog
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 14:42:08 -0800] rev 43440
revlog: move tiprev() from changelog up to revlog This makes the changelog override simpler and it seems more consistent. Differential Revision: https://phab.mercurial-scm.org/D7250
Tue, 05 Nov 2019 18:25:13 -0500 tests: fix a few `(no-windows !)` conditionals that are really `(symlink !)`
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Nov 2019 18:25:13 -0500] rev 43439
tests: fix a few `(no-windows !)` conditionals that are really `(symlink !)` The CI for py3 is assuming that symlinks are possible (they are when running as Administrator or when Developer Mode is enabled), and these popped up. Differential Revision: https://phab.mercurial-scm.org/D7232
Tue, 29 Oct 2019 17:16:28 +0100 rust-matchers: add `Matcher` trait and implement `AlwaysMatcher`
Raphaël Gomès <rgomes@octobus.net> [Tue, 29 Oct 2019 17:16:28 +0100] rev 43438
rust-matchers: add `Matcher` trait and implement `AlwaysMatcher` In our quest of a faster Mercurial, we have arrived at the point where we need to implement the matchers in Rust. This RFC mainly for the `Matcher` trait to see if the changes proposed feel fine to people with more experience on the matter. While the `AlwaysMatcher` implementation is here as a trivial example, it should be the first step towards matchers use in Rust as it is currently the only supported one. Notable changes: - `exact` is renamed to `exact_match` - enums for `visit*` methods with `Recursive` instead of `'all'`, etc. - a new `roots`, separate from `file_set` - no `bad`, `explicitdir` or `traversedir` functions as they can be passed to the high functions instead of the matchers Thanks to Martin for suggesting the last two (most important) changes and for reaching out to help a few weeks ago. Differential Revision: https://phab.mercurial-scm.org/D7178
Tue, 05 Nov 2019 13:19:24 -0800 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 13:19:24 -0800] rev 43437
merge with stable
Mon, 04 Nov 2019 00:16:44 +0100 perf: add a way to benchmark `dirstate.status`
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 04 Nov 2019 00:16:44 +0100] rev 43436
perf: add a way to benchmark `dirstate.status` Getting more details about time spend in this specific internal bit is meaningful.
Thu, 24 Oct 2019 11:12:17 -0700 largefiles: delete obsolete and unused repo.push()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 24 Oct 2019 11:12:17 -0700] rev 43435
largefiles: delete obsolete and unused repo.push() The function was removed from localrepo in 4d52e6eb98ea (locarepo: remove the `push` method (API), 2014-09-25). Differential Revision: https://phab.mercurial-scm.org/D7174
Tue, 22 Oct 2019 10:01:48 -0400 censor: document that some commands simply ignore censored data
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 22 Oct 2019 10:01:48 -0400] rev 43434
censor: document that some commands simply ignore censored data I can't see a benefit for hg grep to ever error out early when it encounters censored data.
Tue, 22 Oct 2019 09:56:40 -0400 grep: warn on censored revisions instead of erroring out
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 22 Oct 2019 09:56:40 -0400] rev 43433
grep: warn on censored revisions instead of erroring out We need most of the grep logic to go through in case we encounter a censored revision, so we just return a None body for a censored node, and we stop just short of trying to record matches with the contents of that censored body. The other parts such as recording that the censored file has been considered at this revision needs to go into the proper dicts. I have also gotten weary of all the abbreviations, so while I did a small refactor to move the file-data-getting operation into a common function, I also expanded the abbreviations of the relevant variables within this little function. Hopefully some day this helps someone figure out what all the abbreviations mean. Although the censoring docs currently state that some commands error out or are ignored depending on the `censor.policy` config, I cannot see a benefit for grep to ever stop dead in its tracks when a censored revision is encountered. I will also amend the docs to indicate that some commands, such as grep, unconditionally ignore censored revisions.
Tue, 15 Oct 2019 22:44:55 +0900 py3: enable legacy fs encoding to fix filename compatibility on Windows
Yuya Nishihara <yuya@tcha.org> [Tue, 15 Oct 2019 22:44:55 +0900] rev 43432
py3: enable legacy fs encoding to fix filename compatibility on Windows This patch is untested. I just followed the instruction: https://docs.python.org/3/whatsnew/3.6.html#pep-529-change-windows-filesystem-encoding-to-utf-8
Sat, 19 Oct 2019 14:30:19 +0900 rust-cpython: run cargo fmt
Yuya Nishihara <yuya@tcha.org> [Sat, 19 Oct 2019 14:30:19 +0900] rev 43431
rust-cpython: run cargo fmt
Sat, 05 Oct 2019 09:33:01 -0400 rust-cpython: remove useless PyResult<> from leak_immutable()
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 09:33:01 -0400] rev 43430
rust-cpython: remove useless PyResult<> from leak_immutable() The caller should know if the shared data is mutably borrowed or not.
Sat, 05 Oct 2019 09:01:25 -0400 rust-cpython: remove useless PyRefMut wrapper
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 09:01:25 -0400] rev 43429
rust-cpython: remove useless PyRefMut wrapper
Sat, 05 Oct 2019 08:59:09 -0400 rust-cpython: drop manual management of mutably_borrowed
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:59:09 -0400] rev 43428
rust-cpython: drop manual management of mutably_borrowed RefCell::borrow() should guarantee there's no mutable borrow. As a follow up, maybe PySharedState can be a pure data structure + function. Most ref-sharing business has already been moved to PySharedRef* and PyLeaked*.
Sat, 05 Oct 2019 08:56:15 -0400 rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:56:15 -0400] rev 43427
rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref Since the underlying value can't be mutably borrowed by PyLeaked, we don't have to manage yet another mutably-borrowed state. We can just rely on the RefCell implementation. Maybe we can add try_leak_immutable(), but this patch doesn't in order to keep the patch series not too long.
Sat, 12 Oct 2019 20:48:30 +0900 rust-cpython: remove useless Option<$leaked> from py_shared_iterator
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 20:48:30 +0900] rev 43426
rust-cpython: remove useless Option<$leaked> from py_shared_iterator We no longer need to carefully drop the iterator when it's consumed. Mutation is allowed even if the iterator exists. There's a minor behavior change: next(iter) may return/raise something other than StopIteration if it's called after the iterator has been fully consumed, and if the Rust object isn't a FusedIterator.
Sat, 12 Oct 2019 20:26:38 +0900 rust-cpython: allow mutation unless leaked reference is borrowed
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 20:26:38 +0900] rev 43425
rust-cpython: allow mutation unless leaked reference is borrowed In other words, mutation is allowed while a Python iterator holding PyLeaked exists. The iterator will be invalidated instead. We still need a borrow_count to prevent mutation while leaked data is dereferenced in Rust world, but most leak_count business is superseded by the generation counter. decrease_leak_count(py, true) will be removed soon.
Sat, 05 Oct 2019 08:27:57 -0400 rust-cpython: add generation counter to leaked reference
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 08:27:57 -0400] rev 43424
rust-cpython: add generation counter to leaked reference This counter increments on borrow_mut() to invalidate existing leaked references. This is modeled after the iterator invalidation in Python. The other checks will be adjusted by the subsequent patches.
Sat, 12 Oct 2019 19:26:23 +0900 rust-cpython: add stub wrapper that'll prevent leaked data from being mutated
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 19:26:23 +0900] rev 43423
rust-cpython: add stub wrapper that'll prevent leaked data from being mutated In order to allow mutation of PySharedRefCell value while PyLeaked reference exists, we need yet another "borrow" scope where mutation is prohibited. try_borrow<'a> and try_borrow_mut<'a> defines the "borrow" scope <'a>. The subsequent patches will implement leak counter based on this scope. PyLeakedRef<T> and PyLeakedRefMut<T> could be unified to PyLeakedRef<&T> and PyLeakedRef<&mut T> respectively, but I didn't do that since it seemed a bit weird that deref_mut() would return a mutable reference to an immutable reference.
Sat, 12 Oct 2019 19:10:51 +0900 rust-cpython: rename PyLeakedRef to PyLeaked
Yuya Nishihara <yuya@tcha.org> [Sat, 12 Oct 2019 19:10:51 +0900] rev 43422
rust-cpython: rename PyLeakedRef to PyLeaked This series will make PyLeaked* behave more like a Python iterator, which means mutation of the owner object will be allowed and the leaked reference (i.e. the iterator) will be invalidated instead. I'll add PyLeakedRef/PyLeakedRefMut structs which will represent a "borrowed" state, and prevent the underlying value from being mutably borrowed while the leaked reference is in use: let shared = self.inner_shared(py); let leaked = shared.leak_immutable(); { let leaked_ref: PyLeakedRef<_> = leaked.borrow(py); shared.borrow_mut(); // panics since the underlying value is borrowed } shared.borrow_mut(); // allowed The relation between PyLeaked* structs is quite similar to RefCell/Ref/RefMut, but the implementation can't be reused because the borrowing state will have to be shared across objects having no lifetime relation. PyLeaked isn't named as PyLeakedCell since it isn't actually a cell in that leaked.borrow_mut() will require &mut self.
Tue, 05 Nov 2019 08:42:42 -0800 py3: don't use bytes with vars() or __dict__ stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Nov 2019 08:42:42 -0800] rev 43421
py3: don't use bytes with vars() or __dict__ Inspired by D7227. These were all the remaining instances I could find. Differential Revision: https://phab.mercurial-scm.org/D7230
Tue, 05 Nov 2019 12:10:38 -0500 Added signature for changeset ca3dca416f8d stable
Augie Fackler <raf@durin42.com> [Tue, 05 Nov 2019 12:10:38 -0500] rev 43420
Added signature for changeset ca3dca416f8d
Tue, 05 Nov 2019 12:10:38 -0500 Added tag 5.2 for changeset ca3dca416f8d stable
Augie Fackler <raf@durin42.com> [Tue, 05 Nov 2019 12:10:38 -0500] rev 43419
Added tag 5.2 for changeset ca3dca416f8d
Tue, 05 Nov 2019 21:35:19 +0900 py3: add inline comment about encoding issue of str(Abort()) stable 5.2
Yuya Nishihara <yuya@tcha.org> [Tue, 05 Nov 2019 21:35:19 +0900] rev 43418
py3: add inline comment about encoding issue of str(Abort())
Tue, 05 Nov 2019 21:29:40 +0900 py3: do not reimplement Abort.__str__() on Python 2 stable
Yuya Nishihara <yuya@tcha.org> [Tue, 05 Nov 2019 21:29:40 +0900] rev 43417
py3: do not reimplement Abort.__str__() on Python 2 It isn't necessary on Python 2, and the default implementation should be better than our BaseException_str() clone.
Mon, 04 Nov 2019 20:57:31 -0800 tests: write out file using bytes I/O stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 20:57:31 -0800] rev 43416
tests: write out file using bytes I/O The encoding of sys.stdout varies between Python versions. So using a one-liner to write a file from a Unicode string is not deterministic. This commit writes out the file using bytes I/O to ensure we have exactly the bytes we want in the file. This change fixes a test failure in Python 3.5/3.6. Differential Revision: https://phab.mercurial-scm.org/D7226
Mon, 04 Nov 2019 20:46:19 -0800 import-checker: open all source files as utf-8 stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 20:46:19 -0800] rev 43415
import-checker: open all source files as utf-8 Before, we opened in text mode and used the default encoding to interpret the bytes within. This caused problems interpreting some byte sequences in some files. This commit changes things to always open files as UTF-8, which makes the error go away. test-check-module-imports.t now passes on Python 3.5 and 3.6 with this change. Differential Revision: https://phab.mercurial-scm.org/D7225
Mon, 04 Nov 2019 21:17:34 -0800 localrepo: use str for lookup in vars() stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 21:17:34 -0800] rev 43414
localrepo: use str for lookup in vars() vars() returns a dict of str. So always use a native str for the key lookup. Differential Revision: https://phab.mercurial-scm.org/D7227
Mon, 04 Nov 2019 23:44:10 -0800 automation: install python3-venv Debian package stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 23:44:10 -0800] rev 43413
automation: install python3-venv Debian package Debian's python install has a crippled venv by default, as it is lacking ensurepip. When you try to run `python3 -m venv` it tells you to install `python3-venv`. So this commit does that in our automation environment so we can fully test installing Mercurial using venv+pip with the system Python. Differential Revision: https://phab.mercurial-scm.org/D7229
Mon, 04 Nov 2019 23:42:18 -0800 tests: look for ensurepip before using venv stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 23:42:18 -0800] rev 43412
tests: look for ensurepip before using venv Debian appears to cripple the venv module by default by removing the associated ensurepip functionality. (The module isn't present at all.) This caused test-install.t to fail when using the Debian python3 unless the python3-venv package was installed. This commit introduces a new hghave requirement for detecting ensurepip and makes the Python 3 install variant conditional on its presence. This should make test-install.t pass when using an incomplete Debian Python. Differential Revision: https://phab.mercurial-scm.org/D7228
Thu, 17 Oct 2019 16:46:13 -0400 automation: avoid '~' in the temp directory on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 17 Oct 2019 16:46:13 -0400] rev 43411
automation: avoid '~' in the temp directory on Windows If a long-ish username is used, the environment variable ends up with a '~' to be 8.3 path compatible. That in turn causes a handful of tests (mostly ssh related) to add quotes around $TESTMP. I have no AWS experience, so I have no idea if this is the proper way to do it. But I've hit this problem locally, and redirecting the directory is a workaround. I don't recall if the directory is created on demand by the test harness, but presumably if this is configured before the machine boots, Windows will do it for us. Differential Revision: https://phab.mercurial-scm.org/D7130
Mon, 04 Nov 2019 20:33:38 -0800 tests: use venv on Python 3 stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 20:33:38 -0800] rev 43410
tests: use venv on Python 3 This test was failing in some Python 3 environments because `$PYTHON -m virtualenv` was somehow resulting in Python 2 being used. Why, I'm not sure. Python 3 includes virtualenv in the standard library as the `venv` module. This commit changes test-install.t to use `$PYTHON -m venv` on Python 3 and `$PYTHON -m virtualenv` on Python 2 (if available). I chose to make some test output duplicated because we can't have nested conditionals and there is no easy way to express ORing of hghave checks. Differential Revision: https://phab.mercurial-scm.org/D7224
Mon, 04 Nov 2019 20:10:51 -0800 tests: remove HGALLOWPYTHON3 reference stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 20:10:51 -0800] rev 43409
tests: remove HGALLOWPYTHON3 reference This variable was removed from setup.py in c3e10f705a6c. Differential Revision: https://phab.mercurial-scm.org/D7223
Mon, 04 Nov 2019 20:21:31 -0800 run-tests: use byte strings for inserted output stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Nov 2019 20:21:31 -0800] rev 43408
run-tests: use byte strings for inserted output We were inserting str on Python 3 which resulted in mixed str/bytes types on the list. This would later blow up when trying to write str to the .err file opened in bytes mode. Differential Revision: https://phab.mercurial-scm.org/D7222
Mon, 04 Nov 2019 19:19:36 +0000 contrib: require Python 3.7 for byteify-strings.py stable
Ian Moody <moz-ian@perix.co.uk> [Mon, 04 Nov 2019 19:19:36 +0000] rev 43407
contrib: require Python 3.7 for byteify-strings.py bb509f39d387 made an error, it's actually 3.7 that introduced token.COMMENT. Differential Revision: https://phab.mercurial-scm.org/D7220
Mon, 04 Nov 2019 12:20:11 -0500 hghave: fix bytes/string issue on Python 3 stable
Augie Fackler <augie@google.com> [Mon, 04 Nov 2019 12:20:11 -0500] rev 43406
hghave: fix bytes/string issue on Python 3
Mon, 04 Nov 2019 07:56:53 +0100 packaging: add support for CentOS 8 stable
Mathias De Mare <mathias.de_mare@nokia.com> [Mon, 04 Nov 2019 07:56:53 +0100] rev 43405
packaging: add support for CentOS 8 The resulting executable has not been tested in detail yet. I ran 'hg version' and 'hg clone', which worked fine (except for extensions acting up due to Python 3). Differential Revision: https://phab.mercurial-scm.org/D7216
Mon, 04 Nov 2019 07:40:32 +0100 packaging: allow choosing python version depending on centos version stable
Mathias De Mare <mathias.de_mare@nokia.com> [Mon, 04 Nov 2019 07:40:32 +0100] rev 43404
packaging: allow choosing python version depending on centos version Differential Revision: https://phab.mercurial-scm.org/D7217
Mon, 04 Nov 2019 19:05:44 +0000 fsmonitor: use stringutil.forcebytestr() instead of str() on an exception stable
Ian Moody <moz-ian@perix.co.uk> [Mon, 04 Nov 2019 19:05:44 +0000] rev 43403
fsmonitor: use stringutil.forcebytestr() instead of str() on an exception Similar to 5fa8ac91190e / D7206, should get test-install.t passing on py3. Differential Revision: https://phab.mercurial-scm.org/D7218
Mon, 04 Nov 2019 16:13:01 +0100 py3: add a __str__ method to Abort stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 16:13:01 +0100] rev 43402
py3: add a __str__ method to Abort This improves the rendering of some exceptions by avoiding raw bytestrings, especially when using --traceback option.
Mon, 04 Nov 2019 16:04:09 +0100 py3: add Python 3 exception output to test-lfs-serve-access.t stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 16:04:09 +0100] rev 43401
py3: add Python 3 exception output to test-lfs-serve-access.t Similar to a973a75e92bf or 3e9c6cef949b.
Thu, 31 Oct 2019 19:54:58 -0700 automation: install black stable
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 31 Oct 2019 19:54:58 -0700] rev 43400
automation: install black This should unblock us from running the code formatting test in our automated environment. Differential Revision: https://phab.mercurial-scm.org/D7197
Sat, 02 Nov 2019 22:21:25 +0000 py3: use %d to format an int stable
Ian Moody <moz-ian@perix.co.uk> [Sat, 02 Nov 2019 22:21:25 +0000] rev 43399
py3: use %d to format an int Avoids a TypeError under py3. Fortunately this is very much an edge case since it requires the user to have deliberately created a local tag of the form 'D\d+' that isn't truthful. Differential Revision: https://phab.mercurial-scm.org/D7215
Sat, 02 Nov 2019 15:02:35 -0700 fsmonitor: normalize exception types to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 15:02:35 -0700] rev 43398
fsmonitor: normalize exception types to bytes Unavailable.msg should now always be bytes. We also rename Unavailable.__str__ to __bytes__ as it always returns bytes. We make __str__ a simple wrapper that decodes that result to str. There's probably some excessive strutil.forcebytestr() in fsmonitor/__init__.py now. But at least the exceptions around type coercion should now be gone. Differential Revision: https://phab.mercurial-scm.org/D7214
Sat, 02 Nov 2019 14:55:45 -0700 fsmonitor: normalize clock value to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:55:45 -0700] rev 43397
fsmonitor: normalize clock value to bytes We normalize the value returned by watchman because we perform a number of compares with this value in code. So the easiest path forward is to normalize to bytes so we don't have to update many call sites. With this commit, the fsmonitor extension appears to be working with Python 3! Although there are still some failures in edge cases... Differential Revision: https://phab.mercurial-scm.org/D7213
Sat, 02 Nov 2019 14:27:55 -0700 fsmonitor: use next() instead of .next() stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:27:55 -0700] rev 43396
fsmonitor: use next() instead of .next() This is needed for Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D7212
Sat, 02 Nov 2019 14:26:06 -0700 fsmonitor: normalize Watchman paths to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:26:06 -0700] rev 43395
fsmonitor: normalize Watchman paths to bytes Otherwise it will be a str on Python 3 and operations below which operate in the bytes domain will fail. Differential Revision: https://phab.mercurial-scm.org/D7211
Sat, 02 Nov 2019 14:17:48 -0700 fsmonitor: handle unicode keys in tuples stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:17:48 -0700] rev 43394
fsmonitor: handle unicode keys in tuples In Python 3, keys in the bset tuple are typically str, not bytes. PyBytes_AsString() would return NULL. But we weren't checking the return value and this would lead to a segfault. This commit makes the code type and Python version aware. The Python version specific code is to allow us to utilize a modern API for converting str -> char* without having to allocate an extra PyObject. FWIW I wanted to assume that keys were always str. However, there appear to be some bytes keys in some cases. I haven't debugged this further. Differential Revision: https://phab.mercurial-scm.org/D7210
Sat, 02 Nov 2019 13:39:23 -0700 fsmonitor: make _hashignore compatible with Python 3 stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:39:23 -0700] rev 43393
fsmonitor: make _hashignore compatible with Python 3 The Hasher wants a bytes but we were feeding it a str. Let's use our repr() implementation to return bytes. In addition, the hexdigest() would return a str, which would be compared against a bytes and would always fail. Normalize to bytes so the compare works. Differential Revision: https://phab.mercurial-scm.org/D7209
Sat, 02 Nov 2019 13:34:40 -0700 fsmonitor: normalize hostname to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:34:40 -0700] rev 43392
fsmonitor: normalize hostname to bytes Without this, we get a str/bytes mismatching when using % formatting a few lines below. Differential Revision: https://phab.mercurial-scm.org/D7208
Sat, 02 Nov 2019 13:30:23 -0700 fsmonitor: access repo.root stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:30:23 -0700] rev 43391
fsmonitor: access repo.root There is no repo._root. It looks like fsmonitor has been busted since this access was introduced in ab1900323b1 in July 2019! Differential Revision: https://phab.mercurial-scm.org/D7207
Sat, 02 Nov 2019 13:08:20 -0700 fsmonitor: coerce watchman exception to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:08:20 -0700] rev 43390
fsmonitor: coerce watchman exception to bytes Without this, we get errors due to passing str to a function which expects bytes. Differential Revision: https://phab.mercurial-scm.org/D7206
Sat, 02 Nov 2019 13:04:47 -0700 fsmonitor: fix str/bytes mismatch when accessing watchman version stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:04:47 -0700] rev 43389
fsmonitor: fix str/bytes mismatch when accessing watchman version There were 2 bugs here. First, keys in the tuple are always str. Second, we needed to normalize the value to bytes to prevent a str/bytes mismatch on Python 3. With this commit, `hg debuginstall` with fsmonitor enabled now works on Python 3. Differential Revision: https://phab.mercurial-scm.org/D7205
Sat, 02 Nov 2019 12:54:47 -0700 fsmonitor: reapply b1f62cd39b5c stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:54:47 -0700] rev 43388
fsmonitor: reapply b1f62cd39b5c The recent revendoring of pywatchman undid this changeset. Let's reapply it. This commit was generated by running `hg graft -f b1f62cd39b5c`. It applied cleanly. Differential Revision: https://phab.mercurial-scm.org/D7204
Sat, 02 Nov 2019 12:52:58 -0700 fsmonitor: reapply dd35abc409ee stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:52:58 -0700] rev 43387
fsmonitor: reapply dd35abc409ee The recent revendoring of pywatchman undid this bug fix. Let's reapply it. Differential Revision: https://phab.mercurial-scm.org/D7203
Sat, 02 Nov 2019 12:51:28 -0700 fsmonitor: remove pywatchman from exclusion rule stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:51:28 -0700] rev 43386
fsmonitor: remove pywatchman from exclusion rule The recently vendored pywatchman code base is now formatted with black. We can now remove pywatchman from our black exclusion rule. Differential Revision: https://phab.mercurial-scm.org/D7202
Sat, 02 Nov 2019 12:42:23 -0700 fsmonitor: refresh pywatchman with upstream stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:42:23 -0700] rev 43385
fsmonitor: refresh pywatchman with upstream This commit vendors pywatchman commit 259dc66dc9591f9b7ce76d0275bb1065f390c9b1 from upstream without modifications. The previously vendored pywatchman from changeset 16f4b341288d was from Git commit c77452. This commit effectively undoes the following Mercurial changesets: * dd35abc409ee fsmonitor: correct an error message * b1f62cd39b5c fsmonitor: layer on another hack in bser.c for os.stat() compat (issue5811) * c31ce080eb75 py3: convert arguments, cwd and env to native strings when spawning subprocess * 876494fd967d cleanup: delete lots of unused local variables * 57264906a996 watchman: add the possibility to set the exact watchman binary location The newly-vendored code has support for specifying the binary location, so 57264906a996 does not need applied. But we do need to modify our code to specify a proper argument name. 876494fd967d is not important, so it will be ignored. c31ce080eb75 globally changed the code base to always pass str to subprocess. But pywatchman's code is Python 3 clean, so we don't need to do this. This leaves dd35abc409ee and b1f62cd39b5c, which will be re-applied in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D7201
Mon, 04 Nov 2019 10:09:08 +0100 py3: encode strings before setting rev summary in gnuarch converter stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 10:09:08 +0100] rev 43384
py3: encode strings before setting rev summary in gnuarch converter
Mon, 04 Nov 2019 09:56:10 +0100 py3: use raw string to query EmailMessage in gnuarch converter stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:56:10 +0100] rev 43383
py3: use raw string to query EmailMessage in gnuarch converter
Mon, 04 Nov 2019 09:52:13 +0100 py3: use mail.parsebytes() in gnuarch catlog parser stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:52:13 +0100] rev 43382
py3: use mail.parsebytes() in gnuarch catlog parser We drop 'catlogparser' attribute now unused.
Mon, 04 Nov 2019 09:35:10 +0100 tests: handle Message-Id line wrapping in test-notify-changegroup.t stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:35:10 +0100] rev 43381
tests: handle Message-Id line wrapping in test-notify-changegroup.t This fixes this test on Python 3 with a long hostname. See changeset 4128ffba4431 for details.
Sat, 02 Nov 2019 12:09:35 -0700 py3: define and use json.loads polyfill stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:09:35 -0700] rev 43380
py3: define and use json.loads polyfill Python 3.5's json.loads() requires a str. Only Python 3.6+ supports passing a bytes or bytearray. This commit implements a json.loads() polyfill on Python 3.5 so that we can use bytes. The added function to detect encodings comes verbatim from Python 3.7.
Sat, 02 Nov 2019 11:48:38 -0700 contrib: require Python 3.6 for byteify-strings.py stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 11:48:38 -0700] rev 43379
contrib: require Python 3.6 for byteify-strings.py This script makes use of `token.COMMENT`, which apparently isn't present until Python 3.6. So make the script and its test conditional on Python 3.6.
Sat, 02 Nov 2019 11:42:46 -0700 demandimportpy3: only use lazy extension loader on Python 3.6+ stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 11:42:46 -0700] rev 43378
demandimportpy3: only use lazy extension loader on Python 3.6+ There was an inline comment denoting a bug in the lazy extension loader on Python 3.5 which prevents it from working there. But the code was not conditional on the Python version. The result of this was a myriad of failures on Python 3.5 due to getattr() and friends not working on lazy extension modules. By making extension modules non-lazy on Python 3.5, we reduce the number of test failures from 48 to 22 on that Python version.
Sat, 02 Nov 2019 15:33:39 -0700 ui: flush before prompting for input with readline stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 15:33:39 -0700] rev 43377
ui: flush before prompting for input with readline I was using `hg absorb` with Python 3 and noticed that the prompt was appearing without any output about what would be done. After I answered the prompt, the output was printed to stdout. This appears to be a buffering difference between Python 2 and Python 3. To work around it, this commit adds an explicit flush() before calling the raw input function when readline is used.
Fri, 01 Nov 2019 21:46:34 -0700 histedit: restore hex nodeids to be 12 digits long stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 01 Nov 2019 21:46:34 -0700] rev 43376
histedit: restore hex nodeids to be 12 digits long I accidentally switched from 12 digits to 40 digits while making the code py3-compatible. Thanks to Yuya for noticing. Differential Revision: https://phab.mercurial-scm.org/D7200
Tue, 29 Oct 2019 10:54:08 -0700 tests: fix typo "includfe" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Oct 2019 10:54:08 -0700] rev 43375
tests: fix typo "includfe" Differential Revision: https://phab.mercurial-scm.org/D7180
Fri, 01 Nov 2019 11:02:47 -0700 py3: fix fsmonitor's _watchmantofsencoding exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 11:02:47 -0700] rev 43374
py3: fix fsmonitor's _watchmantofsencoding exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7190
Thu, 31 Oct 2019 15:03:12 -0700 py3: use native strings as keys into **opts in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:03:12 -0700] rev 43373
py3: use native strings as keys into **opts in chistedit Now you should be able to successfully confirm your histedit plan (at least in the case I tried). Even continuing after conflicts and finishing the histedit worked. Differential Revision: https://phab.mercurial-scm.org/D7186
Thu, 31 Oct 2019 15:00:49 -0700 py3: open chistedit file in binary mode using vfs stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:00:49 -0700] rev 43372
py3: open chistedit file in binary mode using vfs We write bytes to the file, so it should be open in binary mode. Opening it via the vfs takes care of that for us. Now you'll get yet a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7185
Thu, 31 Oct 2019 15:02:48 -0700 py3: avoid another b''.format() in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:02:48 -0700] rev 43371
py3: avoid another b''.format() in chistedit Now you'll get a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7184
Thu, 31 Oct 2019 15:02:03 -0700 py3: render message about conflicts in chistedit code stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:02:03 -0700] rev 43370
py3: render message about conflicts in chistedit code Now you can also reorder commits that (potentially) conflict. Just don't try to confirm the changes yet (because then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7183
Thu, 31 Oct 2019 14:46:17 -0700 py3: handle keypresses in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 14:46:17 -0700] rev 43369
py3: handle keypresses in chistedit Now you can navigate and change the action for a commit. You can also reorder commits, as long as that doesn't result in a conflict (then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7182
Thu, 31 Oct 2019 14:25:51 -0700 py3: make chistedit render stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 14:25:51 -0700] rev 43368
py3: make chistedit render Now you can see the list of commits, but it crashes when you press a key. Differential Revision: https://phab.mercurial-scm.org/D7181
Fri, 01 Nov 2019 17:23:02 +0100 py3: fix exception display encoding in contrib/simplemerge.py stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:23:02 +0100] rev 43367
py3: fix exception display encoding in contrib/simplemerge.py Differential Revision: https://phab.mercurial-scm.org/D7191
Fri, 01 Nov 2019 17:31:47 +0100 py3: fix exception message check in test-linerange.py's testOutOfRange stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:31:47 +0100] rev 43366
py3: fix exception message check in test-linerange.py's testOutOfRange Differential Revision: https://phab.mercurial-scm.org/D7192
Fri, 01 Nov 2019 17:35:36 +0100 py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:35:36 +0100] rev 43365
py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read Differential Revision: https://phab.mercurial-scm.org/D7193
Fri, 01 Nov 2019 17:38:07 +0100 py3: fix crecord.py's editpatchwitheditor exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:38:07 +0100] rev 43364
py3: fix crecord.py's editpatchwitheditor exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7194
Fri, 01 Nov 2019 17:39:17 +0100 py3: fix exception message encoding in infinitepush stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:39:17 +0100] rev 43363
py3: fix exception message encoding in infinitepush Differential Revision: https://phab.mercurial-scm.org/D7195
Fri, 01 Nov 2019 10:57:31 -0700 py3: fix fsmonitor's _handleunavailable exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 10:57:31 -0700] rev 43362
py3: fix fsmonitor's _handleunavailable exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7196
Fri, 01 Nov 2019 14:54:08 +0100 packaging: update built-in Fedora support to Fedora 31 stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 14:54:08 +0100] rev 43361
packaging: update built-in Fedora support to Fedora 31 This is now quite easy ...
Fri, 01 Nov 2019 13:51:44 +0100 packaging: refactor "fedora29" target to a single more generic "fedora" target stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 13:51:44 +0100] rev 43360
packaging: refactor "fedora29" target to a single more generic "fedora" target Fedora moves fast in version numbers, and often with Mercurial packaging being backwards compatible. Also, most people use the system package. There is thus much work and tech debt and little value in providing explicit built-in support for several versions. Thus, only aim for providing built-in support for latest Fedora version, and make it easy to update.
Fri, 01 Nov 2019 15:29:14 +0100 packaging: make dockerrpm fedora target more generic stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 15:29:14 +0100] rev 43359
packaging: make dockerrpm fedora target more generic Fedora moves fast in version numbers, and often with Mercurial packaging being backwards compatible. Thus, only aim for providing built-in support for latest Fedora version, and make it easy to update. With this refactoring, 'dockerrpm fedora31' also works. 'dockerrpm fedora' will use the 'fedora:latest' Docker image.
Fri, 01 Nov 2019 12:59:22 +0100 packaging: use "python3" for fedora29 ... and as buildrpm default stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:59:22 +0100] rev 43358
packaging: use "python3" for fedora29 ... and as buildrpm default Change the buidrpm default. The CentOS targets explicitly use "python", and changing the default will only influence Fedora 29. A Python 3 package needs python3 dependencies, so pythonexe (and pythonver) is used for specifying dependencies. Other OS versions will keep using "python" as before ... or potentially change to explicit "python2". Fedora 29 packages can thus also still be built for Python 2 - just not in the docker image that is updated for Python 3.
Fri, 01 Nov 2019 12:47:38 +0100 packaging: use "--python python" for centos7 to avoid explicit "python2" stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:47:38 +0100] rev 43357
packaging: use "--python python" for centos7 to avoid explicit "python2" This is a partial backout of 92a51a45d44c. We will need to be able to control whether package dependencies are python2 or python3. Generally (at least in recent Fedora), the package prefix match the name of the python executable ... but CentOS 7 doesn't use the python2 prefix in package name or alias for python-docutils yet, so just keep centos7 in the unversioned "python" world. Change the new (unused) buildrpm "--python3" option (introduced in a6dcac6454c1) to "--python python3" to get a more generic method for explicit control over whether we use python, python2 or python3.
Fri, 01 Nov 2019 12:34:08 +0100 packaging: fix docker-centos5 - use pythonexe and set to "python" as before stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:34:08 +0100] rev 43356
packaging: fix docker-centos5 - use pythonexe and set to "python" as before Fix 92a51a45d44c .
Fri, 01 Nov 2019 12:18:17 +0100 packaging: move dockerrpm output directory creation to dockerrpm stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:18:17 +0100] rev 43355
packaging: move dockerrpm output directory creation to dockerrpm Avoid having to compute the directory in two places in different environments.
Thu, 31 Oct 2019 11:53:11 +0100 packaging: drop "support" for unsupported Fedora versions stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 31 Oct 2019 11:53:11 +0100] rev 43354
packaging: drop "support" for unsupported Fedora versions Fedora 31 has just been released, and Fedora 29 will be EOL in a month. Don't spend any time thinking about dead stuff.
Wed, 30 Oct 2019 16:39:18 -0400 mail: black wants to add this blank line stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:39:18 -0400] rev 43353
mail: black wants to add this blank line I can't figure out how this got overlooked on previous runs, but here we are. It looks like the culprit change is already public?
Wed, 30 Oct 2019 16:29:45 -0400 hghave: verify we have a black that is new enough for our format stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:29:45 -0400] rev 43352
hghave: verify we have a black that is new enough for our format We require what is currently the absolute latest black, so let's be paranoid.
Wed, 30 Oct 2019 16:17:39 -0400 contrib: fix up example fix configuration for our move to released black stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:17:39 -0400] rev 43351
contrib: fix up example fix configuration for our move to released black
Wed, 23 Oct 2019 22:24:14 +0100 phabricator: use True primitive instead of b'true' for phabupdate actions stable
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 22:24:14 +0100] rev 43350
phabricator: use True primitive instead of b'true' for phabupdate actions Something I'd missed in the creatediff port. This didn't matter before with the old PHP form style wireformat, but breaks with the new arcanist format. Differential Revision: https://phab.mercurial-scm.org/D7152
Wed, 23 Oct 2019 15:07:56 +0100 setup: allow py3 install without env vars stable
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 15:07:56 +0100] rev 43349
setup: allow py3 install without env vars 5.2 is the first release of Mercurial where py3 support is expected to be widely used, therefore we should allow installing it without hoop-jumping. Differential Revision: https://phab.mercurial-scm.org/D7151
Tue, 29 Oct 2019 11:07:25 +0100 formatting: drop `grey`, our custom black version stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 11:07:25 +0100] rev 43348
formatting: drop `grey`, our custom black version Now that the official black has all we want, we can drop this.
Tue, 29 Oct 2019 10:43:47 +0100 formatting: using black to check for formatting stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:43:47 +0100] rev 43347
formatting: using black to check for formatting
Tue, 29 Oct 2019 10:41:30 +0100 formatting: run black version 19.10b0 on the codebase stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:41:30 +0100] rev 43346
formatting: run black version 19.10b0 on the codebase The latest version of black is out and contains the change we needed. So we can start using it now. note: `test-check-format.t` will complains about this changes because it still use `grey` and need to be migrated to `black`. See next changesets for this.
Sun, 27 Oct 2019 20:16:59 +0100 packaging: fix buildrpm whitespace stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:59 +0100] rev 43345
packaging: fix buildrpm whitespace
Sun, 27 Oct 2019 20:16:38 +0100 packaging: drop outdated buildrpm "tested on" comment stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:38 +0100] rev 43344
packaging: drop outdated buildrpm "tested on" comment Packaging usually works on other versions too, and it is not efficient to maintain the list in repo. It is already out of sync with the Makefile targets.
Mon, 28 Oct 2019 00:29:42 +0100 packaging: also include hgweb.wsgi in rpms stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 28 Oct 2019 00:29:42 +0100] rev 43343
packaging: also include hgweb.wsgi in rpms
Sun, 27 Oct 2019 21:28:26 +0100 packaging: introduce Python3 support as buildrpm --python3 stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:28:26 +0100] rev 43342
packaging: introduce Python3 support as buildrpm --python3 Just overrule the HGPYTHON3 warning.
Sun, 27 Oct 2019 21:40:21 +0100 packaging: be explicit about Python version in rpm spec stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:40:21 +0100] rev 43341
packaging: be explicit about Python version in rpm spec Fedora 31 has Python3 at /usr/bin/python ... but expect everybody to not just find python in $PATH but be explicit about whether they want python2 or python3. mercurial.spec just used 'python' and would fail when it unknowingly used Python 3 and ended up with Mercurial setup.py reporting "Python 3.7 detected." and talking about the HGPYTHON3 environment variable. For now, just be explicit about using system python2 as python executable when building rpms.
Sun, 27 Oct 2019 20:17:33 +0100 packaging: make python snippets in rpm building python3 compatible stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:17:33 +0100] rev 43340
packaging: make python snippets in rpm building python3 compatible Fedora 31 has Python3 at /usr/bin/python, and buildrpm would fail on snippets that use python2 syntax. Instead of forcing python2, just accept for the future while staying backwards compatible.
Wed, 30 Oct 2019 21:49:48 +0900 py3: fix patchbomb to accept non-ASCII header value for email preview stable
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Oct 2019 21:49:48 +0900] rev 43339
py3: fix patchbomb to accept non-ASCII header value for email preview Since mail.headencode() is disabled by -n/--test, non-ASCII header value has to be allowed. Spotted by Denis Laxalde.
Fri, 25 Oct 2019 12:10:45 +0200 tests: check patchbomb with a non-ascii commit message stable
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 12:10:45 +0200] rev 43338
tests: check patchbomb with a non-ascii commit message This fails on Python 3 but gets fixed in the next changeset.
Sun, 27 Oct 2019 12:49:09 +0900 formatter: fix handling of None value in templater mapping stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:49:09 +0900] rev 43337
formatter: fix handling of None value in templater mapping For historical reasons, None in mapping dict means there's no such keyword, and falls back to b"". That's fine in log templates where mapping item is generally a callable returning a value (which may be None,) but the formatter directly puts an "evaluated" value in the mapping. So the None value has to be lifted to wrappedvalue(None) to avoid confusion in the template engine.
Sun, 27 Oct 2019 12:36:52 +0900 config: add support for defaultvalue of list of printable elements stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:36:52 +0900] rev 43336
config: add support for defaultvalue of list of printable elements
Sun, 27 Oct 2019 12:30:59 +0900 config: fix -Tjson to not crash due to unsupported defaultvalue types stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:30:59 +0900] rev 43335
config: fix -Tjson to not crash due to unsupported defaultvalue types Maybe it isn't great to ignore unsupported types at all, but otherwise "hg config -Tjson" would crash.
Sun, 27 Oct 2019 18:12:24 +0100 tests: handle Message-Id email header possible wrapping stable
Denis Laxalde <denis@laxalde.org> [Sun, 27 Oct 2019 18:12:24 +0100] rev 43334
tests: handle Message-Id email header possible wrapping The "Message-Id" header will get wrapped with a new line when exceeding 75 characters on Python 3 (see changeset 7d4f2e4899c5 introducing usage of email.header.Header.encode and respective doc). This will occur in an unpredictable manner depending on the hostname's length. To make the test output consistent across Python versions and hostname configuration, we add a filter to unwrap this header value.
Sun, 27 Oct 2019 12:51:53 +0900 py3: leverage pycompat.long stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:51:53 +0900] rev 43333
py3: leverage pycompat.long
Fri, 25 Oct 2019 14:02:40 +0200 packaging: remove version info from Breaks+Replaces in Debian package stable
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 14:02:40 +0200] rev 43332
packaging: remove version info from Breaks+Replaces in Debian package The versioned Breaks: and Replaces: cause problem when trying to install our package over the one in Debian. $ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-a2ff3aff81d2) but 5.2~rc0-1 is to be installed E: Unable to correct problems, you have held broken packages. Removing version information resolves the situation.
Thu, 24 Oct 2019 17:28:57 +0200 py3: fix generated non-ascii message in test-notify.t stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 17:28:57 +0200] rev 43331
py3: fix generated non-ascii message in test-notify.t The resulting "Subject:" header contains an encoded word in Python 3 so we have to add distinct outputs for Python 3 but underlying values are the same: >>> from email.header import decode_header >>> decode_header('=?utf-8?b?w6AuLi4=?=') [(b'\xc3\xa0...', 'utf-8')]
Thu, 24 Oct 2019 14:28:20 +0200 py3: decode encoding literal before passing to .decode() stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 14:28:20 +0200] rev 43330
py3: decode encoding literal before passing to .decode() bytes.decode(<encoding>) wants an str as "encoding" parameter, it raises a TypeError if given a bytestring. encoding.encoding and encoding.fallbackencoding are bytes values.
Thu, 24 Oct 2019 16:34:43 +0200 py3: decode payload of notify email stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 16:34:43 +0200] rev 43329
py3: decode payload of notify email This fixes one UnicodeEncodeError in test-notify.t:422 when testing the notify hook with non-ascii content (there are more later). We only decode on Python 3, since it's not safe for sure on Python 2.
Thu, 24 Oct 2019 15:50:15 +0200 py3: decode email headers with mail.headdecode() in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:50:15 +0200] rev 43328
py3: decode email headers with mail.headdecode() in notify extension
Thu, 24 Oct 2019 15:46:16 +0200 py3: use stdlib's parseaddr() to get sender header in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:46:16 +0200] rev 43327
py3: use stdlib's parseaddr() to get sender header in notify extension In Python 3, email headers are unicode string so using stringutil.email() will not work as it compares with bytestring. So let's use email.utils.parseaddr() from the stdlib which has a consistent behavior across Python versions. The same is done in patchbomb extension already.
Thu, 24 Oct 2019 15:28:00 +0200 py3: use a BytesParser in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:28:00 +0200] rev 43326
py3: use a BytesParser in notify extension This is the first step to make the "long line" case in test-notify.t pass by fixing a UnicodeDecodeError on Python 3. We alias a parsebytes() in mail module, similarly as we already have a parse() function for Python 2 and Python 3 compatibility.
Thu, 24 Oct 2019 17:16:43 +0200 py3: fix headencode() with display=False stable
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.
Thu, 24 Oct 2019 14:31:24 +0200 mail: catch LookupError in headdecode() stable
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.
Thu, 24 Oct 2019 16:56:36 +0200 py3: account for extra line break in email headers in test-notify.t stable
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.
Thu, 10 Oct 2019 13:48:30 +0200 py3: use as_bytes() method of EmailMessage stable
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.
Wed, 23 Oct 2019 23:00:58 +0100 py3: use %d instead of %s when formatting an int into a bytestring stable
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
Wed, 23 Oct 2019 17:18:16 +0200 packaging: ship only a single binary Debian package stable
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).
Wed, 23 Oct 2019 17:18:57 +0200 packaging: avoid running bare "make install" in debian/rules stable
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.
Wed, 23 Oct 2019 16:35:27 +0200 packaging: distinguish clean and build steps from install in Debian stable
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
Wed, 23 Oct 2019 16:25:41 +0200 packaging: also move Debian .buildinfo file in output directory stable
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
Mon, 21 Oct 2019 19:53:30 -0700 packaging: upgrade packages distributed with Windows installers stable
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.
Mon, 21 Oct 2019 19:28:23 -0700 automation: install Python 2.7.17, 3.7.5, and PyPy 7.2.0 stable
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.
Mon, 21 Oct 2019 19:25:06 -0700 contrib: install Python 2.7.17 and 3.7.5 in Windows environment stable
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.
Mon, 21 Oct 2019 11:48:59 +0200 packaging: use /usr/bin/python3 shebang for scripts in Debian stable
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.
Mon, 21 Oct 2019 11:32:54 +0200 packaging: fix path where .deb files are looked for stable
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".
Mon, 21 Oct 2019 09:52:31 +0200 packaging: let Debian package depends on sensible-utils stable
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
Mon, 21 Oct 2019 10:59:54 +0200 packaging: upgrade Debian packaging to build with Python 3 stable
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.
Mon, 21 Oct 2019 11:26:41 +0200 py3: decode bytes before logging in run-tests.py stable
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.
Mon, 21 Oct 2019 11:14:28 -0400 Added signature for changeset 59338f956109 stable
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:28 -0400] rev 43308
Added signature for changeset 59338f956109
Mon, 21 Oct 2019 11:14:27 -0400 Added tag 5.2rc0 for changeset 59338f956109 stable
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:27 -0400] rev 43307
Added tag 5.2rc0 for changeset 59338f956109
Mon, 21 Oct 2019 11:09:48 -0400 merge default into stable for 5.2 release stable 5.2rc0
Augie Fackler <augie@google.com> [Mon, 21 Oct 2019 11:09:48 -0400] rev 43306
merge default into stable for 5.2 release
Fri, 18 Oct 2019 11:18:41 -0400 grep: update docs to reflect new --all-files default
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.
Sun, 06 Oct 2019 11:06:10 -0400 grep: enable all-files by default (BC)
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.
Mon, 21 Oct 2019 11:08:23 +0200 lfs: dedent documentation section about .hglfs file
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.
Thu, 17 Oct 2019 16:06:06 +0200 copies: simplify chain loop
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
Thu, 17 Oct 2019 02:17:24 +0200 sidedatacopies: only fetch information once for merge
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
Tue, 15 Oct 2019 18:23:34 +0200 copies: move from a copy on branchpoint to a copy on write approach
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
Sat, 12 Oct 2019 18:35:14 +0200 copies: compute the exact set of revision to walk
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
Sat, 12 Oct 2019 17:53:29 +0200 copies: add an explicit test using multiple roots
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
Wed, 02 Oct 2019 18:16:02 -0400 sidedatacopies: fast path data fetching if revision has no sidedata
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
Fri, 18 Oct 2019 15:16:57 -0700 largefiles: use context manager for setting "lfstatus" on subrepos too
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
Fri, 18 Oct 2019 15:14:51 -0700 largefiles: reset "lfstatus" attribute to previous value in "finally"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 15:14:51 -0700] rev 43295
largefiles: reset "lfstatus" attribute to previous value in "finally" We were resetting it to False, which means nesting of these overrides would be incorrect. Differential Revision: https://phab.mercurial-scm.org/D7137
Fri, 18 Oct 2019 14:40:50 -0700 largefiles: add context manager for setting/clearing "lfstatus" attribute
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 14:40:50 -0700] rev 43294
largefiles: add context manager for setting/clearing "lfstatus" attribute Differential Revision: https://phab.mercurial-scm.org/D7136
Fri, 18 Oct 2019 16:51:26 +0200 py3: adjust expected traceback in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 16:51:26 +0200] rev 43293
py3: adjust expected traceback in test-hook.t In Python 3, traceback.format_exception() displays the chain of exceptions so we get extra results from our grep. Also, ModuleNotFoundError is raised instead of ImportError from Python 3.6.
Fri, 18 Oct 2019 16:38:37 +0200 tests: use non-reverse grep in traceback in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 16:38:37 +0200] rev 43292
tests: use non-reverse grep in traceback in test-hook.t This will prepare for updating test output for Python 3.
Fri, 18 Oct 2019 11:44:44 +0200 py3: add Python 3 exception output to test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 11:44:44 +0200] rev 43291
py3: add Python 3 exception output to test-hook.t This is similar to, e.g., 3e9c6cef949b.
Fri, 18 Oct 2019 12:12:56 +0200 py3: ajust abort message in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 12:12:56 +0200] rev 43290
py3: ajust abort message in test-hook.t
Mon, 14 Oct 2019 16:15:19 +0900 rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org> [Mon, 14 Oct 2019 16:15:19 +0900] rev 43289
rust-cpython: prepare for writing tests that require libpython What I wanted is to disable the "cpython/extension-module<ver>" feature while building tests executable, but that seems not doable. Instead, this patch adds new features dedicated for tests. The make rule is extracted so that we can easily run cargo tests. Added a minimal test of ref-sharing as an example. More tests will follow.
Sat, 05 Oct 2019 10:21:34 -0400 rust-cpython: make inner functions and structs of ref_sharing private
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 10:21:34 -0400] rev 43288
rust-cpython: make inner functions and structs of ref_sharing private Most of these methods were public because they had to be accessible from macro-generated functions. Some "unsafe" can be removed since we can guarantee the data consistency across non-public operations.
Sat, 21 Sep 2019 17:05:01 +0900 rust-cpython: keep Python<'a> token in PyRefMut
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Sep 2019 17:05:01 +0900] rev 43287
rust-cpython: keep Python<'a> token in PyRefMut This just clarifies that the GIL is obtained while PyRefMut is dereferenced, so there's no need of extra acquire_gil() to drop the reference.
Sat, 21 Sep 2019 17:15:50 +0900 rust-cpython: require GIL to borrow immutable reference from PySharedRefCell
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Sep 2019 17:15:50 +0900] rev 43286
rust-cpython: require GIL to borrow immutable reference from PySharedRefCell Since the inner value may be leaked, we probably need GIL to guarantee that there's no data race. inner(py).borrow() is replaced with inner_shared(py).borrow(), which basically means any PySharedRefCell data should be accessed through PySharedRef wrapper.
Sun, 15 Sep 2019 22:19:10 +0900 rust-cpython: make PyLeakedRef operations relatively safe
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:19:10 +0900] rev 43285
rust-cpython: make PyLeakedRef operations relatively safe This patch encapsulates the access to the leaked reference to make most leaked-ref operations safe. The only exception is leaked_ref.map(). I couldn't figure out how to allow arbitrary map operation safely over an unsafe static reference. See the docstring and inline comment for details. Now leak_immutable() can be safely implemented as the PyLeakedRef owns its inner data.
Sun, 15 Sep 2019 22:06:19 +0900 rust-cpython: put leaked reference in PyLeakedRef
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:06:19 +0900] rev 43284
rust-cpython: put leaked reference in PyLeakedRef The next patch will make PyLeakedRef manage the lifetime of the underlying object. leak_handle.data.take() will be removed soon.
Thu, 17 Oct 2019 20:40:12 -0700 run-tests: make code coverage work on Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 17 Oct 2019 20:40:12 -0700] rev 43283
run-tests: make code coverage work on Python 3 This code path was obviously not tested on Python 3 because it blew up in several places due to str/bytes mismatch. For internal code, we normalize paths to bytes. For code calling into `coverage`, we normalize paths to str, which is what `coverage` seems to expect. After this, `run-tests.py -H` works on Python 3! Differential Revision: https://phab.mercurial-scm.org/D7133
Thu, 17 Oct 2019 22:40:24 +0100 py3: don't index into bytes in phabricator's _tokenize()
Ian Moody <moz-ian@perix.co.uk> [Thu, 17 Oct 2019 22:40:24 +0100] rev 43282
py3: don't index into bytes in phabricator's _tokenize() `phabread`ing a stack using `hg phabread :D1234` under py3 will currently die with a KeyError because it will index into `b':D1234'` and return `58` instead of `b':'` as a token. Differential Revision: https://phab.mercurial-scm.org/D7129
Thu, 17 Oct 2019 14:20:11 +0200 rust-dirstate-status: use fast-path even with fsmonitor and sparse extensions
Raphaël Gomès <rgomes@octobus.net> [Thu, 17 Oct 2019 14:20:11 +0200] rev 43281
rust-dirstate-status: use fast-path even with fsmonitor and sparse extensions When I initially ran the tests on my series, there were test failures related to those extensions. Now that the initial series has landed, I felt like going back to those issues because people with performance issues will often want to use fsmonitor and sparse. Either because of flaky tests or because the series has changed so much, I can't seem to reproduce these issues... let's widen the scope of the fast-path. Differential Revision: https://phab.mercurial-scm.org/D7128
Wed, 16 Oct 2019 10:14:26 +0200 rust-dirstatemap: remove additional lookups in dirstatemap
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2019 10:14:26 +0200] rev 43280
rust-dirstatemap: remove additional lookups in dirstatemap We're copying this shortcut from the Python implementation, pretty standard for this codebase. Differential Revision: https://phab.mercurial-scm.org/D7117
Thu, 17 Oct 2019 21:37:21 +0200 tests: avoid chmod on windows in hgrc tests
Denis Laxalde <denis@laxalde.org> [Thu, 17 Oct 2019 21:37:21 +0200] rev 43279
tests: avoid chmod on windows in hgrc tests Follow up on changeset d201a637c971 introducing this test, which fails on Windows.
Thu, 17 Oct 2019 13:34:21 +0200 py3: fix sorting of obsolete markers during push
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 13:34:21 +0200] rev 43278
py3: fix sorting of obsolete markers during push This fixes similar errors as in 01e8eefd9434: TypeError: '<' not supported between instances of 'NoneType' and 'tuple'
Thu, 17 Oct 2019 13:30:58 +0200 exchange: extract a function to sort obsolete markers
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 13:30:58 +0200] rev 43277
exchange: extract a function to sort obsolete markers Follows up on changeset 01e8eefd9434, several other occurrences of sorted() need to be fixed. The _sortedmarkers() handles sorting obsmarkers with a None value as last element on Python 3.
Thu, 17 Oct 2019 12:10:42 +0200 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 12:10:42 +0200] rev 43276
py3: encode underlying error message during parse error of %include
Fri, 11 Oct 2019 18:08:50 +0100 convert: convert os.devnull to bytes before trying to join it with other bytes
Ian Moody <moz-ian@perix.co.uk> [Fri, 11 Oct 2019 18:08:50 +0100] rev 43275
convert: convert os.devnull to bytes before trying to join it with other bytes Together with the previous commit relating to emailparser this gets test-convert-tla.t passing under py3. Differential Revision: https://phab.mercurial-scm.org/D7062
Wed, 16 Oct 2019 20:34:56 +0200 rust-dirstate-status: add call to rust-fast path for `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2019 20:34:56 +0200] rev 43274
rust-dirstate-status: add call to rust-fast path for `dirstate.status` The reasoning behind this patch is explained in the first patch of the series. Differential Revision: https://phab.mercurial-scm.org/D7060
Tue, 08 Oct 2019 08:45:55 +0200 rust-dirstate-status: rust-cpython bindings for `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Tue, 08 Oct 2019 08:45:55 +0200] rev 43273
rust-dirstate-status: rust-cpython bindings for `dirstate.status` The ref-sharing mechanism has improved, but its ergonomics still left a bit to be desired, as expected. Differential Revision: https://phab.mercurial-scm.org/D7059
Tue, 15 Oct 2019 21:26:56 +0200 rust-refsharing: add missing lifetime parameter in ref_sharing
Raphaël Gomès <rgomes@octobus.net> [Tue, 15 Oct 2019 21:26:56 +0200] rev 43272
rust-refsharing: add missing lifetime parameter in ref_sharing Differential Revision: https://phab.mercurial-scm.org/D7110
Fri, 11 Oct 2019 13:39:57 +0200 rust-dirstate-status: add first Rust implementation of `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Fri, 11 Oct 2019 13:39:57 +0200] rev 43271
rust-dirstate-status: add first Rust implementation of `dirstate.status` Note: This patch also added the rayon crate as a Cargo dependency. It will help us immensely in making Rust code parallel and easy to maintain. It is a stable, well-known, and supported crate maintained by people on the Rust team. The current `dirstate.status` method has grown over the years through bug reports and new features to the point where it got too big and too complex. This series does not yet improve the logic, but adds a Rust fast-path to speed up certain cases. Tested on mozilla-try-2019-02-18 with zstd compression: - `hg diff` on an empty working copy: - c: 1.64(+-)0.04s - rust+c before this change: 2.84(+-)0.1s - rust+c: 849(+-)40ms - `hg commit` when creating a file: - c: 5.960s - rust+c before this change: 5.828s - rust+c: 4.668s - `hg commit` when updating a file: - c: 4.866s - rust+c before this change: 4.371s - rust+c: 3.855s - `hg status -mard` - c: 1.82(+-)0.04s - rust+c before this change: 2.64(+-)0.1s - rust+c: 896(+-)30ms The numbers are clear: the current Rust `dirstatemap` implementation is super slow, its performance needs to be addressed. This will be done in a future series, immediately after this one, with the goal of getting Rust to be at least to the speed of the Python + C implementation in all cases before the 5.2 freeze. At worse, we gate dirstatemap to only be used in those cases. Cases where the fast-path is not executed: - for commands that need ignore support (`status`, for example) - if subrepos are found (should not be hard to add, but winter is coming) - any other matcher than an `alwaysmatcher`, like patterns, etc. - with extensions like `sparse` and `fsmonitor` The next step after this is to rethink the logic to be closer to Jane Street's Valentin Gatien-Baron's Rust fast-path which does a lot less work when possible. Differential Revision: https://phab.mercurial-scm.org/D7058
Sun, 06 Oct 2019 20:18:54 +0300 share: unmark --relative as EXPERIMENTAL
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 06 Oct 2019 20:18:54 +0300] rev 43270
share: unmark --relative as EXPERIMENTAL Differential Revision: https://phab.mercurial-scm.org/D7001
Mon, 30 Sep 2019 16:31:53 -0400 rust-cpython: removed now useless py_set() conversion
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Sep 2019 16:31:53 -0400] rev 43269
rust-cpython: removed now useless py_set() conversion In rust-cpython 0.3.0, HashSets implement the appropriate ToPythonObject, we can therefore get rid of this hacky conversion. There still remains an inefficiency in `MissingAncestors.bases()`: we have to clone, because `to_py_object()` requires full ownership. However: - the only use case outside of unit tests used to be from `setdiscovery.partialdiscovery` which is now fully implemented in Rust. - it's not worse than what `py_set()` used to do Differential Revision: https://phab.mercurial-scm.org/D7120
Tue, 15 Oct 2019 22:02:34 -0400 tests: stabilize test-eol-update on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2019 22:02:34 -0400] rev 43268
tests: stabilize test-eol-update on Windows These appeared in the recent eol fix series. I'm not sure about the identity mismatch warning- it seems like a general timing issue, because it happened on the first run but not when run with `--loop`. The buildbot also flagged this. Differential Revision: https://phab.mercurial-scm.org/D7112
Tue, 15 Oct 2019 21:51:37 -0400 tests: opt into python3 when testing virtualenv installation
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2019 21:51:37 -0400] rev 43267
tests: opt into python3 when testing virtualenv installation Otherwise it complains that Mercurial requires '~=2.7'. Since the existing linux py3 test doesn't flag this, I'm assuming that virtualenv simply isn't installed on that system. Differential Revision: https://phab.mercurial-scm.org/D7111
Sun, 06 Oct 2019 15:17:34 +0530 grep: put --diff in the first line of usage
Navaneeth Suresh <navaneeths1998@gmail.com> [Sun, 06 Oct 2019 15:17:34 +0530] rev 43266
grep: put --diff in the first line of usage Differential Revision: https://phab.mercurial-scm.org/D7003
Thu, 12 Sep 2019 03:40:54 +0200 ui: option to preserve the progress bar
Joerg Sonnenberger <joerg@bec.de> [Thu, 12 Sep 2019 03:40:54 +0200] rev 43265
ui: option to preserve the progress bar Some interface like the fast-import format of git are meant for pipe processing. It can be still desirable to have progress bars in this case, but clearing the bar after each output operation is not desirable. Differential Revision: https://phab.mercurial-scm.org/D6843
Thu, 10 Oct 2019 22:11:39 +0100 phabricator: update hgmatcher to cope with the new data format
Ian Moody <moz-ian@perix.co.uk> [Thu, 10 Oct 2019 22:11:39 +0100] rev 43264
phabricator: update hgmatcher to cope with the new data format The new conduit format can't be matched by the existing matcher since it shifts all the data into an urlencoded string of JSON, the order of which isn't stable between runs. Instead detect JSON values of params and load them into python dicts, which python will then naturally deep-equal compare. Differential Revision: https://phab.mercurial-scm.org/D7055
Thu, 10 Oct 2019 22:05:28 +0100 phabricator: treat non-utf-8 text files as binary as phabricator requires
Ian Moody <moz-ian@perix.co.uk> [Thu, 10 Oct 2019 22:05:28 +0100] rev 43263
phabricator: treat non-utf-8 text files as binary as phabricator requires Phabricator can't cope with text files that are not UTF-8, so requires them to be submitted as binary files instead. This has the unfortunate effect of making them practically unreviewable in Phabricator since it will only display the separate versions of the file in other views, not a diff. `phabread`ing such submissions are similar, since it will just output the binary patch, but `hg import` copes with it fine and `hg diff` afterwards will show the actual changes. It is still a marked improvement over trying to submit them as text, which just leads to corruption (Phabricator will either output ? or HTML entities for non-UTF-8 characters, depending on context). Running decode on the whole file like this seems slightly unfortunate, but I'm not aware of a better way. Needs to be done to p1() version as well to detect conversions to UTF-8. Differential Revision: https://phab.mercurial-scm.org/D7054
Sun, 06 Oct 2019 18:23:06 +0100 phabricator: switch to the creatediff endpoint
Ian Moody <moz-ian@perix.co.uk> [Sun, 06 Oct 2019 18:23:06 +0100] rev 43262
phabricator: switch to the creatediff endpoint This lets the extension submit binary files, as well as set branch info so that it is exposed in the Phabricator interface. Differential Revision: https://phab.mercurial-scm.org/D7053
Sun, 06 Oct 2019 18:21:01 +0100 phabricator: change conduit data format to match arcanist
Ian Moody <moz-ian@perix.co.uk> [Sun, 06 Oct 2019 18:21:01 +0100] rev 43261
phabricator: change conduit data format to match arcanist The existing form isn't handled well by Phabricator for certain data types. Differential Revision: https://phab.mercurial-scm.org/D7052
Thu, 10 Oct 2019 18:44:58 +0100 phabricator: remove tests and all recordings
Ian Moody <moz-ian@perix.co.uk> [Thu, 10 Oct 2019 18:44:58 +0100] rev 43260
phabricator: remove tests and all recordings The next commit is going to change the format of conduit API requests so none of the VCR recordings will match and all the tests will fail. Differential Revision: https://phab.mercurial-scm.org/D7051
Sat, 12 Oct 2019 14:41:59 +0100 phabricator: convert phabhunk and phabchange keys to bytes when finalising
Ian Moody <moz-ian@perix.co.uk> [Sat, 12 Oct 2019 14:41:59 +0100] rev 43259
phabricator: convert phabhunk and phabchange keys to bytes when finalising I thought I had included this code already but I'd missed it out. One of the disadvantages of attrs is that all the keys are unicode strings on py3, but we need them to be byte strings. Differential Revision: https://phab.mercurial-scm.org/D7066
Sun, 06 Oct 2019 17:21:26 +0100 phabricator: add addadded function
Ian Moody <moz-ian@perix.co.uk> [Sun, 06 Oct 2019 17:21:26 +0100] rev 43258
phabricator: add addadded function This is the most complicated part of the new code, and is responsible for adding all added files, whether brand new, copied, or moved. This also includes creating the phabchanges for the original files that have been moved or copied from, since they might need their awayPaths and type updating if multiple copies are involved. Differential Revision: https://phab.mercurial-scm.org/D7050
Wed, 02 Oct 2019 17:53:47 -0400 sidedatacopies: directly fetch copies information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 02 Oct 2019 17:53:47 -0400] rev 43257
sidedatacopies: directly fetch copies information from sidedata When using the sidedata mode, we don't need a complicated and expensive `context` object. Instead we directly fetch copies information from the sidedata (through a changelogrevision object). More optimisations coming. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 filelog: ! wall 3.679613 comb 3.680000 user 3.580000 sys 0.100000 (median of 3) base: ! wall 8.884369 comb 8.880000 user 8.850000 sys 0.030000 (median of 3) before: ! wall 4.681985 comb 4.680000 user 4.640000 sys 0.040000 (median of 3) after: ! wall 3.955894 comb 3.950000 user 3.940000 sys 0.010000 (median of 3) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 filelog: ! wall 0.003357 comb 0.010000 user 0.010000 sys 0.000000 (median of 781) base: ! wall 12.398524 comb 12.400000 user 12.330000 sys 0.070000 (median of 3) before: ! wall 6.459592 comb 6.470000 user 6.390000 sys 0.080000 (median of 3) after: ! wall 5.505774 comb 5.500000 user 5.410000 sys 0.090000 (median of 3) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 filelog: ! wall 2.754687 comb 2.760000 user 2.650000 sys 0.110000 (median of 4) base: ! wall 1.423166 comb 1.420000 user 1.400000 sys 0.020000 (median of 8) before: ! wall 0.961048 comb 0.960000 user 0.940000 sys 0.020000 (median of 11) after: ! wall 0.882950 comb 0.880000 user 0.880000 sys 0.000000 (median of 11) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f filelog: ! wall 1.552293 comb 1.550000 user 1.510000 sys 0.040000 (median of 6 base: ! wall 0.022662 comb 0.020000 user 0.020000 sys 0.000000 (median of 128) before: ! wall 0.021649 comb 0.020000 user 0.020000 sys 0.000000 (median of 135) after: ! wall 0.020951 comb 0.020000 user 0.020000 sys 0.000000 (median of 141) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 filelog: ! wall 1.500983 comb 1.500000 user 1.420000 sys 0.080000 (median of 7) base: ! wall 0.006956 comb 0.010000 user 0.010000 sys 0.000000 (median of 392) before: ! wall 0.004022 comb 0.000000 user 0.000000 sys 0.000000 (median of 735) after: ! wall 0.003988 comb 0.000000 user 0.000000 sys 0.000000 (median of 736) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e filelog: ! wall 0.011745 comb 0.020000 user 0.020000 sys 0.000000 (median of 250) base: ! wall 0.000156 comb 0.000000 user 0.000000 sys 0.000000 (median of 17180) before: ! wall 0.000118 comb 0.000000 user 0.000000 sys 0.000000 (median of 19170) after: ! wall 0.000097 comb 0.000000 user 0.000000 sys 0.000000 (median of 27276) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe filelog: ! wall 3.228230 comb 3.230000 user 3.110000 sys 0.120000 (median of 4) base: ! wall 0.997640 comb 1.000000 user 0.980000 sys 0.020000 (median of 10) before: ! wall 0.679500 comb 0.680000 user 0.680000 sys 0.000000 (median of 15) after: ! wall 0.596779 comb 0.600000 user 0.600000 sys 0.000000 (median of 17) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d filelog: ! wall 1.052501 comb 1.060000 user 1.040000 sys 0.020000 (median of 10 base: ! wall 0.214519 comb 0.220000 user 0.220000 sys 0.000000 (median of 45) before: ! wall 0.149675 comb 0.150000 user 0.150000 sys 0.000000 (median of 66) after: ! wall 0.130786 comb 0.130000 user 0.130000 sys 0.000000 (median of 75) Differential Revision: https://phab.mercurial-scm.org/D7072
(0) -30000 -10000 -3000 -1000 -480 +480 +1000 +3000 tip