Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 16:17:02 +0200] rev 42683
byteify-strings: add cli argument to handle `attr*()` when they are methods
Certain code bases have useful utils that wrap the builtin functions, and are
called like `util.setattr`.
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 21 Jun 2019 03:50:40 +0200] rev 42682
bookmarks: actual fix for race condition deleting bookmark
This is a simple but efficient fix to prevent the issue tested in
`test-bookmarks-corner-case.t`. It might be worth pursuing a more generic
approach where filecache learn to depend on each other, but that would not be
suitable for stable.
The issue is complicated enough that I documented the race and its current
solution as inline comment. See this comment for details on the fix.
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2019 16:22:47 +0200] rev 42681
strip: access bookmark before getting a reference to changelog
Bookmark access might invalidate the current changelog (to make sure both are in
a reasonable synchronisation state). So we should grab the reference to
changelog after we access bookmark. Otherwise we risk using a dead object for
the whole strip process.
(note: this dead object business probably requires a new layers of checking)
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Aug 2019 15:59:52 +0200] rev 42680
test: use a more verbose output in the test
While debugging some test failure, I released the test never checks if the
relevant changesets were preserved. So I am updating the test from `hg parents`
usage to `hg log -G` with a special template. This increase the area covered by
the test and clarify the test failures.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 16:14:00 +0200] rev 42679
byteify-strings: simplify default value for `--treat-as-kwargs`
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 10:18:22 +0200] rev 42678
byteify-strings: add --treat-as-kwargs argument to handle kwargs-like objects
This argument will help extensions move to Python 3 as keyword arguments
should not be byte-prefixed. Most of the time, code bases will call this
object `kwargs`, but other conventions exist like `opts`, so it should make
sense to allow for custom names.
This is a best effort solution that does minimal static checking; cases like
`options = [o for o in ('a', 'b', 'c') if kwargs.get(o)]`
and other just as complicated will not be detected.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 10:10:23 +0200] rev 42677
byteify-strings: add helpers to check for item access or method call
These helpers will be used in a future patch, split for ease of review.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:55:32 +0200] rev 42676
byteify-strings: add support for ignore comments
Our simple token analysis is sometimes not clever enough, we need to be able
to turn off our script for parts of the code.
This change introduces three special comments:
- `#no-py3-transform` to tell `byteify-strings` ignore the next line
- `#py3-transform: off` to ignore everything until the end of the file
- `#py3-transform: on` to stop ignoring
The last two can be particularly useful within Python 2/3 compatibility files.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:48:13 +0200] rev 42675
byteify-strings: handle triple quoted strings if they are not docstrings
As with anything in this script, this is a best effort approach. Most of the
time, when a triple quoted string is assigned to something, it's not a
docstring.
Raphaël Gomès <rgomes@octobus.net> [Fri, 02 Aug 2019 09:44:11 +0200] rev 42674
byteify-strings: handle multi-line strings in _ensuresysstr
The current implementation did not handle calls like
`repo.ui.log("first line"
"other line")`
correctly.
Danny Hooper <hooper@google.com> [Wed, 22 May 2019 16:22:06 -0700] rev 42673
fix: run fixer tools in the repo root as cwd so they can use the working copy
This lets fixer tools do things like find configuration files, with the caveat
that they'll only see the version of that file in the working copy, regardless
of what revisions are being fixed.
Differential Revision: https://phab.mercurial-scm.org/D6440
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 01 Aug 2019 22:03:52 +0530] rev 42672
config: add defaultvalue template keyword
This patch tries to fix one of the issues mentioned in
issue6014.
This adds a new `defaultvalue` template keyword to be used with
`hg showconfig` to get the default value of the config item.
Differential Revision: https://phab.mercurial-scm.org/D6704
Augie Fackler <augie@google.com> [Thu, 01 Aug 2019 12:23:07 -0400] rev 42671
merge with stable
Raphaël Gomès <rgomes@octobus.net> [Tue, 23 Jul 2019 11:12:36 +0200] rev 42670
module-policy: update rust extension import to use the new module policy
Differential Revision: https://phab.mercurial-scm.org/D6677
Martin von Zweigbergk <martinvonz@google.com> [Sun, 21 Jul 2019 07:59:16 -0700] rev 42669
transaction: leave unfinished without crashing when not properly released
I think the transaction.__del__ is there just as a last resort in case
we (or an extension) forgot to release the transaction. When that
happens, the repo can (or will on Python 3?) get deleted before the
transaction. This leads to a crash in test-devel-warnings.t on Python
3 because we tried to access repo.dirstate, where repo was retried
from a weak reference. There's not much we can do here, but let's at
least avoid the crash. The user will have run `hg recover` afterwards
regardless.
Differential Revision: https://phab.mercurial-scm.org/D6664
Navaneeth Suresh <navaneeths1998@gmail.com> [Tue, 30 Jul 2019 21:36:15 +0530] rev 42668
unshelve: add abort on using continue and interactive together
`unshelve --continue --interactive` will not work as expected by the
user as the mode of in-progress unshelve is preserved and cannot be
overwritten. This patch makes `unshelve` to throw an error on using
both `--continue` and `--interactive` together with `unshelve`.
Differential Revision: https://phab.mercurial-scm.org/D6703
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 29 Jul 2019 13:22:52 +0300] rev 42667
py3: add one more test to list of passing tests
Found by buildbot.
Differential Revision: https://phab.mercurial-scm.org/D6702
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 29 Jul 2019 13:25:05 +0300] rev 42666
tests: sort imports in test-bookmarks-corner-case.t
test-check-module-imports.t breaks on py3 without this change.
Differential Revision: https://phab.mercurial-scm.org/D6701
Augie Fackler <raf@durin42.com> [Thu, 01 Aug 2019 12:14:52 -0400] rev 42665
Added signature for changeset
e91930d712e8
Augie Fackler <raf@durin42.com> [Thu, 01 Aug 2019 12:14:50 -0400] rev 42664
Added tag 5.1 for changeset
e91930d712e8
Danny Hooper <hooper@google.com> [Fri, 26 Jul 2019 10:47:06 -0700] rev 42663
fix: add some new test cases
These cover a couple of behaviors we were testing at Google that weren't
covered here before.
Differential Revision: https://phab.mercurial-scm.org/D6698
Navaneeth Suresh <navaneeths1998@gmail.com> [Wed, 24 Jul 2019 00:44:12 +0530] rev 42662
unshelve: store information about interactive mode in shelvedstate
This is a follow-up patch to
5162753c4c14. This makes `unshelve`
stores the information about interactive mode on conflicts.
Differential Revision: https://phab.mercurial-scm.org/D6679
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 28 Jul 2019 18:32:31 -0700] rev 42661
automation: execute powershell when connecting
For some reason, the ability to execute PS scripts appears to
come online after the ability to execute regular command scripts.
This is creating race conditions when connecting to instances
resulting in our wait_for_winrm() returning before PS is available
leading to an exception being thrown in other code.
Let's change the client connection code to execute a minimal
PS script so we can try to trap the exception in wait_for_winrm().
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 28 Jul 2019 18:16:08 -0700] rev 42660
automation: allow exit code of 1 for `hg push`
`hg push` exits 1 for no-ops. No-op pushes should be fine in the
context of automation.