Sun, 31 Mar 2019 16:27:10 +0300 branchmap: implement __contains__()
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 31 Mar 2019 16:27:10 +0300] rev 42113
branchmap: implement __contains__() We have good occurences of `if branch in branchmap()` in our code. If __contains__() is not implemented then it will use __iter__() to find whether the element exists or not which is not good. I am bit confused that whether I should move existing callers to hasbranch() or this patch is a good way. Differential Revision: https://phab.mercurial-scm.org/D6206
Sun, 31 Mar 2019 16:20:17 +0300 branchmap: prevent using __getitem__() in branchheads()
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 31 Mar 2019 16:20:17 +0300] rev 42112
branchmap: prevent using __getitem__() in branchheads() branchheads() can directly use self._entries instead. Differential Revision: https://phab.mercurial-scm.org/D6205
Wed, 27 Mar 2019 21:33:04 +0300 branchmap: dynamically resolve type of branchcache class
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 27 Mar 2019 21:33:04 +0300] rev 42111
branchmap: dynamically resolve type of branchcache class This is required to support subclassing. Thanks to Yuya for suggesting this in D6151. Differential Revision: https://phab.mercurial-scm.org/D6204
Fri, 12 Apr 2019 09:41:08 -0700 copies: print list of divergent renames in sorted order
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 Apr 2019 09:41:08 -0700] rev 42110
copies: print list of divergent renames in sorted order The current order is not obvious to the user (and I may change it in a later patch). Lexicographical order seems like the obvious choice here. Differential Revision: https://phab.mercurial-scm.org/D6227
Fri, 12 Apr 2019 12:20:38 -0400 import: suppress accept: header
timeless <timeless@mozdev.org> [Fri, 12 Apr 2019 12:20:38 -0400] rev 42109
import: suppress accept: header irccloud and others may perform content negotation and reject (406) if the accept header does not match the mime type of the object
Fri, 12 Apr 2019 12:06:13 -0400 rebase: fix bug that prevented dry-run rebases from printing failures
Augie Fackler <augie@google.com> [Fri, 12 Apr 2019 12:06:13 -0400] rev 42108
rebase: fix bug that prevented dry-run rebases from printing failures As far as I can tell it should be fine to unconditionally skip _prepareabortorcontinue if we're in the process of raising an Abort here. Differential Revision: https://phab.mercurial-scm.org/D6226
Fri, 12 Apr 2019 11:41:33 -0400 rebase: demonstrate bug in dry-run mode which causes cycles to not be reported
Augie Fackler <augie@google.com> [Fri, 12 Apr 2019 11:41:33 -0400] rev 42107
rebase: demonstrate bug in dry-run mode which causes cycles to not be reported Differential Revision: https://phab.mercurial-scm.org/D6225
Sat, 06 Apr 2019 17:48:11 +0200 test: minor cleanup to test-server-view.t
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 06 Apr 2019 17:48:11 +0200] rev 42106
test: minor cleanup to test-server-view.t While looking into adding error output in this test, I did some cleanup.
Sat, 06 Apr 2019 10:44:22 +0200 repoview: improve documentation for `repo.filtered` method
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 06 Apr 2019 10:44:22 +0200] rev 42105
repoview: improve documentation for `repo.filtered` method I am sitting next to Joerg Sonnenberger and we are discussion his experience with repoview. This first effect of this discussion is this documentation clarification.
Fri, 05 Apr 2019 14:30:52 -0400 revset: short docstring for checkstatus
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 05 Apr 2019 14:30:52 -0400] rev 42104
revset: short docstring for checkstatus This is where all the action happens for the status-related revsets, and a little documentation doesn't hurt.
Thu, 11 Apr 2019 18:10:07 +0200 discovery: stop direct use of attribute of partialdiscovery
Georges Racinet <georges.racinet@octobus.net> [Thu, 11 Apr 2019 18:10:07 +0200] rev 42103
discovery: stop direct use of attribute of partialdiscovery Instead of accessing `undecided` directly for ui display purposes, we introduce a `stats()` method that could be extended in the future with more interesting information. This is in preparation for a forthcoming Rust version of this object. Indeed, attributes and furthermore properties are a bit complicated for classes in native code. We could go further and rename `undecided` to mark it private, but `_undecided` is already taken as support for `_undecided` lazyness.
Wed, 10 Apr 2019 17:36:37 -0700 overlayworkingctx: remove misleading trailing slash from directory pattern
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Apr 2019 17:36:37 -0700] rev 42102
overlayworkingctx: remove misleading trailing slash from directory pattern The paths passed into the matcher are normalized (this applies to include patterns and regular patterns, and to both glob kind and path kind), so the regex for input "foo/" ended up being "foo(?:/|$)". Once we have a (recursive) pattern kind only for directories, we could switch to that here and remove the "mfiles[0] == path" check. Until then, let's at least make it not misleading. Differential Revision: https://phab.mercurial-scm.org/D6224
Wed, 10 Apr 2019 17:31:32 -0700 overlayworkingctx: fix file/dir audit to be repo-relative
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Apr 2019 17:31:32 -0700] rev 42101
overlayworkingctx: fix file/dir audit to be repo-relative Before this patch, test-rebase-inmemory.t would stop erroring out about the conflict if you added a "cd a" before line 252. That was because a glob matcher (which are relative) was unintentionally used. That happened because the matcher was given "include" patterns (not regular patterns), and "include" patterns are always glob by default (i.e. unless you write them including the kind prefix). IOW, the "default='path'" argument passed to ctx.match() was ignored. Differential Revision: https://phab.mercurial-scm.org/D6223
Wed, 10 Apr 2019 16:26:40 -0700 messages: replace some instances of "folder" by "directory"
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Apr 2019 16:26:40 -0700] rev 42100
messages: replace some instances of "folder" by "directory" I'm pretty sure this is our preferred term. Differential Revision: https://phab.mercurial-scm.org/D6222
Thu, 11 Apr 2019 18:34:56 +0200 match: fix re2 compability broken in 2e2699af5649
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 11 Apr 2019 18:34:56 +0200] rev 42099
match: fix re2 compability broken in 2e2699af5649 When using re2, we call test_match() instead of match() on the compiled regex object. While match() returns a matcher object or None, test_match() returns True or False. So since 2e2699af5649 running test on a machine with a re2 install fails in many places. Instead we make the code a bit more general and everything goes back to normal.
Wed, 10 Apr 2019 03:10:53 +0530 py3: add b'' prefixes to new doctests in match.py
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 10 Apr 2019 03:10:53 +0530] rev 42098
py3: add b'' prefixes to new doctests in match.py # skip-blame as just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D6221
Wed, 10 Apr 2019 03:02:31 +0530 py3: add one new passing test found by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 10 Apr 2019 03:02:31 +0530] rev 42097
py3: add one new passing test found by buildbot Differential Revision: https://phab.mercurial-scm.org/D6220
Tue, 09 Apr 2019 21:59:37 +0900 cext: cast s# arguments of Py_BuildValue() to Py_ssize_t
Yuya Nishihara <yuya@tcha.org> [Tue, 09 Apr 2019 21:59:37 +0900] rev 42096
cext: cast s# arguments of Py_BuildValue() to Py_ssize_t The doc doesn't state that "s#" of Py_BuildValue() is controlled by PY_SSIZE_T_CLEAN (unlike the one for PyArg_ParseTuple()), but actually it's switched to Py_ssize_t. https://docs.python.org/2/c-api/arg.html#c.Py_BuildValue https://github.com/python/cpython/blob/2.7/Python/modsupport.c#L432 Follow up for b01bbb8ff1f2 and 896b19d12c08.
Mon, 08 Apr 2019 10:52:04 -0400 remotefilelog: correctly reject wdir filenodes
Augie Fackler <augie@google.com> [Mon, 08 Apr 2019 10:52:04 -0400] rev 42095
remotefilelog: correctly reject wdir filenodes This fixes `hg grep -r 'wdir()'` when remotefilelog is enabled and the working directory contains uncommitted modifications. Differential Revision: https://phab.mercurial-scm.org/D6217
Mon, 08 Apr 2019 10:56:55 -0400 remotefilelog: add tests of `hg grep -r 'wdir()'`
Augie Fackler <augie@google.com> [Mon, 08 Apr 2019 10:56:55 -0400] rev 42094
remotefilelog: add tests of `hg grep -r 'wdir()'` This demonstrates how remotefilelog breaks grepping dirtied working directories. A future change will introduce a fix. Differential Revision: https://phab.mercurial-scm.org/D6216
Wed, 03 Apr 2019 16:03:41 -0700 config: read configs from directories in lexicographical order
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Apr 2019 16:03:41 -0700] rev 42093
config: read configs from directories in lexicographical order Mercurial currently reads the .rc files specified in HGRCPATH (and the system-default paths) in directory order, which is unspecified. My team at work maintains a set of .rc files. So far there has been no overlap between them, so we had not noticed this behavior. However, we would now like to release some common .rc files and then have another one per plaform with platform-specific overrides. It would be nice if we can determine the load order by choosing names carefully. This patch enables that by loading the .rc files in lexicographical order. Before this patch, the added test case would consistently say "30" on my file system (whatever I have -- some Linux FS). Differential Revision: https://phab.mercurial-scm.org/D6193
Wed, 03 Apr 2019 17:41:58 -0700 remotefilelog: fix crash on `hg addremove` of added-but-deleted file
Martin von Zweigbergk <martinvonz@google.com> [Wed, 03 Apr 2019 17:41:58 -0700] rev 42092
remotefilelog: fix crash on `hg addremove` of added-but-deleted file If you `hg add` a file and then delete it from disk, and then run `hg addremove`, the file ends up in the "removed" set that gets passed to the findrenames() override. We then crash because the file is not in the working copy parent. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D6194
Fri, 05 Apr 2019 23:07:11 -0400 packaging: ensure that --python is an absolute path when building on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Apr 2019 23:07:11 -0400] rev 42091
packaging: ensure that --python is an absolute path when building on Windows For whatever reason, even though only python2 is on PATH, passing `python.exe` causes the later check that it's not py3 to bail out.
Fri, 05 Apr 2019 22:47:45 -0400 packaging: don't crash building wix with python3.6 and earlier
Matt Harbison <matt_harbison@yahoo.com> [Fri, 05 Apr 2019 22:47:45 -0400] rev 42090
packaging: don't crash building wix with python3.6 and earlier `capture_output` was added in 3.7. I was tempted to just check and abort in build.py, since Windows doesn't have the Linux problem where some distros only ship an older python. But this is in a library that could be used elsewhere in the future.
Wed, 03 Apr 2019 23:55:03 -0400 chistedit: add basic colours to diff view
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 03 Apr 2019 23:55:03 -0400] rev 42089
chistedit: add basic colours to diff view This isn't complete, and it would be nice to show the exact same colours that `hg diff` would show. That goal is too lofty, so this just shows some basic colours, on the premise that a little is better than nothing.
Fri, 05 Apr 2019 14:54:45 -0400 chistedit: use default curses colours
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 05 Apr 2019 14:54:45 -0400] rev 42088
chistedit: use default curses colours Terminals will define default colours (for example, white text on black background), but curses doesn't obey those default colours unless told to do so. Calling `curses.use_default_colors` makes curses obey the default terminal colours. One of the most obvious effects is that this allows transparency on terminals that support it. This also brings chistedit closer in appearance to crecord, which also uses default colours. The call may error out if the terminal doesn't support colors, but as far as I can tell, everything still works. If we need a more careful handling of lack of colours, blame me for not doing it now.
Sun, 07 Apr 2019 16:53:47 +0200 match: let regex match function return a boolean
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 16:53:47 +0200] rev 42087
match: let regex match function return a boolean Match function for regex pattern kind is built through _buildregexmatch() and _buildmatch() using _rematcher() that returns a re.match function, which either returns a match object or None. This does not conform to Mercurial's matcher interface for __call__() or exact(), which are expected to return a boolean value. We fix this by building a lambda around _rematcher() in _buildregexmatch(). Accordingly, we update doctest examples to remove bool() calls that are now useless.
Sun, 07 Apr 2019 17:16:58 +0200 match: make arguments of _expandsets() optional
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 17:16:58 +0200] rev 42086
match: make arguments of _expandsets() optional Arguments 'ctx', 'listsubrepos' and 'badfn' are optional in function body.
Sun, 07 Apr 2019 17:14:29 +0200 match: make _donormalize's auditor and warn arguments optional
Denis Laxalde <denis@laxalde.org> [Sun, 07 Apr 2019 17:14:29 +0200] rev 42085
match: make _donormalize's auditor and warn arguments optional Argument 'warn' is actually non-required, since there's a 'if warn:' check before usage. Argument 'auditor' is passed to pathutil.canonpath(), in which it is optional.
Mon, 08 Apr 2019 09:34:50 +0200 match: add doctest examples in match()
Denis Laxalde <denis@laxalde.org> [Mon, 08 Apr 2019 09:34:50 +0200] rev 42084
match: add doctest examples in match() Make the docstring raw, as it now includes escape characters.
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip