Mon, 11 Jun 2018 19:05:41 +0200 perftemplating: abort on incompatible version
Boris Feld <boris.feld@octobus.net> [Mon, 11 Jun 2018 19:05:41 +0200] rev 38285
perftemplating: abort on incompatible version This is what the other debug commands do. Thanks to Yuya Nishihara for pointing this out.
Tue, 05 Jun 2018 21:40:33 +0900 templater: fix string representation of wrapped None
Yuya Nishihara <yuya@tcha.org> [Tue, 05 Jun 2018 21:40:33 +0900] rev 38284
templater: fix string representation of wrapped None flatten() and stringify() skip None, which means wrappedvalue(None).show() must return '' instead of 'None'. This isn't a problem right now, but we'll encounter it once we start using wrapped types extensively.
Fri, 08 Jun 2018 20:57:54 +0900 templater: show slightly better hint on map operation error
Yuya Nishihara <yuya@tcha.org> [Fri, 08 Jun 2018 20:57:54 +0900] rev 38283
templater: show slightly better hint on map operation error It was super hard to find where the templater went wrong if a keyword was evaluated to '' or None.
Wed, 21 Mar 2018 12:28:12 +0900 templater: inline unwraphybrid()
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:28:12 +0900] rev 38282
templater: inline unwraphybrid() flatten() is the solo user of this function.
Mon, 19 Mar 2018 00:26:55 +0900 templater: drop hybrid-ness on unwrapvalue()
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:26:55 +0900] rev 38281
templater: drop hybrid-ness on unwrapvalue() Proxy methods are no longer necessary as list/dict functions go through the wrapped interface.
Fri, 23 Mar 2018 22:31:58 +0900 templater: mark .keytype as a private attribute
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Mar 2018 22:31:58 +0900] rev 38280
templater: mark .keytype as a private attribute
Mon, 19 Mar 2018 00:23:20 +0900 templater: abstract ifcontains() over wrapped types
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:23:20 +0900] rev 38279
templater: abstract ifcontains() over wrapped types This allows us to make .keytype private. There's a minor BC that a hybrid dict/list of keytype=None now strictly checks the type of the needle. For example, {ifcontains(rev, files)} no longer matches a file named "1" at the rev=1. I made this change for consistency with the get(dict, key) function. We can restore the old behavior by making keytype=bytes the default if desired.
Wed, 21 Mar 2018 12:06:18 +0900 templater: inline wraphybridvalue()
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 12:06:18 +0900] rev 38278
templater: inline wraphybridvalue() All wraphybridvalue() calls are now handled in the hybrid class.
Mon, 19 Mar 2018 00:16:12 +0900 templater: abstract min/max away
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 00:16:12 +0900] rev 38277
templater: abstract min/max away I'm not certain how many get*() functions I'll add to the wrapped types, but getmin() and getmax() will allow us to optimize a revset wrapper.
Sun, 10 Jun 2018 12:24:53 +0900 stringutil: fix prettyrepr() to not orphan foo=<...> line
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 12:24:53 +0900] rev 38276
stringutil: fix prettyrepr() to not orphan foo=<...> line
Sun, 10 Jun 2018 11:55:52 +0900 debugwalk: pretty-print nested matcher
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:55:52 +0900] rev 38275
debugwalk: pretty-print nested matcher While porting filesets to composition of matchers, I found the original one-liner was hard to read.
Sun, 10 Jun 2018 11:53:56 +0900 debugwalk: show matcher output only if -v/--verbose
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:53:56 +0900] rev 38274
debugwalk: show matcher output only if -v/--verbose And drop "egrep -v". This matches the behavior of "hg debugrevspec".
Sun, 10 Jun 2018 11:50:09 +0900 stringutil: promote smartset.prettyformat() to utility function
Yuya Nishihara <yuya@tcha.org> [Sun, 10 Jun 2018 11:50:09 +0900] rev 38273
stringutil: promote smartset.prettyformat() to utility function It will be used by debugwalk.
Fri, 01 Jun 2018 17:27:58 +0200 profiling: introduce a "profiling.time-track" option
Boris Feld <boris.feld@octobus.net> [Fri, 01 Jun 2018 17:27:58 +0200] rev 38272
profiling: introduce a "profiling.time-track" option This option allows to switch the time used by the statistical profiler from cpu to real time. Our goal is to profile IO intensive operations using the mercurial profiler.
Fri, 01 Jun 2018 11:23:27 +0200 statprof: also gather wall time
Boris Feld <boris.feld@octobus.net> [Fri, 01 Jun 2018 11:23:27 +0200] rev 38271
statprof: also gather wall time Gathering wall time information is useful for operations that are IO (files, network) intensive. For now we only expose it in the final summary.
Thu, 31 May 2018 19:34:08 +0200 perftemplating: allow to specify the template to test
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 19:34:08 +0200] rev 38270
perftemplating: allow to specify the template to test This is useful to test the evolution of rendering time for a given template.
Thu, 31 May 2018 19:23:04 +0200 perftemplating: stop going through the log command
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 19:23:04 +0200] rev 38269
perftemplating: stop going through the log command Only benchmark the rendering phase by moving steps outside of the timed function: * revisions resolution, * template parsing
Thu, 31 May 2018 18:48:08 +0200 perftemplating: move revision argument to flag only
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 18:48:08 +0200] rev 38268
perftemplating: move revision argument to flag only The revision we want to render are less important than the templates. We move revision specification behind the usual `--rev` flag.
Thu, 31 May 2018 18:43:15 +0200 perftemplating: drop usage of buffer
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 18:43:15 +0200] rev 38267
perftemplating: drop usage of buffer The buffer can consume a lot of memory and change various internal behaviors. Writing to dev/null seems more appropriate when it comes to benchmark.
Thu, 31 May 2018 17:31:46 +0200 perftemplating: move template formating into its own function
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 17:31:46 +0200] rev 38266
perftemplating: move template formating into its own function The lambda is not practical when time will come to alter the benchmark code.
Thu, 31 May 2018 18:05:15 +0200 perftemplating: fix the revisions argument
Boris Feld <boris.feld@octobus.net> [Thu, 31 May 2018 18:05:15 +0200] rev 38265
perftemplating: fix the revisions argument Before this change, the argument passed to log where a string instead of a list of string. This meant only single character rev were supported... We now properly accepts argument of any length. We also make it possible to specify multiple REV arguments in the same go.
Sat, 09 Jun 2018 15:14:31 +0530 py3: make sure util.username() always returns bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 09 Jun 2018 15:14:31 +0530] rev 38264
py3: make sure util.username() always returns bytes Differential Revision: https://phab.mercurial-scm.org/D3706
Sat, 09 Jun 2018 15:01:04 +0530 py3: add b'' prefix to make the regex bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 09 Jun 2018 15:01:04 +0530] rev 38263
py3: add b'' prefix to make the regex bytes # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3705
Tue, 05 Jun 2018 02:50:25 +0200 phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net> [Tue, 05 Jun 2018 02:50:25 +0200] rev 38262
phases: use "published" in the phase movement message Using "published" seems smoother than "became public" and more in line with the "phase.publishing" configuration.
Tue, 05 Jun 2018 01:49:52 +0200 phase: clarify the message about movement on command changeset
Boris Feld <boris.feld@octobus.net> [Tue, 05 Jun 2018 01:49:52 +0200] rev 38261
phase: clarify the message about movement on command changeset The current message is a bit generic. Since we only print it for phase movement on changeset already common before the pull, we add "local" to the message in and attempt to clarify what changeset the phase movement affected.
Sun, 29 Apr 2018 00:29:40 -0400 fuzz: try and generate an interesting mpatch seed from a repo
Augie Fackler <augie@google.com> [Sun, 29 Apr 2018 00:29:40 -0400] rev 38260
fuzz: try and generate an interesting mpatch seed from a repo Differential Revision: https://phab.mercurial-scm.org/D3697
Sun, 29 Apr 2018 00:04:16 -0400 fuzz: structured helpers for creating mpatch seed corpus entries
Augie Fackler <augie@google.com> [Sun, 29 Apr 2018 00:04:16 -0400] rev 38259
fuzz: structured helpers for creating mpatch seed corpus entries Maybe this is better. I'm not sold, honestly. Differential Revision: https://phab.mercurial-scm.org/D3696
Sat, 28 Apr 2018 22:35:14 -0400 fuzz: new fuzzer for the mpatch code
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 22:35:14 -0400] rev 38258
fuzz: new fuzzer for the mpatch code Differential Revision: https://phab.mercurial-scm.org/D3695
Thu, 07 Jun 2018 21:09:16 +0200 run-tests: follow-up on the test-case format
Boris Feld <boris.feld@octobus.net> [Thu, 07 Jun 2018 21:09:16 +0200] rev 38257
run-tests: follow-up on the test-case format It turns out the original regex doesn't support real test cases names like the one Mercurial is using. Update the regex to being able to precisely select them on the command line. Differential Revision: https://phab.mercurial-scm.org/D3699
Fri, 04 May 2018 12:43:15 +0900 templater: resolve type of dict key in getmember()
Yuya Nishihara <yuya@tcha.org> [Fri, 04 May 2018 12:43:15 +0900] rev 38256
templater: resolve type of dict key in getmember() This seems more correct and is consistent with the future wrapped.contains() function, where a key type has to be resolved depending on a container type.
Wed, 21 Mar 2018 11:30:21 +0900 templater: promote getmember() to an interface of wrapped types
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 11:30:21 +0900] rev 38255
templater: promote getmember() to an interface of wrapped types
Wed, 21 Mar 2018 01:39:44 +0900 templater: move getdictitem() to hybrid class
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 01:39:44 +0900] rev 38254
templater: move getdictitem() to hybrid class Since a raw dict will never be returned by evalwrapped(), we don't need to support d.get(key).
Sat, 21 Apr 2018 17:43:16 +0900 templater: add try-except stub to runmember()
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 17:43:16 +0900] rev 38253
templater: add try-except stub to runmember() New wrapped interface will raise ParseError if the underlying object doesn't support dict-like lookup operation.
Wed, 21 Mar 2018 01:18:29 +0900 templater: do dict lookup over a wrapped object
Yuya Nishihara <yuya@tcha.org> [Wed, 21 Mar 2018 01:18:29 +0900] rev 38252
templater: do dict lookup over a wrapped object Dict/list lookup operations will be moved to a wrapped interface so that a returned element can inherit hybrid-ness automatically. wraphybridvalue() will be inlined.
Wed, 06 Jun 2018 13:31:24 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 06 Jun 2018 13:31:24 -0400] rev 38251
merge with stable
Sat, 26 May 2018 03:01:14 +0530 graft: reuse the --log value passed initially in `hg graft --continue` (BC)
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 26 May 2018 03:01:14 +0530] rev 38250
graft: reuse the --log value passed initially in `hg graft --continue` (BC) We now stores the value of --log flag passed initially in the graftstate and reuse that value when doing `hg graft --continue` which is a nice behavior. The test updates demonstrate the fix. Since we now preserve the value by default, drop the mention of `--log` flag from the hint which we see after conflicts. Differential Revision: https://phab.mercurial-scm.org/D3662
Sat, 26 May 2018 02:57:36 +0530 graft: add test showing --continue not preserving --log passed earlier
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 26 May 2018 02:57:36 +0530] rev 38249
graft: add test showing --continue not preserving --log passed earlier This patch shows that when we do `hg graft --continue`, the value of --log flag passed when initial graft was run was not used. Next patch will fix this and tests will help us in realising that. Differential Revision: https://phab.mercurial-scm.org/D3661
Sun, 03 Jun 2018 13:40:58 +0900 test-fuzz-targets: look for clang-6.0 binary as well
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:40:58 +0900] rev 38248
test-fuzz-targets: look for clang-6.0 binary as well Debian sid is still shipped with clang 4.0 by default. This allows me to run the test without replacing the system clang to clang-6.0.
Sun, 03 Jun 2018 13:23:12 +0900 test-fuzz-targets: rebuild executable silently
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:23:12 +0900] rev 38247
test-fuzz-targets: rebuild executable silently This makes sure the build is not broken.
Sun, 03 Jun 2018 13:21:13 +0900 fuzz: fix "make clean" to pass even if no binaries built yet
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:21:13 +0900] rev 38246
fuzz: fix "make clean" to pass even if no binaries built yet
Sun, 03 Jun 2018 13:18:13 +0900 fuzz: compile xdiff.cc with -std=c++17
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:18:13 +0900] rev 38245
fuzz: compile xdiff.cc with -std=c++17 Otherwise the build would fail as follows: In file included from xdiff.cc:13: ./fuzzutil.h:23:10: fatal error: 'third_party/absl/types/optional.h' file not found #include "third_party/absl/types/optional.h"
Sun, 03 Jun 2018 13:12:32 +0900 fuzz: fix use of undeclared function memcpy()
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:12:32 +0900] rev 38244
fuzz: fix use of undeclared function memcpy()
Sun, 03 Jun 2018 13:11:49 +0900 fuzz: fix the default make target
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:11:49 +0900] rev 38243
fuzz: fix the default make target
Sun, 03 Jun 2018 13:11:22 +0900 fuzz: expand variables by make
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Jun 2018 13:11:22 +0900] rev 38242
fuzz: expand variables by make Otherwise it wouldn't work unless CC and CXX were exported from the environment.
Sat, 21 Apr 2018 17:21:31 +0900 templater: always map over a wrapped object
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 17:21:31 +0900] rev 38241
templater: always map over a wrapped object _checkeditermaps() is no longer necessary as the hgweb issue was resolved.
Sat, 21 Apr 2018 17:15:11 +0900 templater: consistently join() string-like object per character (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 17:15:11 +0900] rev 38240
templater: consistently join() string-like object per character (BC) The old behavior was copied from join() of a lazy generator string, which was unified to the behavior of join() of a byte string by the previous patch. This patch fixes the mappable type to do the same.
Sat, 21 Apr 2018 17:00:21 +0900 templater: always join() over a wrapped object (BC)
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 17:00:21 +0900] rev 38239
templater: always join() over a wrapped object (BC) This is a behavior change in a sense that join() of a byte string is no longer "implementation dependent." Before, if a byte string was backed by a lazy generator, join() would concatenate each chunk with the specified separator, which seems wrong. The new behavior is always join() each byte. TypeError on join() over uniterable is also fixed.
Tue, 20 Mar 2018 23:56:26 +0900 templater: add wrapped types for pure non-list/dict values
Yuya Nishihara <yuya@tcha.org> [Tue, 20 Mar 2018 23:56:26 +0900] rev 38238
templater: add wrapped types for pure non-list/dict values These wrapper types will allow us to get rid of some isinstance() business. A bytes object needs to support sequence-like operations (e.g. join(), ifcontains(), etc.) That's why we have two wrapper classes. Tests will be added later.
Wed, 04 Apr 2018 21:06:14 +0900 templater: unify unwrapvalue() with _unwrapvalue()
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 21:06:14 +0900] rev 38237
templater: unify unwrapvalue() with _unwrapvalue() All weird generators got removed from the hgweb codebase. We still have inconsistent behavior regarding join() of a byte string, which will be addressed later.
Wed, 04 Apr 2018 21:01:21 +0900 templater: inline unwrapvalue()
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 21:01:21 +0900] rev 38236
templater: inline unwrapvalue() The current unwrapvalue() will be superseded by _unwrapvalue(). Note that _unwrapvalue() can simply return thing.tovalue() if thing is a wrapped object. That's because tovalue() is guaranteed to not return a generator of strings.
Sun, 13 May 2018 23:18:26 +0200 run-tests: update the test case name format
Boris Feld <boris.feld@octobus.net> [Sun, 13 May 2018 23:18:26 +0200] rev 38235
run-tests: update the test case name format Manually typing parenthesis and spaces will be tedious when trying to launch a specific test case. I'm proposing a simpler format that is less hard to remember and type right. There was other possibilities envisaged like `::` or `!`, I think `#` is slight easier to type but I'm open to any suggestion on the new format. Differential Revision: https://phab.mercurial-scm.org/D3556
Thu, 26 Apr 2018 23:57:20 +0200 run-tests: add support for running specific test cases
Boris Feld <boris.feld@octobus.net> [Thu, 26 Apr 2018 23:57:20 +0200] rev 38234
run-tests: add support for running specific test cases Differential Revision: https://phab.mercurial-scm.org/D3555
Sun, 03 Jun 2018 17:02:38 +0530 configitems: drop the deprecated alias for commands.update.check
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Jun 2018 17:02:38 +0530] rev 38233
configitems: drop the deprecated alias for commands.update.check experimental.updatecheck was deprecated and should have been removed once 4.4 was released. Let's drop it now. Differential Revision: https://phab.mercurial-scm.org/D3679
Sat, 02 Jun 2018 15:55:28 +0530 graft: correct documentation about options can be reapplied
Sushil khanchi <sushilkhanchi97@gmail.com> [Sat, 02 Jun 2018 15:55:28 +0530] rev 38232
graft: correct documentation about options can be reapplied Now options --user and --date can be reapplied after we hit a conflict. Differential Revision: https://phab.mercurial-scm.org/D3678
Sat, 02 Jun 2018 22:18:12 -0400 cmdutil: use internal separators when building the terse list
Matt Harbison <matt_harbison@yahoo.com> [Sat, 02 Jun 2018 22:18:12 -0400] rev 38231
cmdutil: use internal separators when building the terse list Status uses internal separators, so this is more correct. See c974320d20b9 and 362096cfdb1f. A utility method is still needed, so that the paths starting with '/' aren't created when `self.path` is empty.
Wed, 30 May 2018 14:20:09 +0530 advanceboundary: add dryrun parameter
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 30 May 2018 14:20:09 +0530] rev 38230
advanceboundary: add dryrun parameter Added logic to find those csets whose phase will be changed (when running without --dryrun) while advancing boundary and return those csets. Differential Revision: https://phab.mercurial-scm.org/D3671
Wed, 30 May 2018 17:37:17 +0530 grep: enable passing wdir as a revision
Sangeet Kumar Mishra <mail2sangeetmishra@gmail.com> [Wed, 30 May 2018 17:37:17 +0530] rev 38229
grep: enable passing wdir as a revision When you pass wdir() to the -r flag, it catches the WdirUnsupported error and falls back to an alternate path. Differential Revision: https://phab.mercurial-scm.org/D3673
Fri, 01 Jun 2018 23:33:17 -0400 outgoing: drop an extraneous URL parse
Matt Harbison <matt_harbison@yahoo.com> [Fri, 01 Jun 2018 23:33:17 -0400] rev 38228
outgoing: drop an extraneous URL parse This was left over from dfb888aae17a. 'branches' wasn't used, and the only thing parseurl() would do is slice any branch fragment off 'dest'. But path.loc and path.pushloc already have the fragment removed.
Mon, 14 May 2018 12:38:05 +0200 config: rename allow_archive to allow-archive
David Demelier <markand@malikania.fr> [Mon, 14 May 2018 12:38:05 +0200] rev 38227
config: rename allow_archive to allow-archive As part of ConfigConsolidationPlan [1], rename the option according to the new UI guidelines [2] and add an alias for backward compatibility. [1]: https://www.mercurial-scm.org/wiki/ConfigConsolidationPlan [2]: https://www.mercurial-scm.org/wiki/UIGuideline#adding_new_options
Sat, 21 Apr 2018 17:31:03 +0900 hgweb: fill {rename} even if ?linerange is specified
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Apr 2018 17:31:03 +0900] rev 38226
hgweb: fill {rename} even if ?linerange is specified Otherwise, {rename % ...} would fail. Hopefully this is the last hgweb patch so I can start fixing templater stuff.
Wed, 04 Apr 2018 20:53:16 +0900 hgweb: wrap {earlycommands} and {othercommands} of help with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:53:16 +0900] rev 38225
hgweb: wrap {earlycommands} and {othercommands} of help with mappinggenerator They were generators of mappings.
Wed, 04 Apr 2018 20:51:49 +0900 hgweb: wrap {topics}es of help with mappinggenerator or mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:51:49 +0900] rev 38224
hgweb: wrap {topics}es of help with mappinggenerator or mappinglist The former 'topics' was a generator function, and the latter was a list of mappings.
Wed, 04 Apr 2018 20:48:37 +0900 hgweb: wrap {edges} of {nodes} of graph with mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:48:37 +0900] rev 38223
hgweb: wrap {edges} of {nodes} of graph with mappinglist This was a list of mappings.
Wed, 04 Apr 2018 20:48:00 +0900 hgweb: wrap {nodes} of graph with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:48:00 +0900] rev 38222
hgweb: wrap {nodes} of graph with mappinggenerator It was a generator of mappings, which shouldn't be put in template mappings.
Wed, 04 Apr 2018 20:46:12 +0900 hgweb: adapt {jsdata} of graph to mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:46:12 +0900] rev 38221
hgweb: adapt {jsdata} of graph to mappinggenerator The laziness is handled by the mappinggenerator class.
Wed, 04 Apr 2018 20:44:18 +0900 hgweb: wrap {nextentry} of graph with mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:44:18 +0900] rev 38220
hgweb: wrap {nextentry} of graph with mappinglist It's a 0/1-length list of a mapping.
Fri, 01 Jun 2018 23:02:36 +0900 setup: write version constant as bytes literal
Yuya Nishihara <yuya@tcha.org> [Fri, 01 Jun 2018 23:02:36 +0900] rev 38219
setup: write version constant as bytes literal Spotted while bulk-rewriting string literals to b''s.
Thu, 31 May 2018 18:53:28 +0800 spartan: don't show '[up]' in file view when in root directory already
Anton Shestakov <av6@dwimlabs.net> [Thu, 31 May 2018 18:53:28 +0800] rev 38218
spartan: don't show '[up]' in file view when in root directory already
Thu, 31 May 2018 18:39:35 +0800 monoblue: don't show '[up]' in file view when in root directory already
Anton Shestakov <av6@dwimlabs.net> [Thu, 31 May 2018 18:39:35 +0800] rev 38217
monoblue: don't show '[up]' in file view when in root directory already
Thu, 31 May 2018 18:33:49 +0800 gitweb: don't show '[up]' in file view when in root directory already
Anton Shestakov <av6@dwimlabs.net> [Thu, 31 May 2018 18:33:49 +0800] rev 38216
gitweb: don't show '[up]' in file view when in root directory already
Thu, 31 May 2018 18:01:54 +0800 paper: don't show '[up]' in file view when in root directory already
Anton Shestakov <av6@dwimlabs.net> [Thu, 31 May 2018 18:01:54 +0800] rev 38215
paper: don't show '[up]' in file view when in root directory already
Thu, 31 May 2018 16:52:02 +0800 spartan: add missing closing tags
Anton Shestakov <av6@dwimlabs.net> [Thu, 31 May 2018 16:52:02 +0800] rev 38214
spartan: add missing closing tags Browsers apparently don't care about this, but let's fix it for humans.
Fri, 20 Apr 2018 15:21:03 +0200 templatefilters: add commonprefix
Joerg Sonnenberger <joerg@bec.de> [Fri, 20 Apr 2018 15:21:03 +0200] rev 38213
templatefilters: add commonprefix The commonprefix filter takes a list of files names like files() and returns the longest directory name common to all elements. Differential Revision: https://phab.mercurial-scm.org/D3439
Sun, 20 May 2018 19:07:51 +0530 py3: add 3 new passing tests to whitelist
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 19:07:51 +0530] rev 38212
py3: add 3 new passing tests to whitelist We ave crossed the 500 mark! Differential Revision: https://phab.mercurial-scm.org/D3638
Thu, 24 May 2018 09:56:28 +0000 serve: add option print-url
Nicola Spanti <nicola.spanti@logilab.fr> [Thu, 24 May 2018 09:56:28 +0000] rev 38211
serve: add option print-url It can be used to open hgweb in a web browser. Example : xdg-open "`hg serve --print-url`". Differential Revision: https://phab.mercurial-scm.org/D3649
Sat, 26 May 2018 11:33:02 +0900 revlog: disallow setting uncompressed length to None
Yuya Nishihara <yuya@tcha.org> [Sat, 26 May 2018 11:33:02 +0900] rev 38210
revlog: disallow setting uncompressed length to None Backed out changeset a4942675de6b
Sat, 26 May 2018 11:31:51 +0900 unionrepo: fill in uncompressed length of revlog entry
Yuya Nishihara <yuya@tcha.org> [Sat, 26 May 2018 11:31:51 +0900] rev 38209
unionrepo: fill in uncompressed length of revlog entry It can be either -1 or a valid length, but shouldn't be None. IIUC, we can simply trust the length retrieved from the revlog to be overlaid. I don't bother thinking whether the compressed length can be copied as well. We'll need to fix it later.
Sun, 29 Apr 2018 19:48:16 -0400 fuzz: add clean target
Augie Fackler <augie@google.com> [Sun, 29 Apr 2018 19:48:16 -0400] rev 38208
fuzz: add clean target Differential Revision: https://phab.mercurial-scm.org/D3677
Mon, 30 Apr 2018 22:02:07 -0400 fuzzutil: make it possible to use absl when C++17 isn't supported
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:02:07 -0400] rev 38207
fuzzutil: make it possible to use absl when C++17 isn't supported Differential Revision: https://phab.mercurial-scm.org/D3676
Sat, 28 Apr 2018 22:18:50 -0400 fuzz: extract some common utilities and use modern C++ idioms
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 22:18:50 -0400] rev 38206
fuzz: extract some common utilities and use modern C++ idioms Alex Gaynor suggested we should probably copy the left and right sides of diffs to new blocks so we can detect over-reads in the diffing code, and I agree. Once I got into that, I realized we should do things with C++17 idioms rather than keep using malloc() and free(). This change is the result. I tried to split it more than this and failed. Everything still compiles and works in the oss-fuzz container, so I think we can count on C++17 being available! Differential Revision: https://phab.mercurial-scm.org/D3675
Sat, 28 Apr 2018 22:13:33 -0400 tests: update fuzzer tests to include both fuzzers
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 22:13:33 -0400] rev 38205
tests: update fuzzer tests to include both fuzzers Differential Revision: https://phab.mercurial-scm.org/D3674
Thu, 24 May 2018 12:19:50 +0200 transaction-summary: show phase changes statistics in pull/unbundle
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 May 2018 12:19:50 +0200] rev 38204
transaction-summary: show phase changes statistics in pull/unbundle Upon pull or unbundle, we display a message with the number of changesets which phase became public. Noticeably, this new message would appear even if no new changeset were added (below the "no changes found" message), thus indicating that something actually happened to the local repository.
Mon, 28 May 2018 01:36:34 -0400 outgoing: pay attention to `default:pushurl` for bookmarks and subrepos
Matt Harbison <matt_harbison@yahoo.com> [Mon, 28 May 2018 01:36:34 -0400] rev 38203
outgoing: pay attention to `default:pushurl` for bookmarks and subrepos The problem here was that `default:pushurl` and `default` get translated to a single entry in `ui.paths` named 'default', with an attribute for 'pushloc', 'loc', and 'rawloc'. ui.expandpath() then always takes the `rawloc` attribute. Maybe the ui.expandpath() API is busted and should be removed? Or maybe getpath() should return a copy that adds an attribute reflecting the URL of the path chosen? I thought that I could remove the code in hg._outgoing() and pass the location resolved in commands.py as `dest`, but unfortunately that code is needed there to resolve #branch type URLs. Maybe that should be pulled up to commands.py, because I can't see any reasonable behavior for a subrepo path that's constructed out of that type of URL. The push command already resolves this early, so that works properly. But it looks like bundle, histedit, largefiles, patchbomb, and summary use a similar pattern, so they are likely similarly affected.
Sat, 21 Apr 2018 17:27:57 +0200 revlog: make chainbase cache its result for the correct revision
Paul Morelle <paul.morelle@octobus.net> [Sat, 21 Apr 2018 17:27:57 +0200] rev 38202
revlog: make chainbase cache its result for the correct revision Previously, as 'rev' was our iterator, we were always caching the chain base for the second revision of the chain, or for the base itself.
Wed, 07 Mar 2018 11:10:22 +0100 revlog: make getcandidaterevs more consistent about updating tested revs set
Paul Morelle <paul.morelle@octobus.net> [Wed, 07 Mar 2018 11:10:22 +0100] rev 38201
revlog: make getcandidaterevs more consistent about updating tested revs set Like in previous cases, update the set of tested revisions after yielding
Mon, 26 Mar 2018 10:49:01 -0700 templatekw: make getrenamed() return only filename, not nodeid
Martin von Zweigbergk <martinvonz@google.com> [Mon, 26 Mar 2018 10:49:01 -0700] rev 38200
templatekw: make getrenamed() return only filename, not nodeid No callers cared about the nodeid and I want to make getrenamed() not look up the node (although it's currently free, I hope to store copy info in changesets and not include the nodeid). Differential Revision: https://phab.mercurial-scm.org/D3666
Sat, 26 May 2018 12:38:07 +0900 py3: wrap tempfile.NamedTemporaryFile() to return bytes fp.name
Yuya Nishihara <yuya@tcha.org> [Sat, 26 May 2018 12:38:07 +0900] rev 38199
py3: wrap tempfile.NamedTemporaryFile() to return bytes fp.name Unlike its name, tempfile.NamedTemporaryFile is not a class, so I renamed the pycompat version to look like a plain function. Since temp.name uses in the infinitepush extension aren't bytes-safe, this patch leaves them unmodified. Another weird thing is tempfile.mktemp(), which does not accept bytes suffix nor prefix. Sigh.
Sat, 26 May 2018 12:20:36 +0900 py3: wrap tempfile.mkdtemp() to use bytes path
Yuya Nishihara <yuya@tcha.org> [Sat, 26 May 2018 12:20:36 +0900] rev 38198
py3: wrap tempfile.mkdtemp() to use bytes path This also flips the default to use a bytes path on Python 3.
Sat, 26 May 2018 12:14:04 +0900 py3: wrap tempfile.mkstemp() to use bytes path
Yuya Nishihara <yuya@tcha.org> [Sat, 26 May 2018 12:14:04 +0900] rev 38197
py3: wrap tempfile.mkstemp() to use bytes path This patch just flips the default to use a bytes path on Python 3. ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
Thu, 03 May 2018 18:39:58 +0900 extensions: remove strip_init=True from _disabledpaths()
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 18:39:58 +0900] rev 38196
extensions: remove strip_init=True from _disabledpaths() It's no longer used.
Thu, 03 May 2018 18:38:02 +0900 extensions: peek command table of disabled extensions without importing
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 18:38:02 +0900] rev 38195
extensions: peek command table of disabled extensions without importing With chg where demandimport disabled, and if disk cache not warm, it took more than 5 seconds to get "unknown command" error when you typo a command name. This is horrible UX. The new implementation is less accurate than the original one as Python can do anything at import time and cmdtable may be imported from another module, but I think it's good enough. Note that the new implementation has to parse .py files, which is slightly slower than executing .pyc if demandimport is enabled.
Thu, 26 Apr 2018 23:00:19 -0400 lfs: clarify pointer validation error messages
Matt Harbison <matt_harbison@yahoo.com> [Thu, 26 Apr 2018 23:00:19 -0400] rev 38194
lfs: clarify pointer validation error messages It wasn't obvious that LFS was involved from the error messages when `hg verify` fails.
Tue, 22 May 2018 23:22:15 -0400 terse: pconvert() entries added to the temporary terse dict for Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 May 2018 23:22:15 -0400] rev 38193
terse: pconvert() entries added to the temporary terse dict for Windows Recent additional testing revealed this problem on Windows: --- tests/test-status.t.err +++ tests/test-status.t.err @@ -109,7 +109,7 @@ tweaking defaults works $ hg status --cwd a --config ui.tweakdefaults=yes - ? . + ? ../a/ ? ../b/ ? ../in_root $ HGPLAIN=1 hg status --cwd a --config ui.tweakdefaults=yes @@ -120,7 +120,7 @@ ? b/in_b (glob) ? in_root $ HGPLAINEXCEPT=tweakdefaults hg status --cwd a --config ui.tweakdefaults=yes - ? . + ? ..\a\ ? ../b/ ? ../in_root (glob) AFAICT, the status list (input and output here) is always in '/' format. The '\' printed output on Windows is because each file is run through repo.pathto() -> dirstate.pathto() -> util.pathto(). (And that function states that the argument uses '/' separators.) I fixed a similar issue in 362096cfdb1f, and given the apparent need for these strings to be in '/' format, I wonder if cmdutil.dirnode() should be rewritten to avoid os.path.join(). But it looks like all entries added to the temporary terse dict should use '/' now, and cmdutil.tersedir() looks like the only user.
Thu, 24 May 2018 15:56:47 -0600 filemerge: don't pass function name as loadpath's module_name param
hindlemail <tom_hindle@sil.org> [Thu, 24 May 2018 15:56:47 -0600] rev 38192
filemerge: don't pass function name as loadpath's module_name param
Tue, 22 May 2018 18:10:37 +0200 phases: define an official tuple of phases we do not share
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 18:10:37 +0200] rev 38191
phases: define an official tuple of phases we do not share Same motivation as for `mutablephases`, having a single definition helps with updating phases logic.
Tue, 22 May 2018 18:10:00 +0200 phases: define an official tuple of mutable phases
Boris Feld <boris.feld@octobus.net> [Tue, 22 May 2018 18:10:00 +0200] rev 38190
phases: define an official tuple of mutable phases Such tuple was already manually defined in a couple of place. Having an official definition makes it easy to introduce of new phases.
Mon, 21 May 2018 17:33:50 +0200 repoview: use 'phasecache.getrevset' when computing 'unserved' filter
Boris Feld <boris.feld@octobus.net> [Mon, 21 May 2018 17:33:50 +0200] rev 38189
repoview: use 'phasecache.getrevset' when computing 'unserved' filter This reuses a precomputed set, being much faster than manual iteration. Computing the "unserved" filter speed up by 55%. before: wall 0.014671 comb 0.020000 user 0.020000 sys 0.000000 (best of 180) after: wall 0.006623 comb 0.010000 user 0.010000 sys 0.000000 (best of 401) The "unserved" filter is used to restrict the revisions client can pull from a server. (eg: secret changesets)
Sat, 26 May 2018 02:11:09 +0530 graft: drop --user and --date values info from hint in case of conflicts
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 26 May 2018 02:11:09 +0530] rev 38188
graft: drop --user and --date values info from hint in case of conflicts After previous patch, we have started preserving user and date values in graftstate and reusing them during `hg graft --continue`. Now passing --user and --date again with --continue makes no sense. Let's drop them from the hint. Differential Revision: https://phab.mercurial-scm.org/D3660
Fri, 25 May 2018 17:21:01 +0530 graft: reuse --user and --date values in `hg graft --continue` (BC)
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 17:21:01 +0530] rev 38187
graft: reuse --user and --date values in `hg graft --continue` (BC) Reading the user and date information from graftstate during `hg graft --continue` will help us in preserving the user and date arguments passed when `hg graft` was called. This patch reads that information and reuses that while running `hg graft --continue`. So after this patch, --user and --date values are preserved even if conflicts occur and user don't need to pass them again. The test changes demonstrate the fix. This is a backward incompatible change but I think of this more as a bug fix. Also thinking about removing the line from `hg help graft` which says --continue does not reapply other flags but need to check what are the other flags which needs to be preserved. Differential Revision: https://phab.mercurial-scm.org/D3659
Sat, 26 May 2018 01:52:42 +0530 tests: add test showing --continue not preserving --date and --user flags
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 26 May 2018 01:52:42 +0530] rev 38186
tests: add test showing --continue not preserving --date and --user flags This patch adds test showing that we don't preserve the user passed --date and --user values in `hg graft`. I was fixing that and realized this is untested. Adding tests before so that behavior change or the fix is easy to realize. Differential Revision: https://phab.mercurial-scm.org/D3658
Fri, 25 May 2018 16:14:15 +0530 graft: store user passed date and user information in graftstate
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 16:14:15 +0530] rev 38185
graft: store user passed date and user information in graftstate Right now, `hg help graft` says: The -c/--continue option does not reapply earlier options, except for --force. which should be treated as a bug. A good user experience is that the commands remember the arguments passed initially and preserve them during `hg graft --continue`. This patch starts storing the user and date information in graftstate if user passed it. Upcoming patches will make sure we preserve that information during --continue and them don't allow user to pass any new arguments with --continue. I don't think there is any another `--continue` flag which allows new options to be passed with it. Differential Revision: https://phab.mercurial-scm.org/D3657
Fri, 25 May 2018 16:00:37 +0530 graft: use cmdstate.delete() to delete the state file
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 16:00:37 +0530] rev 38184
graft: use cmdstate.delete() to delete the state file Previous patches start using state.cmdstate() class for statefiles. The class has a function delete() to delete the state file. This patch replaces the existing repo.vfs.unlink() with that delete() function. Differential Revision: https://phab.mercurial-scm.org/D3656
Thu, 24 May 2018 23:05:12 -0700 graph: add outputgraph() function, called by ascii() to print
John Stiles <johnstiles@gmail.com> [Thu, 24 May 2018 23:05:12 -0700] rev 38183
graph: add outputgraph() function, called by ascii() to print the graph to the ui. This allows a cleaner entrypoint for extensions to tweak the graph output without needing to rewrite all of ascii(), or needing to manually guess where the graph nodes/edges end and the rev note portion begins. This patch does not affect graph output or behavior in any way. Differential Revision: https://phab.mercurial-scm.org/D3655
Wed, 28 Feb 2018 03:07:48 +0530 graft: add test for reading old graftstate files with new mechanism
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 28 Feb 2018 03:07:48 +0530] rev 38182
graft: add test for reading old graftstate files with new mechanism This tests the reading of old graftstate file using the new logic. The tests shows that if user is in middle of a graft and then updates their mercurial to the version where we have new graftstate format, we can still read the old graft state format files correctly. Differential Revision: https://phab.mercurial-scm.org/D2597
Fri, 25 May 2018 01:53:30 +0530 graft: start using the cmdstate class to read and write data to graftstate
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:53:30 +0530] rev 38181
graft: start using the cmdstate class to read and write data to graftstate This patch replaces the logic to read and write data to graftstate file to use the state.cmdstate() class. The previous graftstate format didn't had any version number on top of that, so we have to catch the CorruptedState error and then read the graftstate in case of old state files. This will help us to implement nice additions to graft commands like `--no-commit`, `--abort`, `--stop` flags. Passing on test-graft.t shows that things are working fine. Differential Revision: https://phab.mercurial-scm.org/D3654
Fri, 25 May 2018 01:25:31 +0530 graft: use state.cmdstate() to check whether graftstate exists
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:25:31 +0530] rev 38180
graft: use state.cmdstate() to check whether graftstate exists This is a step towards make graft use the new state.cmdstate() class. This patch replaces the ugly try-except with nice if-else conditionals. Differential Revision: https://phab.mercurial-scm.org/D3652
Fri, 25 May 2018 01:15:30 +0530 graft: factor out function to read graft state in separate function
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:15:30 +0530] rev 38179
graft: factor out function to read graft state in separate function Fatcoring out the logic in a separate function will help us in adding conditional logic for different versions of graft state files. Differential Revision: https://phab.mercurial-scm.org/D3651
Fri, 25 May 2018 01:46:06 +0530 state: removing remaining instances of opts class variable
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 25 May 2018 01:46:06 +0530] rev 38178
state: removing remaining instances of opts class variable The cmdstate class used to have a class variable opts which used to be a dict which stored all the data for the state. Recent cleanups removed the use of that variable. There were couple of instances left which are removed by this patch. Differential Revision: https://phab.mercurial-scm.org/D3653
Thu, 24 May 2018 23:26:28 +0900 help: mention pattern syntax of latesttag() template function
Yuya Nishihara <yuya@tcha.org> [Thu, 24 May 2018 23:26:28 +0900] rev 38177
help: mention pattern syntax of latesttag() template function
Wed, 23 May 2018 22:25:00 -0400 py3: replace str.format(x) with `str % x` in githelp
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 May 2018 22:25:00 -0400] rev 38176
py3: replace str.format(x) with `str % x` in githelp
Wed, 23 May 2018 22:17:04 -0400 githelp: drop the trailing period from single sentence output for consistency
Matt Harbison <matt_harbison@yahoo.com> [Wed, 23 May 2018 22:17:04 -0400] rev 38175
githelp: drop the trailing period from single sentence output for consistency There are several instances of multiple sentence output, which I left alone. That is already nonstandard style, so dropping the period doesn't seem like an improvement.
Wed, 04 Apr 2018 20:37:52 +0900 hgweb: wrap {entries}* of filelog with mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:37:52 +0900] rev 38174
hgweb: wrap {entries}* of filelog with mappinglist They were lists of mappings.
Wed, 04 Apr 2018 20:37:03 +0900 hgweb: don't use dict(key=value) to build a mapping dict in filelog
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:37:03 +0900] rev 38173
hgweb: don't use dict(key=value) to build a mapping dict in filelog It wasn't Py3 compatible because mapping keys must be bytes.
Wed, 04 Apr 2018 20:31:16 +0900 hgweb: wrap {diffopts} of annotate by hybriddict()
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:31:16 +0900] rev 38172
hgweb: wrap {diffopts} of annotate by hybriddict() The diffopts here is a plain dict, which should be wrapped by hybriddict.
Wed, 04 Apr 2018 20:29:58 +0900 hgweb: wrap {parents} of {annotate} with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:29:58 +0900] rev 38171
hgweb: wrap {parents} of {annotate} with mappinggenerator It's a generator of at most two mappings, which has to be wrapped.
Wed, 04 Apr 2018 20:28:51 +0900 hgweb: wrap {annotate} with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:28:51 +0900] rev 38170
hgweb: wrap {annotate} with mappinggenerator No bare generator of mappings should be put in a template mapping.
Wed, 04 Apr 2018 20:24:04 +0900 hgweb: wrap {bookmarks} of summary with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:24:04 +0900] rev 38169
hgweb: wrap {bookmarks} of summary with mappinggenerator No bare generator of mappings should be put in a template mapping.
Wed, 04 Apr 2018 20:21:29 +0900 hgweb: wrap {lastchange} of bookmarks with mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:21:29 +0900] rev 38168
hgweb: wrap {lastchange} of bookmarks with mappinglist It was an 1-length list of a mapping, can be wrapped with a mappinglist.
Wed, 04 Apr 2018 20:19:51 +0900 hgweb: wrap {entries}* of bookmarks with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:19:51 +0900] rev 38167
hgweb: wrap {entries}* of bookmarks with mappinggenerator They were functions returning a generator of mappings. The laziness is handled by the mappinggenerator class.
Wed, 23 May 2018 03:13:04 +0530 state: raise CorruptedState error isntead of ProgrammingError
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 23 May 2018 03:13:04 +0530] rev 38166
state: raise CorruptedState error isntead of ProgrammingError There are old state files which don't have a version number in top of them and hence we have to read them to check whether they are good or not. ProgrammingError is not apt for this case. Thanks to Yuya for suggesting CorruptedState error. Differential Revision: https://phab.mercurial-scm.org/D3644
Tue, 22 May 2018 11:20:55 -0700 localrepo: add docstring to _makedirstate to make it less likely to be removed
Kyle Lippincott <spectral@google.com> [Tue, 22 May 2018 11:20:55 -0700] rev 38165
localrepo: add docstring to _makedirstate to make it less likely to be removed Differential Revision: https://phab.mercurial-scm.org/D3643
Tue, 15 May 2018 14:35:41 +0200 scmutil: move repair.stripbmrevset as scmutil.bookmarkrevs (API)
David Demelier <markand@malikania.fr> [Tue, 15 May 2018 14:35:41 +0200] rev 38164
scmutil: move repair.stripbmrevset as scmutil.bookmarkrevs (API)
Tue, 22 May 2018 23:48:08 -0400 githelp: cleanup one more abort message
Matt Harbison <matt_harbison@yahoo.com> [Tue, 22 May 2018 23:48:08 -0400] rev 38163
githelp: cleanup one more abort message This makes the string localizable, uses the more standard hint argument, quotes the problem option so it stands out, and kills a stray apostrophe.
Tue, 22 May 2018 20:43:42 +0900 githelp: do not concatenate i18n messages dynamically so they can be collected
Yuya Nishihara <yuya@tcha.org> [Tue, 22 May 2018 20:43:42 +0900] rev 38162
githelp: do not concatenate i18n messages dynamically so they can be collected
Wed, 16 May 2018 14:59:32 -0700 narrow: only wrap dirstate functions once, instead of per-reposetup
Kyle Lippincott <spectral@google.com> [Wed, 16 May 2018 14:59:32 -0700] rev 38161
narrow: only wrap dirstate functions once, instead of per-reposetup chg will call reposetup multiple times, and we would end up double-wrapping (or worse) the dirstate functions; this can cause issues like OSError 'No such file or directory' during rebase operations, when we go to double-delete our narrowspec backup file. Differential Revision: https://phab.mercurial-scm.org/D3559
Tue, 22 May 2018 00:25:18 +0530 state: temporary silence pyflakes warning by removing variable assignment
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 00:25:18 +0530] rev 38160
state: temporary silence pyflakes warning by removing variable assignment The variable 'version' is going to be used in upcoming series where we will be using the version number to read a certain state file. However currently, pyflakes fails because of the variable not being used. Let's remove the assignment temporarily so that buildbots and test-suite is happy until I iterate over remaining part of the series. Differential Revision: https://phab.mercurial-scm.org/D3641
Tue, 22 May 2018 00:22:23 +0530 state: fix usage of an unassigned variable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 22 May 2018 00:22:23 +0530] rev 38159
state: fix usage of an unassigned variable The variable iv was used in earlier iterations of the patches and was dropped since we made sure 'version' is always int. This usage of 'iv' should have been replaced by 'version' in the original patch only. Differential Revision: https://phab.mercurial-scm.org/D3640
Sun, 20 May 2018 18:53:03 +0530 py3: add b'' prefixes in tests/test-revset2.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 18:53:03 +0530] rev 38158
py3: add b'' prefixes in tests/test-revset2.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3637
Mon, 21 May 2018 23:26:53 +0530 py3: use encoding.strfromlocal() instead of pycompat.sysstr()
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 21 May 2018 23:26:53 +0530] rev 38157
py3: use encoding.strfromlocal() instead of pycompat.sysstr() opts['dateformat'] is provided by the user and can be encoded in local encoding. Thanks to Yuya for catching. Differential Revision: https://phab.mercurial-scm.org/D3642
Sun, 20 May 2018 23:05:18 -0400 tests: stabilize test-patch.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 20 May 2018 23:05:18 -0400] rev 38156
tests: stabilize test-patch.t on Windows $PYTHON needs to be quoted when invoking with cmd.exe, because the value expands to c:/Python27/python.exe, which seems to be interpreted as 'c' being a command. We can't just convert to '\', because there are a few places that run $PYTHON directly in MSYS. If unquoted there, it results in c:Python27python.exe being run. I wonder if we should bake the quotes into the environment variable to avoid this. It also wasn't happy with the quoting around exit1.py: c:/Python27/python.exe: can't open file ''$TESTTMP/d/exit1.py'': [Errno 22] Invalid argument
Mon, 21 May 2018 23:04:28 -0400 githelp: lowercase the start of output messages for consistency
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 23:04:28 -0400] rev 38155
githelp: lowercase the start of output messages for consistency I left 'Mercurial' as a proper name capitalized.
Mon, 21 May 2018 22:57:05 -0400 githelp: rewrite a Yoda conditional
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:57:05 -0400] rev 38154
githelp: rewrite a Yoda conditional
Mon, 21 May 2018 22:55:17 -0400 githelp: make several strings localizable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:55:17 -0400] rev 38153
githelp: make several strings localizable
Mon, 21 May 2018 22:41:55 -0400 githelp: cleanly abort if the `svn` command is unknown
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:41:55 -0400] rev 38152
githelp: cleanly abort if the `svn` command is unknown Previously, the warning was lost above the sea of KeyError stacktrace output.
Mon, 21 May 2018 22:32:15 -0400 githelp: fail gracefully in a couple cases where arguments are missing
Matt Harbison <matt_harbison@yahoo.com> [Mon, 21 May 2018 22:32:15 -0400] rev 38151
githelp: fail gracefully in a couple cases where arguments are missing I didn't bother adding tests because the other commands that already handled missing arguments don't test these edge cases. I didn't read over all of the code, rather I scanned for `args` not being checked before indexing.
Wed, 07 Mar 2018 12:00:58 +0100 revlog: isgooddeltainfo takes the whole revinfo object
Paul Morelle <paul.morelle@octobus.net> [Wed, 07 Mar 2018 12:00:58 +0100] rev 38150
revlog: isgooddeltainfo takes the whole revinfo object Future changes will need other information about te revision.
Wed, 07 Mar 2018 12:00:07 +0100 revlog: make variable name 'd' more explicit in _isgooddeltainfo
Paul Morelle <paul.morelle@octobus.net> [Wed, 07 Mar 2018 12:00:07 +0100] rev 38149
revlog: make variable name 'd' more explicit in _isgooddeltainfo d -> deltainfo
Thu, 19 Apr 2018 07:57:06 +0200 debugdeltachain: r.start and r.length can be retrieved outside the loop
Paul Morelle <paul.morelle@octobus.net> [Thu, 19 Apr 2018 07:57:06 +0200] rev 38148
debugdeltachain: r.start and r.length can be retrieved outside the loop
Fri, 04 May 2018 15:00:55 +0200 revlog: in _getcandidaterevs, shorten revlog._generaldelta to gdelta
Paul Morelle <paul.morelle@octobus.net> [Fri, 04 May 2018 15:00:55 +0200] rev 38147
revlog: in _getcandidaterevs, shorten revlog._generaldelta to gdelta
Sat, 19 May 2018 14:24:36 -0400 pathencode: remove unused variable
Augie Fackler <augie@google.com> [Sat, 19 May 2018 14:24:36 -0400] rev 38146
pathencode: remove unused variable Caught by Yuya during review of 92ac9cf78dba. Differential Revision: https://phab.mercurial-scm.org/D3618
Sun, 20 May 2018 18:41:24 +0530 py3: add r'' prefixes to fix kwargs handling in hgext/sparse.py
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 18:41:24 +0530] rev 38145
py3: add r'' prefixes to fix kwargs handling in hgext/sparse.py This fixes two of sparse tests which were failing on Python 3. # skip-blame because just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3634
Sun, 20 May 2018 17:39:09 +0530 py3: use bytes in tests/printenv.py
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 17:39:09 +0530] rev 38144
py3: use bytes in tests/printenv.py This patch add b'' prefixes and adds some .encode() calls to convert str to bytes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3633
Sun, 20 May 2018 17:37:07 +0530 py3: use stringutil.pprint() to prevent b'' prefixes in output
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 17:37:07 +0530] rev 38143
py3: use stringutil.pprint() to prevent b'' prefixes in output This patch uses stringutil.pprint to print a list with bytes in it to prevent the b'' prefixes in the output. Differential Revision: https://phab.mercurial-scm.org/D3632
Sun, 20 May 2018 17:35:57 +0530 py3: use pycompat.fsencode to convert path to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 17:35:57 +0530] rev 38142
py3: use pycompat.fsencode to convert path to bytes Differential Revision: https://phab.mercurial-scm.org/D3631
Sun, 20 May 2018 17:34:53 +0530 py3: add b'' prefixes in tests/test-ssh.t and tests/test-ssh-bundle1.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 17:34:53 +0530] rev 38141
py3: add b'' prefixes in tests/test-ssh.t and tests/test-ssh-bundle1.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3630
Sun, 20 May 2018 17:33:18 +0530 py3: add b'' prefixes in contrib/hg-ssh
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 20 May 2018 17:33:18 +0530] rev 38140
py3: add b'' prefixes in contrib/hg-ssh # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3629
Fri, 18 May 2018 16:28:45 +0530 state: write the version number in plain text on top of state files
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 18 May 2018 16:28:45 +0530] rev 38139
state: write the version number in plain text on top of state files We will soon be using CBOR format to write the data in state files. But we should not write the version number of the state files in CBOR format and we should rather write it in plain text because in future we can change the format of state files and we should be able to parse the version number of state file without requiring to understand a certain format. This will help us in making sure we have a good compatibility story with other versions of state files. Differential Revision: https://phab.mercurial-scm.org/D3579
Fri, 18 May 2018 16:34:19 +0530 state: set canonical=True to write deterministically
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 18 May 2018 16:34:19 +0530] rev 38138
state: set canonical=True to write deterministically Passing canonical=True to cbor.dump() will help in writing the data deterministically. This will sort all the sets and dicts before writing to the file. Thanks indygreg for recommending to use it. Differential Revision: https://phab.mercurial-scm.org/D3578
Wed, 28 Mar 2018 16:31:16 +0530 state: don't have a dict like interface for cmdstate class
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 28 Mar 2018 16:31:16 +0530] rev 38137
state: don't have a dict like interface for cmdstate class This patch changes the cmdstate class to stop having a dict like interface and delete the __nonzero__ function. After this patch, the save fuction takes a dict to store the data and read function returns a dict of the data stored. Differential Revision: https://phab.mercurial-scm.org/D3572
Wed, 21 Feb 2018 17:20:22 +0530 state: import the file to write state files from evolve extension
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 21 Feb 2018 17:20:22 +0530] rev 38136
state: import the file to write state files from evolve extension The current way of writing state files is very obscure with each state file having it's own format to store state files. There is no centralized way to write state files in a good format. Moreover the current state files are not extensible, you cannot add more data to store in state files in reliable ways. To solve the problem, I wrote my own serialization and deserialization format, looked into existing formats like Protobuf, MessagePack, JSON but CBOR looks very promising and is suggested by people in the community. The current interface to store state files is to directly write data in files when things abort. Using the class imported by this commit, we can create objects which has a dict like interface and can store data on the object and store it on the file when things abort. The evolve extension is using the state file for `evolve`, `grab` commands and using it for resolution of orphaness, phase-divergence and content-divergence. The file is moved from changeset e4ac2e2c2086f977afa35e23a62f849e9305a225 of the evolve extension which is also tagged as 7.3.0. The following changes are made to the file while moving to core: * import util from current directory as this file in mercurial/ now * make cmdstate class extend object * removed mutable default value for opts in cmdstate.__init__ * some doc changes to replace out of core things with in-core ones evolve extension can be found at https://bitbucket.org/marmoute/mutable-history Differential Revision: https://phab.mercurial-scm.org/D2591
Mon, 14 May 2018 13:05:14 +0200 revlog: suggest other parent when a parent was refused for a delta (issue5481)
Paul Morelle <paul.morelle@octobus.net> [Mon, 14 May 2018 13:05:14 +0200] rev 38135
revlog: suggest other parent when a parent was refused for a delta (issue5481) Without aggressivemergedeltas, ensure that when we decline the closest parent (by revision number), the other parent is examined too.
Mon, 14 May 2018 22:02:44 -0400 status: add default of --terse=u to tweakdefaults (BC)
Augie Fackler <augie@google.com> [Mon, 14 May 2018 22:02:44 -0400] rev 38134
status: add default of --terse=u to tweakdefaults (BC) This is in line with both Git and Subversion, and strikes me as a more humane behavior. Test output changes are expected once you read test-status.t, and I feel like we've still got adequate coverage on things. Differential Revision: https://phab.mercurial-scm.org/D3628
Mon, 14 May 2018 22:01:27 -0400 status: add a config knob for setting default of --terse
Augie Fackler <augie@google.com> [Mon, 14 May 2018 22:01:27 -0400] rev 38133
status: add a config knob for setting default of --terse I want --terse=u basically 100% of the time, but there's not a good way to do that before this patch. I'm very unhappy with how the default value for --terse looks rigt now, but it does *work*. The alternative would be to define an "optional string" flag type using fancyopts.customopt and then use that, leaving the default as None. Does anyone have a strong preference for that, or a better idea? Differential Revision: https://phab.mercurial-scm.org/D3627
Sat, 19 May 2018 16:50:30 -0400 tests: port inline extensions in test-obsolete.t to Python 3
Augie Fackler <augie@google.com> [Sat, 19 May 2018 16:50:30 -0400] rev 38132
tests: port inline extensions in test-obsolete.t to Python 3 Still some lingering failure in here, but it's much better. Differential Revision: https://phab.mercurial-scm.org/D3626
Sat, 19 May 2018 16:22:15 -0400 py3: consolidate down some (case ...) entries
Augie Fackler <augie@google.com> [Sat, 19 May 2018 16:22:15 -0400] rev 38131
py3: consolidate down some (case ...) entries Differential Revision: https://phab.mercurial-scm.org/D3625
Sat, 19 May 2018 16:21:53 -0400 py3: re-sort test whitelist
Augie Fackler <augie@google.com> [Sat, 19 May 2018 16:21:53 -0400] rev 38130
py3: re-sort test whitelist Differential Revision: https://phab.mercurial-scm.org/D3624
Sat, 19 May 2018 16:02:39 -0400 tests: fix test-subrepo-paths.t on Python 3
Augie Fackler <augie@google.com> [Sat, 19 May 2018 16:02:39 -0400] rev 38129
tests: fix test-subrepo-paths.t on Python 3 The Python 3 group reference error message is a little more helpful, so we'll allow the extra output. I tried matching this with an (re) line, but decided it wasn't worth the effort. Differential Revision: https://phab.mercurial-scm.org/D3623
Sat, 19 May 2018 15:53:31 -0400 tests: fix test-parseindex2 on Python 3
Augie Fackler <augie@google.com> [Sat, 19 May 2018 15:53:31 -0400] rev 38128
tests: fix test-parseindex2 on Python 3 parsers.versionerrortext is a sysstr, but it's only ever used in this test on the Python side, so I'm okay to just handle it like this. Differential Revision: https://phab.mercurial-scm.org/D3622
Sat, 19 May 2018 15:47:32 -0400 tests: use [(] instead of \( to avoid warning on py3
Augie Fackler <augie@google.com> [Sat, 19 May 2018 15:47:32 -0400] rev 38127
tests: use [(] instead of \( to avoid warning on py3 From a recent test run of mine: run-tests.py:1633: DeprecationWarning: invalid escape sequence '\(' This lets us encode the expectation without the badness. Differential Revision: https://phab.mercurial-scm.org/D3621
Sat, 19 May 2018 15:15:51 -0400 tests: fix test-patch.t on pickier /bin/sh implementations
Augie Fackler <augie@google.com> [Sat, 19 May 2018 15:15:51 -0400] rev 38126
tests: fix test-patch.t on pickier /bin/sh implementations FreeBSD sh(1) doesn't accept -d, so we weren't testing what we expected there. Let's just use a simple Python script instead. Differential Revision: https://phab.mercurial-scm.org/D3620
Sat, 19 May 2018 15:14:56 -0400 patch: add debug message to show external patch tool invocation
Augie Fackler <augie@google.com> [Sat, 19 May 2018 15:14:56 -0400] rev 38125
patch: add debug message to show external patch tool invocation Differential Revision: https://phab.mercurial-scm.org/D3619
Sat, 19 May 2018 20:04:54 +0530 py3: add 13 new passing tests to whitelist
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 20:04:54 +0530] rev 38124
py3: add 13 new passing tests to whitelist Differential Revision: https://phab.mercurial-scm.org/D3615
Sat, 19 May 2018 18:59:21 +0530 py3: check for None before comparing with integers
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:59:21 +0530] rev 38123
py3: check for None before comparing with integers Comparing None and integers on Python 3 is not allowed and raise error. Differential Revision: https://phab.mercurial-scm.org/D3614
Sat, 19 May 2018 18:58:35 +0530 py3: use `except error as e` instead of `except error, e`
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:58:35 +0530] rev 38122
py3: use `except error as e` instead of `except error, e` The latter throws SyntaxError on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3613
Sat, 19 May 2018 18:56:00 +0530 py3: use pycompat.fsencode() to convert tempfile name to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:56:00 +0530] rev 38121
py3: use pycompat.fsencode() to convert tempfile name to bytes Differential Revision: https://phab.mercurial-scm.org/D3612
Sat, 19 May 2018 18:55:30 +0530 py3: add b'' prefixes in tests/test-parseindex.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:55:30 +0530] rev 38120
py3: add b'' prefixes in tests/test-parseindex.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3611
Sat, 19 May 2018 18:52:56 +0530 py3: fix .write() calls in few tests
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:52:56 +0530] rev 38119
py3: fix .write() calls in few tests This patch adds b'' prefixes to make sure we write bytes and add `and None` in the end to suppress the output by .write() calls. Differential Revision: https://phab.mercurial-scm.org/D3610
Sat, 19 May 2018 18:51:14 +0530 py3: bytestr() bytes to get bytechar while iterating on it
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:51:14 +0530] rev 38118
py3: bytestr() bytes to get bytechar while iterating on it Iterating on bytes give you ascii values instead of bytechr so we need to wrap the bytes in pycompat.bytestr() to get bytechr while iterating. Differential Revision: https://phab.mercurial-scm.org/D3609
Sat, 19 May 2018 18:49:07 +0530 py3: slice over bytes to prevent getting the ascii values
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:49:07 +0530] rev 38117
py3: slice over bytes to prevent getting the ascii values Differential Revision: https://phab.mercurial-scm.org/D3608
Sat, 19 May 2018 18:48:26 +0530 py3: use utils.stringutil.forcebytestr to convert error to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:48:26 +0530] rev 38116
py3: use utils.stringutil.forcebytestr to convert error to bytes Differential Revision: https://phab.mercurial-scm.org/D3607
Sat, 19 May 2018 18:47:20 +0530 py3: make sure we open files in bytes mode
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:47:20 +0530] rev 38115
py3: make sure we open files in bytes mode we internally deal with bytes and should read files in bytes mode. Differential Revision: https://phab.mercurial-scm.org/D3606
Sat, 19 May 2018 18:45:53 +0530 py3: add b'' prefix in test/test-fileset.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:45:53 +0530] rev 38114
py3: add b'' prefix in test/test-fileset.t # skip-blame because just a b'' prefix Differential Revision: https://phab.mercurial-scm.org/D3605
Sat, 19 May 2018 18:43:13 +0530 py3: suppress the output from .write() calls in few tests
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:43:13 +0530] rev 38113
py3: suppress the output from .write() calls in few tests Differential Revision: https://phab.mercurial-scm.org/D3604
Sat, 19 May 2018 18:42:18 +0530 py3: use print as a function in tests/test-parseindex.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:42:18 +0530] rev 38112
py3: use print as a function in tests/test-parseindex.t Differential Revision: https://phab.mercurial-scm.org/D3603
Sat, 19 May 2018 18:41:02 +0530 py3: use print as a function in tests/test-pull.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:41:02 +0530] rev 38111
py3: use print as a function in tests/test-pull.t Differential Revision: https://phab.mercurial-scm.org/D3602
Sat, 19 May 2018 18:33:36 +0530 py3: add b'' prefixes in tests/test-rebuildstate.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:33:36 +0530] rev 38110
py3: add b'' prefixes in tests/test-rebuildstate.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3601
Sat, 19 May 2018 18:32:57 +0530 py3: add b'' prefixes in tests/test-progress.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:32:57 +0530] rev 38109
py3: add b'' prefixes in tests/test-progress.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3600
Sat, 19 May 2018 18:32:24 +0530 py3: add b'' prefixes in tests/test-profile.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:32:24 +0530] rev 38108
py3: add b'' prefixes in tests/test-profile.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3599
Sat, 19 May 2018 18:31:15 +0530 py3: add b'' prefixes in tests/test-pager.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:31:15 +0530] rev 38107
py3: add b'' prefixes in tests/test-pager.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3598
Sat, 19 May 2018 18:30:20 +0530 py3: add b'' prefixes in tests/test-hgrc.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:30:20 +0530] rev 38106
py3: add b'' prefixes in tests/test-hgrc.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3597
Sat, 19 May 2018 18:28:52 +0530 py3: add b'' prefixes in tests/test-extensions-afterloaded.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:28:52 +0530] rev 38105
py3: add b'' prefixes in tests/test-extensions-afterloaded.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3596
Sat, 19 May 2018 18:27:57 +0530 py3: add b'' prefixes in tests/test-custom-filters.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:27:57 +0530] rev 38104
py3: add b'' prefixes in tests/test-custom-filters.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3595
Sat, 19 May 2018 18:26:38 +0530 py3: add b'' prefixes in tests/test-bugzilla.t
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:26:38 +0530] rev 38103
py3: add b'' prefixes in tests/test-bugzilla.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3594
Sat, 19 May 2018 18:25:18 +0530 py3: fix kwargs handling in hgext/split.py
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:25:18 +0530] rev 38102
py3: fix kwargs handling in hgext/split.py Differential Revision: https://phab.mercurial-scm.org/D3593
Sat, 19 May 2018 18:24:36 +0530 py3: add b'' prefixes in hgext/convert/subversion.py
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:24:36 +0530] rev 38101
py3: add b'' prefixes in hgext/convert/subversion.py Litrerals starting with triple quotes or prepended with r'' do not get prepended by b'' by the transformer. # skip-blame because just adding b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3592
Sat, 19 May 2018 18:23:03 +0530 py3: use '%d' for integers in hgext/infinitepush/__init__.py
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:23:03 +0530] rev 38100
py3: use '%d' for integers in hgext/infinitepush/__init__.py Differential Revision: https://phab.mercurial-scm.org/D3591
Sat, 19 May 2018 18:21:21 +0530 py3: make sure we pass str to date.strftime()
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 18:21:21 +0530] rev 38099
py3: make sure we pass str to date.strftime() Differential Revision: https://phab.mercurial-scm.org/D3590
Sat, 19 May 2018 21:47:59 +0530 py3: use pycompat.bytestr() to convert str into bytes
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 21:47:59 +0530] rev 38098
py3: use pycompat.bytestr() to convert str into bytes the keys of opts are str here, so we have to convert it to bytes before passing into error.Abort() Differential Revision: https://phab.mercurial-scm.org/D3617
Sat, 19 May 2018 21:46:54 +0530 py3: fix kwargs handling in hgext/rebase.py
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 21:46:54 +0530] rev 38097
py3: fix kwargs handling in hgext/rebase.py We add r'' prefixes to prevent the transformer adding b'' prefixes. # skip-blame because just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3616
Wed, 04 Apr 2018 20:18:28 +0900 hgweb: wrap {entries}* of tags with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:18:28 +0900] rev 38096
hgweb: wrap {entries}* of tags with mappinggenerator They were functions returning a generator of mappings. The laziness is handled by the mappinggenerator class.
Wed, 04 Apr 2018 20:14:19 +0900 hgweb: wrap {fentries} and {dentries} of manifest with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:14:19 +0900] rev 38095
hgweb: wrap {fentries} and {dentries} of manifest with mappinggenerator They were functions returning a generator of mappings.
Wed, 04 Apr 2018 20:11:20 +0900 hgweb: wrap {entries}* of changelog with mappinglist
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 20:11:20 +0900] rev 38094
hgweb: wrap {entries}* of changelog with mappinglist They were lists of mappings.
Wed, 04 Apr 2018 00:24:09 +0900 hgweb: wrap {lines} of filerevision with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 00:24:09 +0900] rev 38093
hgweb: wrap {lines} of filerevision with mappinggenerator No bare generator of mappings should be put in a template mapping.
Wed, 04 Apr 2018 00:21:52 +0900 hgweb: drop unused argument 'tmpl' from webutil.diffstat()
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 00:21:52 +0900] rev 38092
hgweb: drop unused argument 'tmpl' from webutil.diffstat()
Wed, 04 Apr 2018 00:20:47 +0900 hgweb: use template context to render {diffstat}
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 00:20:47 +0900] rev 38091
hgweb: use template context to render {diffstat} This is a preferred way to process nested templates.
Wed, 04 Apr 2018 00:19:37 +0900 hgweb: wrap {diffstat} with mappedgenerator
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 00:19:37 +0900] rev 38090
hgweb: wrap {diffstat} with mappedgenerator This can't be a mappinggenerator since the associated templates are switched per item. We already have webutil.diffstatgen(). That's why the generator function is named as _diffstattmplgen().
Fri, 18 May 2018 20:43:01 -0400 pathencode: improve error messages slightly
Augie Fackler <augie@google.com> [Fri, 18 May 2018 20:43:01 -0400] rev 38089
pathencode: improve error messages slightly Both of these are conditions we should never hit, so we can afford to be more verbose to make debugging less baffling. Differential Revision: https://phab.mercurial-scm.org/D3589
Fri, 18 May 2018 20:42:31 -0400 pathencode: hashlib.sha1() takes bytes not str on Python 3
Augie Fackler <augie@google.com> [Fri, 18 May 2018 20:42:31 -0400] rev 38088
pathencode: hashlib.sha1() takes bytes not str on Python 3 Differential Revision: https://phab.mercurial-scm.org/D3588
Fri, 18 May 2018 20:42:04 -0400 pathencode: fix importing hashlib on Python 3
Augie Fackler <augie@google.com> [Fri, 18 May 2018 20:42:04 -0400] rev 38087
pathencode: fix importing hashlib on Python 3 I'm curious why PyImport_Import is returning NULL, but PyImport_ImportModule bypasses some of the regular import path, probably including demandimport, which I suspect is the issue here. Differential Revision: https://phab.mercurial-scm.org/D3587
Fri, 18 May 2018 20:11:24 -0400 context: fix %-formatting on Python 3
Augie Fackler <augie@google.com> [Fri, 18 May 2018 20:11:24 -0400] rev 38086
context: fix %-formatting on Python 3 changeid could be an int or a bytestr, so use our pycompat wrapper. Differential Revision: https://phab.mercurial-scm.org/D3585
Fri, 18 May 2018 19:54:50 -0400 patch: fix import-time syntax error in test-check-module-imports.t
Augie Fackler <augie@google.com> [Fri, 18 May 2018 19:54:50 -0400] rev 38085
patch: fix import-time syntax error in test-check-module-imports.t This is more correct, though we were getting lucky in practice with our rewriter saving us. # skip-blame just a b prefix Differential Revision: https://phab.mercurial-scm.org/D3584
Fri, 18 May 2018 19:52:35 -0400 py3: whitelist two more passing tests observed by buildbot
Augie Fackler <augie@google.com> [Fri, 18 May 2018 19:52:35 -0400] rev 38084
py3: whitelist two more passing tests observed by buildbot Differential Revision: https://phab.mercurial-scm.org/D3583
Sat, 19 May 2018 00:23:36 +0530 py3: use stringutil.pprint() to format a list to print
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 00:23:36 +0530] rev 38083
py3: use stringutil.pprint() to format a list to print Differential Revision: https://phab.mercurial-scm.org/D3582
Sat, 19 May 2018 00:21:59 +0530 py3: fix kwargs handling in qgurad in hgext/mq.py
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 00:21:59 +0530] rev 38082
py3: fix kwargs handling in qgurad in hgext/mq.py # skip-blame because just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3581
Sat, 19 May 2018 00:19:56 +0530 py3: use .startswith() instead of bytes[0]
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 19 May 2018 00:19:56 +0530] rev 38081
py3: use .startswith() instead of bytes[0] bytes[0] returns the ascii value of character at 0 index. Differential Revision: https://phab.mercurial-scm.org/D3580
Thu, 17 May 2018 23:11:24 -0700 crecord: fallback to text mode if diffs are too big for curses mode
Kyle Lippincott <spectral@google.com> [Thu, 17 May 2018 23:11:24 -0700] rev 38080
crecord: fallback to text mode if diffs are too big for curses mode crecord uses curses.newpad to create a region that we can then scroll around in by moving the main 'screen' as a veiwport into the (probably larger than the actual screen) pad. Internally, at least in ncurses, pads are implemented using windows, which have their dimensions limited to a certain size. Depending on compilation options for ncurses, this size might be pretty small: (signed) short, or it might be larger ((signed) int). crecord wants to have enough room to have all of the contents of the main area of the chunkselector in the pad; this means that the full size with everything expanded must be less than these (undocumented, afaict) limits. It's not easy to write tests for this because the limits are platform- and installation- dependent and undocumented / unqueryable, as far as I can tell. Differential Revision: https://phab.mercurial-scm.org/D3577
Thu, 17 May 2018 15:33:28 -0700 narrow: filter copies in core
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 May 2018 15:33:28 -0700] rev 38079
narrow: filter copies in core Differential Revision: https://phab.mercurial-scm.org/D3576
Thu, 17 May 2018 15:25:52 -0700 narrow: filter set of files to check for case-folding to core
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 May 2018 15:25:52 -0700] rev 38078
narrow: filter set of files to check for case-folding to core Differential Revision: https://phab.mercurial-scm.org/D3575
Thu, 17 May 2018 15:12:48 -0700 narrow: filter merge actions in core
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 May 2018 15:12:48 -0700] rev 38077
narrow: filter merge actions in core Part of the ongoing effort to move narrow into core. Differential Revision: https://phab.mercurial-scm.org/D3574
Thu, 17 May 2018 12:23:38 -0700 hgweb: extract code for emitting multiple changelist records
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 17 May 2018 12:23:38 -0700] rev 38076
hgweb: extract code for emitting multiple changelist records changelistentry() exists so extensions can easily monkeypatch the function to add additional metadata. In at least one case at Mozilla, we have an extension doing this where performance would greatly benefit if we were able to "batch fetch" metadata for all revisions that will eventually have their data set. By extracting the logic for "obtain records for N revisions" into a standalone function, we make it possible for a monkeypatched function to more efficiently bulk fetch data for N revisions. Differential Revision: https://phab.mercurial-scm.org/D3573
Wed, 16 May 2018 22:44:27 -0400 phabricator: register config settings
Matt Harbison <matt_harbison@yahoo.com> [Wed, 16 May 2018 22:44:27 -0400] rev 38075
phabricator: register config settings I didn't bother registering the deprecated phabricator.auth.*, and I'm not sure if the two flagged as 'developer config' should be moved to [devel] (or why there's a distinction between `repophid` and `callsign`).
Wed, 16 May 2018 14:11:41 -0600 filemerge: support specifying a python function to custom merge-tools
hindlemail <tom_hindle@sil.org> [Wed, 16 May 2018 14:11:41 -0600] rev 38074
filemerge: support specifying a python function to custom merge-tools Eliminates the need to specify a python executable, which may not exist on system. Additionally launching script inprocess aids portability on systems that can't execute python via the shell. Example usage "merge-tools.myTool.executable=python:c:\myTool.py:mergefn" where myTool.py contains a function: "def mergefn(ui, repo, args, **kwargs):" where args is list of args passed to merge tool. (by default, expanded: $local $base $other) Invoking the specified python function was done by exposing and invoking (hook._pythonhook -> hook.pythonhook)
Sun, 13 May 2018 11:09:53 +0900 test-http-branchmap: fix stdio mode on Windows
Yuya Nishihara <yuya@tcha.org> [Sun, 13 May 2018 11:09:53 +0900] rev 38073
test-http-branchmap: fix stdio mode on Windows
Sun, 13 May 2018 11:08:35 +0900 test-http-branchmap: fix encoding test to wrap the server stream
Yuya Nishihara <yuya@tcha.org> [Sun, 13 May 2018 11:08:35 +0900] rev 38072
test-http-branchmap: fix encoding test to wrap the server stream Wrapping sys.std* streams has no effect since 39d13b8c101d, "py3: bulk replace sys.stdin/out/err by util's."
Thu, 17 May 2018 21:55:00 +0900 test-merge-tools: create repo directory to free $TESTTMP for temporary files
Yuya Nishihara <yuya@tcha.org> [Thu, 17 May 2018 21:55:00 +0900] rev 38071
test-merge-tools: create repo directory to free $TESTTMP for temporary files
Sat, 12 May 2018 23:44:08 +0200 notify: add option to include function names in the diff output
Joerg Sonnenberger <joerg@bec.de> [Sat, 12 May 2018 23:44:08 +0200] rev 38070
notify: add option to include function names in the diff output This is a localized version of diff.showfunc. Differential Revision: https://phab.mercurial-scm.org/D3553
Wed, 16 May 2018 10:34:31 -0700 tests: update py3 test since json fields are now sorted
Martin von Zweigbergk <martinvonz@google.com> [Wed, 16 May 2018 10:34:31 -0700] rev 38069
tests: update py3 test since json fields are now sorted The fields have been sorted since 814151cd8c4a (logcmdutil: rewrite jsonchangeset printer to be backed by jsonformatter, 2018-04-13), and the test case has thus been failing since that commit. Differential Revision: https://phab.mercurial-scm.org/D3570
Wed, 16 May 2018 15:48:12 -0700 tests: test-parseindex.t works just fine with chg
Kyle Lippincott <spectral@google.com> [Wed, 16 May 2018 15:48:12 -0700] rev 38068
tests: test-parseindex.t works just fine with chg In 538e850ae737 I annotated tests that failed with chg with "#require no-chg", but did not investigate why the tests were failing. This test was failing for unrelated reasons (I forgot to rebuild hg) and so should not be marked as no-chg. Test Plan: make local pushd contrib/chg make clean; make popd cd tests for f in '' --with-chg=../contrib/chg/chg; do ./run-tests.py --local $f test-parseindex.t done Differential Revision: https://phab.mercurial-scm.org/D3571
Fri, 27 Apr 2018 21:55:02 +0530 py3: convert the report to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 27 Apr 2018 21:55:02 +0530] rev 38067
py3: convert the report to bytes Differential Revision: https://phab.mercurial-scm.org/D3569
Fri, 11 May 2018 10:36:28 -0700 json: reject unicode on py2 as well
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 May 2018 10:36:28 -0700] rev 38066
json: reject unicode on py2 as well This makes it consistent with the behavior on py3. Differential Revision: https://phab.mercurial-scm.org/D3536
Wed, 16 May 2018 20:22:23 +0900 dispatch: mask negative exit code recorded in blackbox log
Yuya Nishihara <yuya@tcha.org> [Wed, 16 May 2018 20:22:23 +0900] rev 38065
dispatch: mask negative exit code recorded in blackbox log That's what we do for the exit code delivered to the environment.
Wed, 16 May 2018 20:17:50 +0900 dispatch: fix exit code of unhandled exception recorded in blackbox log
Yuya Nishihara <yuya@tcha.org> [Wed, 16 May 2018 20:17:50 +0900] rev 38064
dispatch: fix exit code of unhandled exception recorded in blackbox log Spotted by Martin von Zweigbergk. We might want to change the exit code to -1 (i.e. 255) because 1 means non-abort error in hg, but that's another issue.
Tue, 15 May 2018 11:52:43 -0700 tests: mark tests that fail when using chg as #require no-chg
Kyle Lippincott <spectral@google.com> [Tue, 15 May 2018 11:52:43 -0700] rev 38063
tests: mark tests that fail when using chg as #require no-chg As far as I can tell, most of these failures are due to using $HGPORT, which it seems chg might be using itself? I don't know enough to debug these failures to fix them properly. Differential Revision: https://phab.mercurial-scm.org/D3562
Fri, 27 Apr 2018 21:54:37 +0530 py3: use pycompat.bytestr() instead of str() in extensions.py
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 27 Apr 2018 21:54:37 +0530] rev 38062
py3: use pycompat.bytestr() instead of str() in extensions.py Differential Revision: https://phab.mercurial-scm.org/D3568
Wed, 16 May 2018 07:58:02 +0530 py3: use pycompat.bytestr() on bytes before %r-ing it
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 16 May 2018 07:58:02 +0530] rev 38061
py3: use pycompat.bytestr() on bytes before %r-ing it Differential Revision: https://phab.mercurial-scm.org/D3567
Thu, 15 Feb 2018 17:15:21 +0530 py3: add b'' prefixes in tests/test-extension.t
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 15 Feb 2018 17:15:21 +0530] rev 38060
py3: add b'' prefixes in tests/test-extension.t # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D3564
Fri, 27 Apr 2018 20:55:10 +0530 py3: suppress the value returned by .write() calls
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 27 Apr 2018 20:55:10 +0530] rev 38059
py3: suppress the value returned by .write() calls These return values are not present on Python 2. Differential Revision: https://phab.mercurial-scm.org/D3563
Tue, 15 May 2018 09:57:58 -0700 tests: test failure reporting in blackbox code
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 May 2018 09:57:58 -0700] rev 38058
tests: test failure reporting in blackbox code Differential Revision: https://phab.mercurial-scm.org/D3560
Mon, 14 May 2018 12:53:13 +0200 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr> [Mon, 14 May 2018 12:53:13 +0200] rev 38057
export: add -B option to select a bookmark Just like `hg email -B`, `hg strip -B`, supports -B in export to select a list of changesets reachable from a bookmark.
Sat, 12 May 2018 18:05:50 -0700 packaging: move most packaging targets to own Makefile
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 18:05:50 -0700] rev 38056
packaging: move most packaging targets to own Makefile Since we're putting everything packaging under one roof, let's define the make targets related to packaging there as well. I didn't move the "osx" target because it is non-trivial. Some targets did change slightly as part of the move. But it was mostly around path normalization. Differential Revision: https://phab.mercurial-scm.org/D3552
Sat, 12 May 2018 12:27:51 -0700 packaging: make packaging scripts less reliant on pwd
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 12:27:51 -0700] rev 38055
packaging: make packaging scripts less reliant on pwd The scripts currently assume they are executed from the repo root. This feels like an arbitrary restriction. Let's fix that. Differential Revision: https://phab.mercurial-scm.org/D3551
Sat, 12 May 2018 10:57:04 -0700 packaging: move contrib/macosx to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:57:04 -0700] rev 38054
packaging: move contrib/macosx to contrib/packaging/ And update various references throughout the code. Differential Revision: https://phab.mercurial-scm.org/D3550
Sat, 12 May 2018 10:50:30 -0700 packaging: move linux-wheel-centos5-blacklist to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:50:30 -0700] rev 38053
packaging: move linux-wheel-centos5-blacklist to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3549
Sat, 12 May 2018 10:47:44 -0700 packaging: move build-linux-wheels.sh to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:47:44 -0700] rev 38052
packaging: move build-linux-wheels.sh to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3548
Sat, 12 May 2018 17:16:09 -0700 packaging: move contrib/debian to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 17:16:09 -0700] rev 38051
packaging: move contrib/debian to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3547
Sat, 12 May 2018 10:41:08 -0700 packaging: move buildrpm to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:41:08 -0700] rev 38050
packaging: move buildrpm to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3546
Sat, 12 May 2018 10:38:36 -0700 packaging: move mercurial.spec to contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:38:36 -0700] rev 38049
packaging: move mercurial.spec to contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3545
Sat, 12 May 2018 10:31:34 -0700 packaging: move builddeb into contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:31:34 -0700] rev 38048
packaging: move builddeb into contrib/packaging/ Differential Revision: https://phab.mercurial-scm.org/D3544
Sat, 12 May 2018 10:28:00 -0700 packaging: move packagelib.sh into contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:28:00 -0700] rev 38047
packaging: move packagelib.sh into contrib/packaging/ This required some minor path adjustments in scripts referencing this path. Differential Revision: https://phab.mercurial-scm.org/D3543
Sat, 12 May 2018 10:33:11 -0700 packaging: move some docker scripts into contrib/packaging/
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:33:11 -0700] rev 38046
packaging: move some docker scripts into contrib/packaging/ This required some minor path adjustments in the scripts. Differential Revision: https://phab.mercurial-scm.org/D3542
Sat, 12 May 2018 13:17:01 -0700 packaging: move most of contrib/docker to contrib/packaging/docker
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 13:17:01 -0700] rev 38045
packaging: move most of contrib/docker to contrib/packaging/docker contrib/ is kind of a dumping ground for all kinds of random things. Many of the files in contrib/ are related to packaging. But sorting out how everything is related is a lot of effort since it is all mixed together. This commit starts the process of refactoring everything related to packaging so it all lives under one roof. Most content from contrib/docker is simply moved to contrib/packaging/docker and all references are updated. Differential Revision: https://phab.mercurial-scm.org/D3541
Sat, 12 May 2018 12:12:12 -0700 setup: reformat options argument
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 12:12:12 -0700] rev 38044
setup: reformat options argument This makes things a bit more easier to manage IMO. Differential Revision: https://phab.mercurial-scm.org/D3540
Sat, 12 May 2018 10:53:53 -0700 contrib: remove fixpax.py
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 12 May 2018 10:53:53 -0700] rev 38043
contrib: remove fixpax.py This was used as part of bdist_mpkg. And we stopped using bdist_mpkg after db5084d27df5. Differential Revision: https://phab.mercurial-scm.org/D3539
Fri, 11 May 2018 23:28:02 -0700 revlog: handle errors from index_node() in nt_insert() and index_slice_del()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 May 2018 23:28:02 -0700] rev 38042
revlog: handle errors from index_node() in nt_insert() and index_slice_del() Same idea as in a9d9802d577e (revlog: don't say "not found" on internal error, 2018-05-04). Differential Revision: https://phab.mercurial-scm.org/D3558
Mon, 14 May 2018 13:11:04 +0200 help: add new deprecated topic
David Demelier <markand@malikania.fr> [Mon, 14 May 2018 13:11:04 +0200] rev 38041
help: add new deprecated topic Add a deprecated topic which lists most of the commands and options that are not recommended anymore.
Mon, 14 May 2018 23:00:30 -0400 phabricator: split auth.url into the standard auth.schemes and auth.prefix
Matt Harbison <matt_harbison@yahoo.com> [Mon, 14 May 2018 23:00:30 -0400] rev 38040
phabricator: split auth.url into the standard auth.schemes and auth.prefix It seems better to reuse the existing function to find the proper [auth] block, even if not all of the possible settings may be of interest. The other callers of readauthforuri() make a trip through the password database to fetch the user from the URI. But in the little experimenting I did here, the username always came back as None. Since readauthforuri() wants it to make sure that user@prefix matches user@url, it seems that parsing the URL and pulling out the user component should be equivalent.
Sat, 12 May 2018 00:34:01 -0400 phabricator: migrate [phabricator.auth] to [auth]
Matt Harbison <matt_harbison@yahoo.com> [Sat, 12 May 2018 00:34:01 -0400] rev 38039
phabricator: migrate [phabricator.auth] to [auth] This resurrects the warning mechanism removed in 20a4543e9a2b. I'm not worried about the copy/paste of the code for a brief transitional period.
Sat, 12 May 2018 15:33:09 +0900 dispatch: unify handling of None returned by a command function
Yuya Nishihara <yuya@tcha.org> [Sat, 12 May 2018 15:33:09 +0900] rev 38038
dispatch: unify handling of None returned by a command function A command function may return None in place of 0 just for convenience, but dispatch() doesn't need to inherit that property. This patch makes it be friendly to callers.
Fri, 11 May 2018 21:23:48 -0700 dispatch: minor code refactor
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 11 May 2018 21:23:48 -0700] rev 38037
dispatch: minor code refactor This hopefully makes things slightly easier to read. Differential Revision: https://phab.mercurial-scm.org/D3537
Wed, 04 Apr 2018 21:17:55 +0900 hgweb: drop unused argument 'tmpl' from webutil.compare()
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 21:17:55 +0900] rev 38036
hgweb: drop unused argument 'tmpl' from webutil.compare()
Wed, 04 Apr 2018 21:17:10 +0900 hgweb: convert {comparison} to a mappinggenerator with named template
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 21:17:10 +0900] rev 38035
hgweb: convert {comparison} to a mappinggenerator with named template No bare generator.
Wed, 04 Apr 2018 21:14:30 +0900 hgweb: rename 'context' argument of webutil.compare() to avoid name conflicts
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 21:14:30 +0900] rev 38034
hgweb: rename 'context' argument of webutil.compare() to avoid name conflicts The meaning of 'context' depends on context. Here it is the number of the context lines in unified diff.
Wed, 04 Apr 2018 00:08:10 +0900 hgweb: convert comparison {lines} to a mappinggenerator with named template
Yuya Nishihara <yuya@tcha.org> [Wed, 04 Apr 2018 00:08:10 +0900] rev 38033
hgweb: convert comparison {lines} to a mappinggenerator with named template Bare generator can't be restarted.
Tue, 03 Apr 2018 23:57:00 +0900 hgweb: move getblock() closure out of compare()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:57:00 +0900] rev 38032
hgweb: move getblock() closure out of compare() (Please use 'hg diff -w' to get readable diff from this patch.)
Tue, 03 Apr 2018 23:54:08 +0900 hgweb: move compline() closure out of compare()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:54:08 +0900] rev 38031
hgweb: move compline() closure out of compare()
Tue, 03 Apr 2018 23:50:00 +0900 hgweb: convert {diff} to a mappinggenerator with named template
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:50:00 +0900] rev 38030
hgweb: convert {diff} to a mappinggenerator with named template No more bare generator. Fortunately, this one is associated with a single template, so it can be a mappinggenerator.
Tue, 03 Apr 2018 23:43:41 +0900 hgweb: use template context to render {lines} of {diff}
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:43:41 +0900] rev 38029
hgweb: use template context to render {lines} of {diff} This is a preferred way to process nested templates.
Tue, 03 Apr 2018 23:42:15 +0900 hgweb: wrap {lines} of {diff} with mappedgenerator
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:42:15 +0900] rev 38028
hgweb: wrap {lines} of {diff} with mappedgenerator This can't be a mappinggenerator as it switches the templates conditionally.
Tue, 03 Apr 2018 23:38:19 +0900 hgweb: move prettyprintlines() closure out of diffs()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:38:19 +0900] rev 38027
hgweb: move prettyprintlines() closure out of diffs() This will be wrapped with mappedgenerator.
Sun, 29 Apr 2018 22:27:05 +0530 remotenames: enable the storage config option if extension is enabled
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 29 Apr 2018 22:27:05 +0530] rev 38026
remotenames: enable the storage config option if extension is enabled Before this patch, the config option to store remotenames was set to False by default and remotenames extension does not set it True. So if you enable remotenames extension without setting 'experimental.remotenames=True', you won't get the remotenames. This patch makes remotenames enable the config option if then extension is enabled which makes sense. Differential Revision: https://phab.mercurial-scm.org/D3520
Sun, 29 Apr 2018 22:42:54 +0530 tests: clone the repo over ssh in tests/test-logexchange.t
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 29 Apr 2018 22:42:54 +0530] rev 38025
tests: clone the repo over ssh in tests/test-logexchange.t Cloning a local repo in tests, and normally too does not perform the actual clone, rather it copies the file contents. This makes remotenames information not being transferred. Let's clone over ssh so that we can test remotenames correctly. Differential Revision: https://phab.mercurial-scm.org/D3519
Sun, 29 Apr 2018 22:39:45 +0530 remotenames: check the remotepath with url containing user information too
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 29 Apr 2018 22:39:45 +0530] rev 38024
remotenames: check the remotepath with url containing user information too Current logic to match a remotepatch to a user defined path first removes the authentication information from the url and then tries to match it. However this is not true every time. If we clone a repo using ssh, the default path contains the user information too. Differential Revision: https://phab.mercurial-scm.org/D3518
Fri, 11 May 2018 09:16:26 -0700 shortest: avoid magic number "41"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 May 2018 09:16:26 -0700] rev 38023
shortest: avoid magic number "41" As suggested by Yuya. Feel free to fold into D3502. Differential Revision: https://phab.mercurial-scm.org/D3531
Fri, 11 May 2018 07:31:51 -0700 revlog: handle error from node lookup
Martin von Zweigbergk <martinvonz@google.com> [Fri, 11 May 2018 07:31:51 -0700] rev 38022
revlog: handle error from node lookup I missed this in D3499. Thanks to Yuya for spotting it. Differential Revision: https://phab.mercurial-scm.org/D3530
Fri, 11 May 2018 22:07:43 -0400 debugextensions: process extensions loaded from the local repository too
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 May 2018 22:07:43 -0400] rev 38021
debugextensions: process extensions loaded from the local repository too
Thu, 10 May 2018 22:13:13 -0400 phabricator: drop support for the deprecated `phabricator.token` config
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 22:13:13 -0400] rev 38020
phabricator: drop support for the deprecated `phabricator.token` config
Thu, 03 May 2018 18:22:02 +0900 help: load module doc of disabled extension in extensions.disabledcmd()
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 18:22:02 +0900] rev 38019
help: load module doc of disabled extension in extensions.disabledcmd() This helps rewriting _finddisablecmd() to not load the module.
Thu, 03 May 2018 18:15:43 +0900 extensions: extract closure that looks for commands from disabled module
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 18:15:43 +0900] rev 38018
extensions: extract closure that looks for commands from disabled module I'll rewrite this function to not load disabled extensions.
Thu, 03 May 2018 18:13:43 +0900 extensions: drop dead code trying to exclude deprecated disabled commands
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 18:13:43 +0900] rev 38017
extensions: drop dead code trying to exclude deprecated disabled commands Here 'ext' is a tuple, which means ext.__doc__ describes about the Python tuple type. Fixing this would break 'hg help glog', which currently shows some nice explanation, so this patch just removes the dead code. $ hg help glog 'glog' is provided by the following extension: graphlog command to view revision graphs from a shell (DEPRECATED) (use 'hg help extensions' for information on enabling extensions)
Fri, 11 May 2018 21:53:26 +0900 util: drop remainder of dateutil/procutil aliases (API)
Yuya Nishihara <yuya@tcha.org> [Fri, 11 May 2018 21:53:26 +0900] rev 38016
util: drop remainder of dateutil/procutil aliases (API)
Thu, 03 May 2018 15:57:12 -0700 shortest: move revnum-disambiguation out of revlog
Martin von Zweigbergk <martinvonz@google.com> [Thu, 03 May 2018 15:57:12 -0700] rev 38015
shortest: move revnum-disambiguation out of revlog I want to be able to change how we disambiguate and I think having revlog.shortest() worry only about finding a prefix that's unambiguous among nodeids makes more sense. This slows down `hg log -T '{shortest(node,1)}\n'` from 4.0s to 4.1s. Differential Revision: https://phab.mercurial-scm.org/D3502
Thu, 03 May 2018 15:25:16 -0700 shortest: remove unnecessary check for revnum in isvalid()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 03 May 2018 15:25:16 -0700] rev 38014
shortest: remove unnecessary check for revnum in isvalid() We now always disambiguating against revnums after we've found an otherwise valid prefix, so we can safely remove the early isrev() check in isvalid(). Differential Revision: https://phab.mercurial-scm.org/D3501
Thu, 03 May 2018 15:01:33 -0700 shortest: make pure code also disambigute against revnums at end
Martin von Zweigbergk <martinvonz@google.com> [Thu, 03 May 2018 15:01:33 -0700] rev 38013
shortest: make pure code also disambigute against revnums at end This makes the pure code more similar to the native code in that it first finds a prefix that's unambiguous among nodeids and then adds hex digits until it no longer looks like a revnum. It will allow us to even better separate the disambiguation with revnums in a later patch. With this patch `hg log -r 0::50 -T '{shortest(node,1)}'` with no native code goes from 25s to 43s. It wasn't exactly usable to begin with, so I don't feel too bad about it. Differential Revision: https://phab.mercurial-scm.org/D3500
Wed, 02 May 2018 23:17:58 -0700 revlog: use node tree (native code) for shortest() calculation
Martin von Zweigbergk <martinvonz@google.com> [Wed, 02 May 2018 23:17:58 -0700] rev 38012
revlog: use node tree (native code) for shortest() calculation I want to rewrite revlog.shortest() to disambiguate only among hex nodeids and then disambiguate the result with revnums at a higher level (in scmutil). However, that would slow down `hg log -T '{shortest(node,1)}\n'` from 5.0s to 6.8s, which I wasn't sure would be acceptable. So this patch makes revlog.shortest() use the node tree for finding the length of the shortest prefix that's unambiguous among nodeids. Once that has been found, it makes it longer until it is also not ambiguous with a revnum. This speeds up `hg log -T '{shortest(node,1)}\n'` from 5.0s to 4.0s. Differential Revision: https://phab.mercurial-scm.org/D3499
Mon, 07 May 2018 16:49:31 -0700 shelve: reduce scope of merge tool config override
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 16:49:31 -0700] rev 38011
shelve: reduce scope of merge tool config override The config override seems to have a much greater scope than it needed to. I *think* it's only relevant in the while merging files. The rebase step also cares about the merge tool, but we seem to be explicitly passing it to rebase (around line 755). Differential Revision: https://phab.mercurial-scm.org/D3517
Thu, 10 May 2018 21:43:32 -0400 util: drop _deprecatedfunc()
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 21:43:32 -0400] rev 38010
util: drop _deprecatedfunc() It was only needed for the previously removed forwarding.
Thu, 10 May 2018 21:41:19 -0400 util: drop deprecated forwarding to procutil (API)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 21:41:19 -0400] rev 38009
util: drop deprecated forwarding to procutil (API)
Fri, 11 May 2018 00:58:51 -0400 tests: migrate demandimport.py away from deprecated `util` module symbols
Matt Harbison <matt_harbison@yahoo.com> [Fri, 11 May 2018 00:58:51 -0400] rev 38008
tests: migrate demandimport.py away from deprecated `util` module symbols
Thu, 10 May 2018 22:00:41 -0400 templatekw: drop deprecated showlist() and showdict() (API)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 22:00:41 -0400] rev 38007
templatekw: drop deprecated showlist() and showdict() (API)
Thu, 10 May 2018 21:37:23 -0400 util: drop deprecated forwarding to dateutil (API)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 21:37:23 -0400] rev 38006
util: drop deprecated forwarding to dateutil (API)
Thu, 10 May 2018 21:34:40 -0400 util: drop deprecated forwarding to stringutil (API)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 21:34:40 -0400] rev 38005
util: drop deprecated forwarding to stringutil (API)
Fri, 11 May 2018 00:55:01 -0400 scmutil: remove deprecated revpairnodes method (API)
Augie Fackler <augie@google.com> [Fri, 11 May 2018 00:55:01 -0400] rev 38004
scmutil: remove deprecated revpairnodes method (API)
Fri, 11 May 2018 00:54:37 -0400 merge: drop support for using updateresults as tuples (API)
Augie Fackler <augie@google.com> [Fri, 11 May 2018 00:54:37 -0400] rev 38003
merge: drop support for using updateresults as tuples (API)
Fri, 11 May 2018 00:54:12 -0400 cmdutil: drop deprecated log helper methods (API)
Augie Fackler <augie@google.com> [Fri, 11 May 2018 00:54:12 -0400] rev 38002
cmdutil: drop deprecated log helper methods (API)
Thu, 10 May 2018 21:53:48 -0400 cmdutil: drop deprecated precursor of registrar.command (API)
Matt Harbison <matt_harbison@yahoo.com> [Thu, 10 May 2018 21:53:48 -0400] rev 38001
cmdutil: drop deprecated precursor of registrar.command (API)
Fri, 11 May 2018 00:53:29 -0400 cmdutil: remove deprecated _revertprefetch code (API)
Augie Fackler <augie@google.com> [Fri, 11 May 2018 00:53:29 -0400] rev 38000
cmdutil: remove deprecated _revertprefetch code (API)
Fri, 11 May 2018 00:50:21 -0400 tests: fix deprecation warning in test-url.py
Augie Fackler <augie@google.com> [Fri, 11 May 2018 00:50:21 -0400] rev 37999
tests: fix deprecation warning in test-url.py
Tue, 03 Apr 2018 23:34:55 +0900 hgweb: remove unused argument 'tmpl' from listfilediffs()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:34:55 +0900] rev 37998
hgweb: remove unused argument 'tmpl' from listfilediffs()
Tue, 03 Apr 2018 23:33:54 +0900 hgweb: use template context to render {files} of changelist entries
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:33:54 +0900] rev 37997
hgweb: use template context to render {files} of changelist entries This is a preferred way to process nested templates.
Tue, 03 Apr 2018 23:32:16 +0900 hgweb: wrap {files} of changelist entries with mappedgenerator
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:32:16 +0900] rev 37996
hgweb: wrap {files} of changelist entries with mappedgenerator This also switches the associated templates conditionally, which can't be a mappinggenerator.
Tue, 03 Apr 2018 23:31:11 +0900 hgweb: use template context to render {files} of changesetentry()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:31:11 +0900] rev 37995
hgweb: use template context to render {files} of changesetentry() This is a preferred way to process nested templates.
Tue, 03 Apr 2018 23:29:11 +0900 hgweb: wrap {files} of changesetentry() with mappedgenerator
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:29:11 +0900] rev 37994
hgweb: wrap {files} of changesetentry() with mappedgenerator This can't be easily adapted to mappinggenerator because the associated templates are switched per item.
Tue, 03 Apr 2018 23:25:32 +0900 hgweb: extract generator of {files} from changesetentry()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 23:25:32 +0900] rev 37993
hgweb: extract generator of {files} from changesetentry() This will be wrapped with mappedgenerator.
Sat, 16 Jan 2016 19:23:53 +0900 templatefilters: document the json filter
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Jan 2016 19:23:53 +0900] rev 37992
templatefilters: document the json filter I don't know the exact reason why it was undocumented, but that would be because unicode is difficult for humans. Since the json filter can now get localstr back to UTF-8 as long as it is unprocessed (i.e. {desc|json} works, but {desc|firstline|json} doesn't), it seems good enough to advertise the json filter.
Sun, 23 Apr 2017 13:15:30 +0900 encoding: introduce tagging type for non-lossy non-ASCII string
Yuya Nishihara <yuya@tcha.org> [Sun, 23 Apr 2017 13:15:30 +0900] rev 37991
encoding: introduce tagging type for non-lossy non-ASCII string This fixes the weird behavior of toutf8b(), which would convert a local string back to UTF-8 *only if* it was lossy in the system encoding. Before b7b26e54e37a "encoding: avoid localstr when a string can be encoded losslessly (issue2763)", all local strings were wrapped by the localstr class. I think this would justify the round-trip behavior of toutf8b(). ASCII strings are special-cased, so the cost of wrapping with safelocalstr is negligible. (with mercurial repo) $ export HGRCPATH=/dev/null HGPLAIN= HGENCODING=latin-1 $ hg log --time --config experimental.evolution=all > /dev/null (original) time: real 11.340 secs (user 11.290+0.000 sys 0.060+0.000) time: real 11.390 secs (user 11.300+0.000 sys 0.080+0.000) time: real 11.430 secs (user 11.360+0.000 sys 0.070+0.000) (this patch) time: real 11.200 secs (user 11.100+0.000 sys 0.100+0.000) time: real 11.370 secs (user 11.300+0.000 sys 0.070+0.000) time: real 11.190 secs (user 11.130+0.000 sys 0.060+0.000)
Sun, 22 Apr 2018 11:38:53 +0900 encoding: fix toutf8b() to resurrect lossy characters even if "\xed" in it
Yuya Nishihara <yuya@tcha.org> [Sun, 22 Apr 2018 11:38:53 +0900] rev 37990
encoding: fix toutf8b() to resurrect lossy characters even if "\xed" in it If 's' is a localstr, 's._utf8' must be returned to get the original UTF-8 sequence back. Because of this, it was totally wrong to test if '"\xed" not in s', which should be either '"\xed" not in s._utf8' or just omitted. This patch moves the localstr handling to top as the validity of 's._utf8' should be pre-checked by encoding.tolocal().
Sun, 25 Mar 2018 16:47:33 +0900 sshserver: redirect stdin/stdout early and use duplicated streams
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 16:47:33 +0900] rev 37989
sshserver: redirect stdin/stdout early and use duplicated streams This is what we achieved with hook.redirect(True) plus ui.fout = ui.ferr. The hook.redirect() function can't be completely removed yet since hgweb still depends on it. I'm not sure if it is necessary for WSGI servers. CGI needs it, but does WSGI communicate over stdin/stdout channels?
Sun, 25 Mar 2018 16:35:24 +0900 sshserver: do setbinary() by caller (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 16:35:24 +0900] rev 37988
sshserver: do setbinary() by caller (API) In most cases, stdio should be set to binary mode by the dispatcher, so the sshserver does not have to take care of that. The only exception was hg-ssh, which is fixed by this patch. .. api:: ``sshserver()`` no longer sets stdin and stdout to binary mode.
Sun, 25 Mar 2018 16:39:17 +0900 test-ssh: add some flush() to make output deterministic
Yuya Nishihara <yuya@tcha.org> [Sun, 25 Mar 2018 16:39:17 +0900] rev 37987
test-ssh: add some flush() to make output deterministic We shouldn't rely on buffering mode/state of file handles.
Thu, 10 May 2018 21:08:32 +0900 stringutil: flip the default of pprint() to bprefix=False
Yuya Nishihara <yuya@tcha.org> [Thu, 10 May 2018 21:08:32 +0900] rev 37986
stringutil: flip the default of pprint() to bprefix=False If we use pprint() as a drop-in replacement for repr(), bprefix=False is more appropriate. Let's make it the default to remove bprefix=False noise.
Thu, 10 May 2018 21:00:58 +0900 stringutil: make pprint() forward uninteresting object to b'%r'
Yuya Nishihara <yuya@tcha.org> [Thu, 10 May 2018 21:00:58 +0900] rev 37985
stringutil: make pprint() forward uninteresting object to b'%r' We appear to start using pprint() as a replacement for repr(), so it's probably safer to support any Python objects instead of complaining about that.
Fri, 27 Apr 2018 13:46:54 -0400 tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:46:54 -0400] rev 37984
tests: use stringutil.pprint instead of custom dumper in test-hgweb-auth.py Differential Revision: https://phab.mercurial-scm.org/D3529
Fri, 27 Apr 2018 13:43:59 -0400 tests: port test-simplekeyvaluefile.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:43:59 -0400] rev 37983
tests: port test-simplekeyvaluefile.py to Python 3 # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D3528
Fri, 27 Apr 2018 13:39:45 -0400 tests: port test-extensions-wrapfunction to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:39:45 -0400] rev 37982
tests: port test-extensions-wrapfunction to Python 3 Differential Revision: https://phab.mercurial-scm.org/D3527
Fri, 27 Apr 2018 13:15:51 -0400 tests: port test-ui-config to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:15:51 -0400] rev 37981
tests: port test-ui-config to Python 3 Slight test output changes to make life easier. Differential Revision: https://phab.mercurial-scm.org/D3526
Fri, 27 Apr 2018 13:37:10 -0400 config: fix py3 backslash escaping bug in parser caught by tests
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:37:10 -0400] rev 37980
config: fix py3 backslash escaping bug in parser caught by tests Differential Revision: https://phab.mercurial-scm.org/D3525
Fri, 27 Apr 2018 13:27:18 -0400 tests: port test-symlink-os-yes-fs-no.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:27:18 -0400] rev 37979
tests: port test-symlink-os-yes-fs-no.py to Python 3 # skip-blame just bytes/str changes Differential Revision: https://phab.mercurial-scm.org/D3524
Fri, 27 Apr 2018 13:26:43 -0400 posix: use inst.errno instead of inst[0] on OSError instances
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:26:43 -0400] rev 37978
posix: use inst.errno instead of inst[0] on OSError instances Differential Revision: https://phab.mercurial-scm.org/D3523
Fri, 27 Apr 2018 13:17:24 -0400 tests: port test-filelog.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:17:24 -0400] rev 37977
tests: port test-filelog.py to Python 3 # skip-blame just some bytes prefixes Differential Revision: https://phab.mercurial-scm.org/D3522
Fri, 27 Apr 2018 13:15:16 -0400 stringutil: teach pprint about tuples
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:15:16 -0400] rev 37976
stringutil: teach pprint about tuples Differential Revision: https://phab.mercurial-scm.org/D3521
Thu, 19 Apr 2018 21:00:12 +0900 templatefuncs: show hint if extdata source is evaluated to empty (issue5843)
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 21:00:12 +0900] rev 37975
templatefuncs: show hint if extdata source is evaluated to empty (issue5843)
Fri, 04 May 2018 21:31:34 -0700 revlog: use literal -1 instead of variable that always has that value
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 May 2018 21:31:34 -0700] rev 37974
revlog: use literal -1 instead of variable that always has that value We were setting "ntrev" to "rev", but "rev" was always -1 at the end of the loop, so it's clearer to use a literal -1. Differential Revision: https://phab.mercurial-scm.org/D3498
Fri, 04 May 2018 22:17:28 -0700 revlog: extract function for fully populating the radix tree
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 May 2018 22:17:28 -0700] rev 37973
revlog: extract function for fully populating the radix tree This code is currently used for partialmatch(), but I want to reuse it when I implement shortest() in native code. Differential Revision: https://phab.mercurial-scm.org/D3497
Fri, 27 Apr 2018 12:07:57 -0400 tests: port test-lfs-pointer.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 12:07:57 -0400] rev 37972
tests: port test-lfs-pointer.py to Python 3 The weird bit here is having to import /something/ from Mercurial before we touch hgext.* so that the module loader gets initialized. That's probably a bug we should explore at some point? Differential Revision: https://phab.mercurial-scm.org/D3514
Fri, 27 Apr 2018 13:09:19 -0400 tests: port test-ui-verbosity.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 13:09:19 -0400] rev 37971
tests: port test-ui-verbosity.py to Python 3 # skip-blame just some bytes/string wrangling Differential Revision: https://phab.mercurial-scm.org/D3515
Fri, 27 Apr 2018 12:07:32 -0400 lfs: stabilize error message values for Python 2 and 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 12:07:32 -0400] rev 37970
lfs: stabilize error message values for Python 2 and 3 Differential Revision: https://phab.mercurial-scm.org/D3513
Fri, 27 Apr 2018 11:59:21 -0400 tests: port test-ui-color.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:59:21 -0400] rev 37969
tests: port test-ui-color.py to Python 3 As in some other tests, I like confirming that we're dealing with bytes here, so the b prefix is now in the expected output on both 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D3512
Fri, 27 Apr 2018 11:57:15 -0400 tests: port test-dispatch.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:57:15 -0400] rev 37968
tests: port test-dispatch.py to Python 3 Differential Revision: https://phab.mercurial-scm.org/D3511
Fri, 27 Apr 2018 11:55:04 -0400 tests: port test-wireproto.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:55:04 -0400] rev 37967
tests: port test-wireproto.py to Python 3 A little bit of output churn because we now get b'' prefixes on output in both 2 and 3, but for this test I'm more comfortable knowing that we're using bytestrs everywhere. Differential Revision: https://phab.mercurial-scm.org/D3510
Fri, 27 Apr 2018 11:50:24 -0400 tests: port test-context.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:50:24 -0400] rev 37966
tests: port test-context.py to Python 3 This is a weird "minimally invasive" port. I think there's room to do better here, but I'm also not sure how often we'll touch this code... Differential Revision: https://phab.mercurial-scm.org/D3509
Fri, 27 Apr 2018 11:49:49 -0400 scmutil: fix __repr__ of status tuple
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:49:49 -0400] rev 37965
scmutil: fix __repr__ of status tuple We should probably start giving some thought to migrating the status tuple to attrs, but not now. Differential Revision: https://phab.mercurial-scm.org/D3508
Mon, 07 May 2018 19:43:43 -0700 update: print warning about hidden changeset after update
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 19:43:43 -0700] rev 37964
update: print warning about hidden changeset after update When an attempt to update to a hidden changeset fails because the working copy is dirty, you may get a message like this: updating to a hidden changeset 343f6de32686 (hidden revision '343f6de32686' was rewritten as: 4ab941244072) abort: conflicting changes (commit or update --clean to discard changes) It's easy to miss the real error here. This patch moves the warning about the hidden changeset to after the update has happened. It changes the verb tense accordingly (and drops the "a" that I think it sounds better without). Of course, this means that the commit isn't actually hidden anymore when the message is printed. I think that's fine. Differential Revision: https://phab.mercurial-scm.org/D3479
Fri, 27 Apr 2018 01:35:00 -0400 py3: whitelist three passing cvs convert tests
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:35:00 -0400] rev 37963
py3: whitelist three passing cvs convert tests Differential Revision: https://phab.mercurial-scm.org/D3490
Fri, 27 Apr 2018 01:32:21 -0400 cvsps: convert encoding name to sysstr
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:32:21 -0400] rev 37962
cvsps: convert encoding name to sysstr Differential Revision: https://phab.mercurial-scm.org/D3489
Wed, 09 May 2018 13:46:31 -0700 tweakdefaults: remove "bisect" from commands.status.skipstates
Martin von Zweigbergk <martinvonz@google.com> [Wed, 09 May 2018 13:46:31 -0700] rev 37961
tweakdefaults: remove "bisect" from commands.status.skipstates If you forget to clear bisect state after you're done bisecting (as I've done twice in the last week or so), the next time you run `hg bisect --good/--bad`, it's going to tell you "The first bad revision is:" etc. It's probably not obvious to new users what's going on, and having the verbose output about an ongoing bisection will probably help them, so let's turn it back on by default. Differential Revision: https://phab.mercurial-scm.org/D3516
Tue, 03 Apr 2018 22:58:33 +0900 hgweb: wrap {instabilities} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 22:58:33 +0900] rev 37960
hgweb: wrap {instabilities} by hybridlist() This is a list of simple values, which can be a hybrid list.
Tue, 03 Apr 2018 22:55:33 +0900 hgweb: wrap {whyunstable} with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 22:55:33 +0900] rev 37959
hgweb: wrap {whyunstable} with mappinggenerator This is also a generator of mappings, which needs a wrapper.
Tue, 03 Apr 2018 22:54:36 +0900 hgweb: wrap {succsandmarkers} with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Tue, 03 Apr 2018 22:54:36 +0900] rev 37958
hgweb: wrap {succsandmarkers} with mappinggenerator This is also a generator of mappings, which needs a wrapper.
Mon, 02 Apr 2018 00:46:33 +0900 hgweb: wrap {branches} and {entries} of branches with mappinggenerator
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:46:33 +0900] rev 37957
hgweb: wrap {branches} and {entries} of branches with mappinggenerator Bare generator of mappings shouldn't be put in a template mapping because its type can't be determined without consuming it.
Mon, 02 Apr 2018 00:41:19 +0900 hgweb: drop tmpl argument from webutil.showtag() and showbookmark()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:41:19 +0900] rev 37956
hgweb: drop tmpl argument from webutil.showtag() and showbookmark() It's replaced by a context argument passed to a mappinggenerator.
Mon, 02 Apr 2018 00:39:26 +0900 hgweb: wrap {changelogtag}, {changesettag}, and {changesetbookmark}
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:39:26 +0900] rev 37955
hgweb: wrap {changelogtag}, {changesettag}, and {changesetbookmark} These can't be hybrid lists as they've associated with named template, 't1'.
Mon, 02 Apr 2018 00:29:31 +0900 hgweb: drop useless **args from webutil.showtag() and showbookmark()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:29:31 +0900] rev 37954
hgweb: drop useless **args from webutil.showtag() and showbookmark() Callers never pass excessive arguments to these functions.
Tue, 08 May 2018 19:00:01 +0800 hgweb: reuse graph node-related functions from templates
Anton Shestakov <av6@dwimlabs.net> [Tue, 08 May 2018 19:00:01 +0800] rev 37953
hgweb: reuse graph node-related functions from templates The difference between templatekw.getgraphnode() and webutil.getgraphnode() is that the latter is not limited to 1 character.
Tue, 08 May 2018 17:54:57 +0800 templates: split getgraphnode() body into two functions
Anton Shestakov <av6@dwimlabs.net> [Tue, 08 May 2018 17:54:57 +0800] rev 37952
templates: split getgraphnode() body into two functions getgraphnodecurrent() is checking if the node is currently checked out and getgraphnodesymbol() is checking properties that have more to do with the stored data and the DAG.
Mon, 02 Apr 2018 00:06:39 +0900 hgweb: wrap {branch} and {changesetbranch} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:06:39 +0900] rev 37951
hgweb: wrap {branch} and {changesetbranch} by hybridlist() This is also a 0/1-length list of a simple value, can be a hybrid list. Appears that we have many {branch} variants.
Mon, 02 Apr 2018 00:05:38 +0900 hgweb: wrap {inbranch} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:05:38 +0900] rev 37950
hgweb: wrap {inbranch} by hybridlist() This is also a 0/1-length list of a simple value, can be a hybrid list.
Mon, 02 Apr 2018 00:04:53 +0900 hgweb: wrap {branches} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:04:53 +0900] rev 37949
hgweb: wrap {branches} by hybridlist() This is a 0/1-length list of a simple value, can be a hybrid list.
Mon, 02 Apr 2018 00:03:49 +0900 hgweb: wrap {bookmarks} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:03:49 +0900] rev 37948
hgweb: wrap {bookmarks} by hybridlist() This is also a list of simple values.
Mon, 02 Apr 2018 00:02:36 +0900 hgweb: wrap {tags} by hybridlist()
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:02:36 +0900] rev 37947
hgweb: wrap {tags} by hybridlist() This one is a list of simple values, which can be a hybrid list.
Mon, 02 Apr 2018 00:00:29 +0900 hgweb: wrap {rename} with mappinglist
Yuya Nishihara <yuya@tcha.org> [Mon, 02 Apr 2018 00:00:29 +0900] rev 37946
hgweb: wrap {rename} with mappinglist No bare list of mappings should be put in a template mapping.
Fri, 27 Apr 2018 11:23:41 -0400 tests: fix test-status-inprocess.py on Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:23:41 -0400] rev 37945
tests: fix test-status-inprocess.py on Python 3 The same print() hack as test-filecache.py. Differential Revision: https://phab.mercurial-scm.org/D3507
Fri, 27 Apr 2018 11:22:00 -0400 tests: port test-filecache.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:22:00 -0400] rev 37944
tests: port test-filecache.py to Python 3 Only remarkable bit is my wrapper around print(), which I regret a little, but not enough to go back and try to do something cleaner. Differential Revision: https://phab.mercurial-scm.org/D3506
Fri, 27 Apr 2018 11:07:24 -0400 tests: port test-cbor.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:07:24 -0400] rev 37943
tests: port test-cbor.py to Python 3 I suspect this b''.join() was a remnant of an earlier iteration of this code, as it was building a string from a string. Differential Revision: https://phab.mercurial-scm.org/D3505
Fri, 27 Apr 2018 11:06:49 -0400 cborutil: port to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 11:06:49 -0400] rev 37942
cborutil: port to Python 3 The only problem lurking in here was sorts of mismatched types. The sorts are only for output stability in our tests (sigh), so we just build a phony sort key using the __name__ of types so that we only compare like types against each other. By pure luck, my awful sort key matches the behavior we get "for free" in Python 2, so no test output changes. Differential Revision: https://phab.mercurial-scm.org/D3504
Fri, 27 Apr 2018 10:58:08 -0400 lock: pass sysstr to warnings module
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:58:08 -0400] rev 37941
lock: pass sysstr to warnings module This makes test-lock.py slightly less broken, but it's still pretty far from passing. Differential Revision: https://phab.mercurial-scm.org/D3503
Fri, 27 Apr 2018 10:46:33 -0400 tests: port test-revlog-raw.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:46:33 -0400] rev 37940
tests: port test-revlog-raw.py to Python 3 # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D3496
Fri, 27 Apr 2018 10:40:04 -0400 tests: migrate test-wsgirequest.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:40:04 -0400] rev 37939
tests: migrate test-wsgirequest.py to Python 3 # skip-blame adding and removing b prefixes Differential Revision: https://phab.mercurial-scm.org/D3495
Fri, 27 Apr 2018 10:31:49 -0400 tests: port test-parseindex2.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:31:49 -0400] rev 37938
tests: port test-parseindex2.py to Python 3 # skip-blame just b prefixes and int() instead of long() Differential Revision: https://phab.mercurial-scm.org/D3494
Fri, 27 Apr 2018 10:30:24 -0400 tests: prefer string concatenation with () instead of \ in parseindex2 tests
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:30:24 -0400] rev 37937
tests: prefer string concatenation with () instead of \ in parseindex2 tests Differential Revision: https://phab.mercurial-scm.org/D3493
Fri, 27 Apr 2018 10:17:48 -0400 tests: port test-simplemerge.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:17:48 -0400] rev 37936
tests: port test-simplemerge.py to Python 3 # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D3492
Fri, 27 Apr 2018 10:21:24 -0400 tests: replace use of assertEquals with assertEqual in test-simplemerge.py
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 10:21:24 -0400] rev 37935
tests: replace use of assertEquals with assertEqual in test-simplemerge.py The former is deprecated. No functionality change. # skip-blame just removing an ess and some whitespace Differential Revision: https://phab.mercurial-scm.org/D3491
Fri, 27 Apr 2018 01:30:29 -0400 tests: b prefixes on some inline python in test-convert-cvs.t
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:30:29 -0400] rev 37934
tests: b prefixes on some inline python in test-convert-cvs.t # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D3488
Fri, 27 Apr 2018 01:28:56 -0400 cvsps: wrap bytes in bytestr before %r-ing it
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:28:56 -0400] rev 37933
cvsps: wrap bytes in bytestr before %r-ing it Differential Revision: https://phab.mercurial-scm.org/D3487
Fri, 27 Apr 2018 01:27:22 -0400 convcmd: make a copy of heads before mutating it
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:27:22 -0400] rev 37932
convcmd: make a copy of heads before mutating it Differential Revision: https://phab.mercurial-scm.org/D3486
Fri, 27 Apr 2018 01:26:23 -0400 cvsps: portably convert int to bytes
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:26:23 -0400] rev 37931
cvsps: portably convert int to bytes Differential Revision: https://phab.mercurial-scm.org/D3485
Fri, 27 Apr 2018 01:24:04 -0400 cvsps: wrap cmp methods (deprecated) in functools.cmp_to_key
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:24:04 -0400] rev 37930
cvsps: wrap cmp methods (deprecated) in functools.cmp_to_key Differential Revision: https://phab.mercurial-scm.org/D3484
Fri, 27 Apr 2018 01:18:43 -0400 tests: port inline extension in test-convert-cvs.t to py3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:18:43 -0400] rev 37929
tests: port inline extension in test-convert-cvs.t to py3 # skip-blame two b prefixes, nothing more Differential Revision: https://phab.mercurial-scm.org/D3483
Fri, 27 Apr 2018 01:14:23 -0400 cvsps: add b prefixes to regular expressions
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 01:14:23 -0400] rev 37928
cvsps: add b prefixes to regular expressions # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D3482
Fri, 27 Apr 2018 00:50:08 -0400 minirst: fix bytes slicing defect on Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:50:08 -0400] rev 37927
minirst: fix bytes slicing defect on Python 3 This is the only lingering problem in minirst on Python 3. test-minirst.py now passes on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3478
Fri, 27 Apr 2018 00:46:05 -0400 tests: port test-minirst.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:46:05 -0400] rev 37926
tests: port test-minirst.py to Python 3 There are a few failures here, mostly around formatting lists. I'll fix that in a subsequent change. Differential Revision: https://phab.mercurial-scm.org/D3477
Fri, 27 Apr 2018 00:31:57 -0400 tests: use stringutil.pprint instead of pprint.pprint in test-minirst.py
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:31:57 -0400] rev 37925
tests: use stringutil.pprint instead of pprint.pprint in test-minirst.py Stabilizes some output on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3476
Fri, 27 Apr 2018 00:24:45 -0400 tests: port test-pathencode.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:24:45 -0400] rev 37924
tests: port test-pathencode.py to Python 3 # skip-blame uninteresting changes, mainly b prefixes Differential Revision: https://phab.mercurial-scm.org/D3475
Fri, 27 Apr 2018 00:18:46 -0400 tests: port test-hgwebdir-paths.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:18:46 -0400] rev 37923
tests: port test-hgwebdir-paths.py to Python 3 # skip-blame just b prefixes, nothing interesting Differential Revision: https://phab.mercurial-scm.org/D3474
Fri, 27 Apr 2018 00:17:17 -0400 tests: port test-walkrepo.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:17:17 -0400] rev 37922
tests: port test-walkrepo.py to Python 3 # skip-blame just b prefixes, nothing interesting Differential Revision: https://phab.mercurial-scm.org/D3473
Fri, 27 Apr 2018 00:14:23 -0400 tests: port test-minifileset.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:14:23 -0400] rev 37921
tests: port test-minifileset.py to Python 3 # skip-blame all b prefixes, nothing interesting Differential Revision: https://phab.mercurial-scm.org/D3472
Fri, 27 Apr 2018 00:13:56 -0400 minifileset: fix on Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:13:56 -0400] rev 37920
minifileset: fix on Python 3 Found by porting test-minifileset.py to Python 3. Differential Revision: https://phab.mercurial-scm.org/D3471
Fri, 27 Apr 2018 00:08:48 -0400 tests: port test-url.py to Python 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:08:48 -0400] rev 37919
tests: port test-url.py to Python 3 # skip-blame it's all b prefixes and pycompat.bytestr() wrappers Differential Revision: https://phab.mercurial-scm.org/D3470
Fri, 27 Apr 2018 00:08:21 -0400 tests: fix error case in test-url.py's doctest
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:08:21 -0400] rev 37918
tests: fix error case in test-url.py's doctest This required some careful attention, so I wanted to split it out from the uninteresting bits that'll be in the next change. Differential Revision: https://phab.mercurial-scm.org/D3469
Fri, 27 Apr 2018 00:06:08 -0400 util: make util.url __repr__ consistent on Python 2 and 3
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:06:08 -0400] rev 37917
util: make util.url __repr__ consistent on Python 2 and 3 Differential Revision: https://phab.mercurial-scm.org/D3468
Fri, 27 Apr 2018 00:05:46 -0400 sslutil: fix some edge cases in Python 3 support
Augie Fackler <augie@google.com> [Fri, 27 Apr 2018 00:05:46 -0400] rev 37916
sslutil: fix some edge cases in Python 3 support Detected by fixing up test-url.py on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3467
Thu, 26 Apr 2018 23:33:27 -0400 tests: port test-hybridencode.py to unittest
Augie Fackler <augie@google.com> [Thu, 26 Apr 2018 23:33:27 -0400] rev 37915
tests: port test-hybridencode.py to unittest This was done predominantly through keyboard macros in emacs, so it's not always pretty, but it's enough to make the test easier to work with. There's a ton of room for improvement in this file, but it would be labor intensive and error-prone, so I went with the dumbest option that could work, so as to avoid transcription errors. Paranoia: $ egrep '^ def test' tests/test-hybridencode.py | wc -l 44 $ egrep '^ def test' tests/test-hybridencode.py | sort | uniq | wc -l so I'm pretty confident there aren't any shadowed test methods. This fixes the test on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3466
Thu, 26 Apr 2018 21:39:35 -0400 tests: make test-check-interfaces.py work on Python 3
Augie Fackler <augie@google.com> [Thu, 26 Apr 2018 21:39:35 -0400] rev 37914
tests: make test-check-interfaces.py work on Python 3 # skip-blame just a bunch of bytes prefixes Differential Revision: https://phab.mercurial-scm.org/D3465
Thu, 26 Apr 2018 21:38:49 -0400 scmutil: clean up bytes/string cache decorator mess on Python 3 again
Augie Fackler <augie@google.com> [Thu, 26 Apr 2018 21:38:49 -0400] rev 37913
scmutil: clean up bytes/string cache decorator mess on Python 3 again The previous fix to this area worked, but was dropping bytes in __dict__ on Python 3. This was causing subtle breakage in test-check-interfaces.py, and probably other things too. Fixed now. Differential Revision: https://phab.mercurial-scm.org/D3464
Mon, 07 May 2018 12:18:09 -0700 directaccess: use resolvehexnodeidprefix() instead of _partialmatch()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 12:18:09 -0700] rev 37912
directaccess: use resolvehexnodeidprefix() instead of _partialmatch() Same reasoning as previous commit: I want to make resolvehexnodeidprefix() move complex and don't want to duplicate that code in directaccess. Differential Revision: https://phab.mercurial-scm.org/D3463
Mon, 07 May 2018 14:32:55 -0700 revset: use resolvehexnodeidprefix() in id() predicate (BC)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 14:32:55 -0700] rev 37911
revset: use resolvehexnodeidprefix() in id() predicate (BC) We now have a public method for this purpose, so we don't need to access the private revlog._partialmatch(). Also, I'll probably make some changes to resolvehexnodeidprefix() later, and I want those to be reflected by the id() predicate. Note that this breaks a test case, because we now resolve the prefix in the unfiltered repo and get an ambiguous lookup, which results in no revision being added to the revset. The test case was already documented to be broken even though it wasn't. It's important to note that {shortest(node)} already uses the unfiltered repo, so we're not going to break people who get the prefix from there. I think we may not want to ever use shortest() in the filtered repo. It seems unlikely to be enough of a win to matter much. For example, in my hg repo, it would save me only 0.2 hex digits. In another repo that only I modify, it saves a little more, but it's still only 0.29 hex digits. It seems unlikely that people will prune enough commits that only 1/16 of the commits are visible (which is what it would take a to save a single hex digit). Instead, I'm working on another approach: allow ambiguous matches to be disambiguated within a user-specified revset. Whether or not that pans out, I hope we're okay with this little change in behavior for now and we can decide what to do about it later. Differential Revision: https://phab.mercurial-scm.org/D3311
Mon, 07 May 2018 14:32:43 -0700 revset: make id() an empty set for ambiguous nodeid (BC)
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 14:32:43 -0700] rev 37910
revset: make id() an empty set for ambiguous nodeid (BC) As Yuya pointed out in the review of D3311, id() (and rev()) does not raise an error when the input is an unknown identifier, so it doesn't make sense for it to do that when the input is ambiguous with a filtered node. However, it turned out that it already does raise an error when the input is ambiguous among the visible nodes. So let's start by fixing that. Differential Revision: https://phab.mercurial-scm.org/D3462
Sat, 05 May 2018 00:16:43 -0700 shortest: don't keep checking for longer prefix if node doesn't exist (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 05 May 2018 00:16:43 -0700] rev 37909
shortest: don't keep checking for longer prefix if node doesn't exist (API) If revlog.shortest() is called with an invalid nodeid, we keep checking if longer and longer prefixes are valid. We call revlog._partialmatch() for each prefix. That function will give us None if the node doesn't exist (and a RevlogError if it's ambiguous), so there's no need to keep checking. This patch instead makes revlog.shortest() raise a LookupError is the node does not exist, and updates the caller to handle it. Before this patch, revlog.shortest() would return the full hexnode for nonexistent nodeids. By the same reasoning as in 7b2955624777 (scmutil: make shortesthexnodeidprefix() take a full binary nodeid, 2018-04-14), it's not revlog.shortest() that should decide how to present nonexistent nodeids, so that's now moved to the template function. This should speed up cases where {shortest()} is applied to an invalid nodeid, but I couldn't think of a reasonable case where that would happen. Differential Revision: https://phab.mercurial-scm.org/D3461
Wed, 02 May 2018 22:56:10 -0700 shortest: extract function for checking if a prefix is a revnum
Martin von Zweigbergk <martinvonz@google.com> [Wed, 02 May 2018 22:56:10 -0700] rev 37908
shortest: extract function for checking if a prefix is a revnum Much of isvalid() was about testing if a prefix is a valid revnum. I want to reuse that soon, so let's move it out. There is no significant slowdown from the function call overhead. Differential Revision: https://phab.mercurial-scm.org/D3460
Thu, 03 May 2018 10:12:47 -0700 shortest: rename "test" variable to "prefix"
Martin von Zweigbergk <martinvonz@google.com> [Thu, 03 May 2018 10:12:47 -0700] rev 37907
shortest: rename "test" variable to "prefix" Sorry if this is considered churn, but "prefix" just seems much clearer to me. Differential Revision: https://phab.mercurial-scm.org/D3459
Wed, 02 May 2018 22:49:06 -0700 shortest: move some safe code out of exception block
Martin von Zweigbergk <martinvonz@google.com> [Wed, 02 May 2018 22:49:06 -0700] rev 37906
shortest: move some safe code out of exception block The RevlogError and WdirUnsupported could be raised by _partialmatch(), but not by the rest of isvalid(), so let's move the rest out to make it clearer. Differential Revision: https://phab.mercurial-scm.org/D3458
Fri, 04 May 2018 22:04:44 -0700 revlog: don't say "not found" on internal error
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 May 2018 22:04:44 -0700] rev 37905
revlog: don't say "not found" on internal error If index_node() returned NULL, then index_find_node() and and nt_partialmatch() used to return -2 to signal that the node was not found. However, we were passing in a revnum to index_node() that we knew should exist, so the only reason it could return NULL was due to some internal error or perhaps out of memory. Let's not use "not found" for these cases. I suppose we never noticed this because these error never happen in practice. I think there are more places where we should error out instead of reporting that the node was not found, but the cases mentioned above were all I cared about right now (because using the same error code for all failures simplified some future patches). Differential Revision: https://phab.mercurial-scm.org/D3457
Fri, 04 May 2018 21:58:43 -0700 revlog: extract function for getting node from known-to-exist rev
Martin von Zweigbergk <martinvonz@google.com> [Fri, 04 May 2018 21:58:43 -0700] rev 37904
revlog: extract function for getting node from known-to-exist rev Many of the calls to index_node() (which converts a rev to a nodeid) are done with a rev that's know to exist. If the function fails, there's something really wrong and we should just abort. This was done in only one place. This patch starts by extracting that code to a function that we can reuse in later patches. Differential Revision: https://phab.mercurial-scm.org/D3456
Mon, 07 May 2018 09:15:29 -0700 shortest: make {shortest("fffffffff")} work again
Martin von Zweigbergk <martinvonz@google.com> [Mon, 07 May 2018 09:15:29 -0700] rev 37903
shortest: make {shortest("fffffffff")} work again {shortest("fffffffff")} should shorten it to the shortest unambiguous prefix for the working directory. It used to do that until I broke it in 7b2955624777 (scmutil: make shortesthexnodeidprefix() take a full binary nodeid, 2018-04-14), when we started returning the full hex nodeid for any working directory prefix shorter than 40 hex digits. This patch fixes it by catching WdirUnsupported specifically. Differential Revision: https://phab.mercurial-scm.org/D3455
Sun, 29 Apr 2018 14:29:09 -0700 revlog: use radix tree also for matching keys shorter than 4 hex digits
Martin von Zweigbergk <martinvonz@google.com> [Sun, 29 Apr 2018 14:29:09 -0700] rev 37902
revlog: use radix tree also for matching keys shorter than 4 hex digits I don't know what the reason for the 4-digit limit was, and I can't think of any real disadvantages of using the radix tree also when the requested minimum length is short. This speeds up `hg log -T '{shortest(node,1)}\n'` from 2m16s to 4.5s by making that not fall back to pure code. Differential Revision: https://phab.mercurial-scm.org/D3453
Fri, 06 Apr 2018 12:55:32 -0700 context: convert to hex for error message only for 20-byte changeid
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 12:55:32 -0700] rev 37901
context: convert to hex for error message only for 20-byte changeid Now that 20-byte strings unambiguously mean binary (or a bug), we can specialize the conversion to hex for that case. Differential Revision: https://phab.mercurial-scm.org/D3452
Fri, 06 Apr 2018 12:59:17 -0700 context: clarify that only one attempt is made to interpret changeid
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 12:59:17 -0700] rev 37900
context: clarify that only one attempt is made to interpret changeid We can now tell what type of revision specifier we have just by looking at it (we no longer attempt to interpret it in one way after the other -- that's now in scmutil.revsymbol()). Let's clarify this in the code by swithing to if/elif. Differential Revision: https://phab.mercurial-scm.org/D3451
Fri, 06 Apr 2018 12:45:08 -0700 context: only bother looking for broken dirstate for 20-byte changeid
Martin von Zweigbergk <martinvonz@google.com> [Fri, 06 Apr 2018 12:45:08 -0700] rev 37899
context: only bother looking for broken dirstate for 20-byte changeid If we fail to look up a changeid in changectx.__init__, we check if it exactly matches any of the dirstate parents, and if it does, we print a more specific message ("working directory has unknown parent '...'!" instead of "unknown revision '...'"). The dirstate parents are always 20 bytes, so there's no need to check for a match when the given changeid is not 20 bytes. (And now that all the other allowed forms of changeid have been moved out of the constructor, there's no risk that a changeid that did match a dirstate parent was actually a valid bookmark.) Differential Revision: https://phab.mercurial-scm.org/D3450
Sat, 28 Apr 2018 23:16:41 -0700 context: drop support for looking up context by ambiguous changeid (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 28 Apr 2018 23:16:41 -0700] rev 37898
context: drop support for looking up context by ambiguous changeid (API) This removes support for using the changectx constructor (and thereby repo[x]) for looking up contexts by a stringified int, a namespace key (e.g. a bookmark), or a partial hex nodeid. This means that e.g. repo[<hex nodeid>] will now fail even if a bookmark with the same name exists (which is a good thing IMO). It also means that doing repo[<non-existent node>] no longer ends up loading namespaces (which was a surprising side-effect of creating of failing to create a context object that I recently ran into while debugging something unrelated to this series). Differential Revision: https://phab.mercurial-scm.org/D3449
Sat, 28 Apr 2018 23:54:07 -0700 tests: pass parent revision as integer to repo[x] in test-context-metadata.t
Martin von Zweigbergk <martinvonz@google.com> [Sat, 28 Apr 2018 23:54:07 -0700] rev 37897
tests: pass parent revision as integer to repo[x] in test-context-metadata.t Support for looking up by stringified int is going away. It's already deprecated, but I think I didn't notice this case because the test case pipes through `grep`. Differential Revision: https://phab.mercurial-scm.org/D3448
Sat, 05 May 2018 11:42:42 +0900 bookmarks: cache reverse mapping (issue5868)
Yuya Nishihara <yuya@tcha.org> [Sat, 05 May 2018 11:42:42 +0900] rev 37896
bookmarks: cache reverse mapping (issue5868) I chose a simpler implementation. If the initial cost of building reverse mapping is significant, we'll have to move it under @propertycache. The nodemap could be a dict of sets, but I think keeping a sorted list is better since each node is likely to have zero/one bookmark. Micro-benchmark with 1001 bookmarks and 1001 revisions: $ for n in `seq 0 1000`; do touch $n; hg book book$n; hg ci -qAm$n; done $ hg bookmarks --time > /dev/null (orig) time: real 0.040 secs (user 0.050+0.000 sys 0.000+0.000) (new) time: real 0.040 secs (user 0.040+0.000 sys 0.010+0.000) $ hg log -T '{bookmarks}\n' --time > /dev/null (orig) time: real 0.160 secs (user 0.160+0.000 sys 0.000+0.000) (new) time: real 0.090 secs (user 0.100+0.000 sys 0.000+0.000)
Sat, 05 May 2018 11:44:43 +0900 bookmarks: make argument names of _set/_del() more specific
Yuya Nishihara <yuya@tcha.org> [Sat, 05 May 2018 11:44:43 +0900] rev 37895
bookmarks: make argument names of _set/_del() more specific
Sat, 05 May 2018 11:34:03 +0900 bookmarks: extract function that looks up bookmark names by node
Yuya Nishihara <yuya@tcha.org> [Sat, 05 May 2018 11:34:03 +0900] rev 37894
bookmarks: extract function that looks up bookmark names by node
Sat, 05 May 2018 11:21:41 +0900 bookmarks: hide dict behind bmstore class
Yuya Nishihara <yuya@tcha.org> [Sat, 05 May 2018 11:21:41 +0900] rev 37893
bookmarks: hide dict behind bmstore class This should make it clearer that the bmstore doesn't expose all dict APIs.
Sat, 05 May 2018 19:00:03 -0700 tests: remove pid file by default
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 May 2018 19:00:03 -0700] rev 37892
tests: remove pid file by default Previously, killdaemons.py would kill PIDs listed in a file then leave the file lingering around. If the PIDs are killed, then there's no point leaving the PID file around. In the worst case, a later invocation of killdaemons.py (run-tests.py invokes killdaemons.py after running a test) could kill a separate process whose PID conflicted with a previously-killed process. By removing the PID file, we eliminate this possibility. Some tests were manually removing the PID file after calling killdaemons.py. So we update these tests to not do this. Differential Revision: https://phab.mercurial-scm.org/D3443
Mon, 30 Apr 2018 19:54:55 -0700 tests: remove #require killdaemons
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 30 Apr 2018 19:54:55 -0700] rev 37891
tests: remove #require killdaemons The killdaemons hghave feature has returned True since it was introduced in 448d0c452140. As such, "#require killdaemons" has no effect and is superfluous. So we remove instances of it. Differential Revision: https://phab.mercurial-scm.org/D3442
Sat, 05 May 2018 18:35:16 -0700 pycompat: export queue module instead of symbols in module (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 May 2018 18:35:16 -0700] rev 37890
pycompat: export queue module instead of symbols in module (API) Previously, pycompat and util re-exported individual symbols from the queue module. This had the side-effect of forcing the loading of the queue module whenever pycompat/util was imported. These symbols aren't used very often. So importing the module to get a handle on the symbols is wasteful. This commit changes pycompat so it no longer exports the individual symbols in the queue module. Instead, we make the imported module a "public" symbol. We drop the individual symbol aliases from the util module. All consumers are updated to use pycompat.queue.* instead. This change makes 300 invocations of `hg log -r. -T '{rev}\n'` a little faster: before: 18.44s after: 17.87s Differential Revision: https://phab.mercurial-scm.org/D3441
Sat, 05 May 2018 18:41:51 -0700 demandimport: make module ignores a set (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 May 2018 18:41:51 -0700] rev 37889
demandimport: make module ignores a set (API) The list of modules to ignore is used for membership testing. Yet it is defined as a list. Sets are more efficient for membership testing. So this commit converts the module list to a set. Since we took an API hit, I renamed the variable to further clarify the change. This appears to reduce the CPU time for running 300 invocations of `hg log -r. -T '{rev}'` on my i7-6700K: before: 18.64s after: 18.44s Differential Revision: https://phab.mercurial-scm.org/D3440
Thu, 19 Apr 2018 20:33:43 +0900 cmdutil: remove unused 'confirmopts' constant
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 20:33:43 +0900] rev 37888
cmdutil: remove unused 'confirmopts' constant Follows up f10cb49951e1.
Thu, 03 May 2018 15:08:16 +0900 formatter: ditch namedtuple in favor of attr
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 15:08:16 +0900] rev 37887
formatter: ditch namedtuple in favor of attr
Sun, 29 Apr 2018 15:52:01 +0900 log: consume --stat/patch options at constructor of changesetprinter
Yuya Nishihara <yuya@tcha.org> [Sun, 29 Apr 2018 15:52:01 +0900] rev 37886
log: consume --stat/patch options at constructor of changesetprinter The variable name, self.diffopts, was confusing. Let's split it to two booleans.
Sun, 29 Apr 2018 15:44:17 +0900 log: cache diffopts instance
Yuya Nishihara <yuya@tcha.org> [Sun, 29 Apr 2018 15:44:17 +0900] rev 37885
log: cache diffopts instance It appears that calling patch.diff*opts() repeatedly has some cost. $ hg log -T '{rev}\n' -R mercurial --time > /dev/null (orig) time: real 4.430 secs (user 4.370+0.000 sys 0.050+0.000) (new) time: real 1.950 secs (user 1.880+0.000 sys 0.060+0.000) 'diffopts or {}' isn't necessary as patch.diff*opts() accepts opts=None.
Sat, 05 May 2018 18:06:45 -0700 merge with stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 05 May 2018 18:06:45 -0700] rev 37884
merge with stable
Sun, 01 Jul 2018 23:36:53 +0900 encoding: alias cp65001 to utf-8 on Windows stable
Yuya Nishihara <yuya@tcha.org> [Sun, 01 Jul 2018 23:36:53 +0900] rev 37883
encoding: alias cp65001 to utf-8 on Windows As far as I can tell, cp65001 is the Windows name for UTF-8. I don't know how different it is from the UTF-8, but Python 3 appears to have introduced new codec for cp65001, so the alias is enabled only for Python 2. https://bugs.python.org/issue13216 This patch is untested, but hopefully fixes the following issue. https://bitbucket.org/tortoisehg/thg/issues/5127/
Wed, 04 Jul 2018 14:19:13 +0200 windows: fix incorrect detection of broken pipe when writing to pager stable
Sune Foldager <cryo@cyanite.org> [Wed, 04 Jul 2018 14:19:13 +0200] rev 37882
windows: fix incorrect detection of broken pipe when writing to pager Paging e.g. hg incoming on Windows and quitting the pager before the output is consumed will print 'abort: Invalid argument'. This is because the windows error 0xE8 (ERROR_NO_DATA) is mapped to EINVAL even though it is documented as 'The pipe is being closed'. Note that this fix assumes that Windows' last error code is still valid in the exception handler. It works correctly in all my tests. A simpler fix would be to just map EINVAL to EPIPE, like was done is flush previously, but that would be less precise. This error was not observed previously, when pager was an extension.
Tue, 03 Jul 2018 12:10:22 -0400 Added signature for changeset 0b63a6743010 stable
Augie Fackler <raf@durin42.com> [Tue, 03 Jul 2018 12:10:22 -0400] rev 37881
Added signature for changeset 0b63a6743010
Tue, 03 Jul 2018 12:10:21 -0400 Added tag 4.6.2 for changeset 0b63a6743010 stable
Augie Fackler <raf@durin42.com> [Tue, 03 Jul 2018 12:10:21 -0400] rev 37880
Added tag 4.6.2 for changeset 0b63a6743010
Mon, 25 Jun 2018 16:36:14 +0200 procutil: use unbuffered stdout on Windows stable 4.6.2
Sune Foldager <cryo@cyanite.org> [Mon, 25 Jun 2018 16:36:14 +0200] rev 37879
procutil: use unbuffered stdout on Windows Windows doesn't support line buffering, treating it as fully buffered. This causes output of slow commands to stutter. We use unbuffered instead.
Tue, 19 Jun 2018 22:45:52 +0900 merge: do not fill manifest of committed revision with pseudo node (issue5526) stable
Yuya Nishihara <yuya@tcha.org> [Tue, 19 Jun 2018 22:45:52 +0900] rev 37878
merge: do not fill manifest of committed revision with pseudo node (issue5526) Since a75d24539aba "convert: fix convert dropping p2 contents during filemap merge", wctx is not always a committablectx because the convert extension passes in repo[n] as wctx. If wctx is a committed changeset, its manifest dict shouldn't be mutated reflecting to the working directory.
Fri, 15 Jun 2018 22:16:58 +0900 manifest: fix possible SEGV caused by uninitialized lazymanifest fields stable
Yuya Nishihara <yuya@tcha.org> [Fri, 15 Jun 2018 22:16:58 +0900] rev 37877
manifest: fix possible SEGV caused by uninitialized lazymanifest fields Before, uninitialized self->pydata would be passed to lazymanifest_dealloc() on OOM, and Py_DECREF(self->pydata) would crash if we were unlucky. It's still wrong to do malloc() thingy in tp_init because __init__() may be called more than once [1], but I don't want to go a step further in stable branch. [1]: https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_new "The tp_new function should ... do only as much further initialization as is absolutely necessary. Initialization that can safely be ignored or repeated should be placed in the tp_init handler."
Fri, 15 Jun 2018 10:14:32 -0400 tests: replace `echo -n` with `printf` per check-code stable
Augie Fackler <augie@google.com> [Fri, 15 Jun 2018 10:14:32 -0400] rev 37876
tests: replace `echo -n` with `printf` per check-code Differential Revision: https://phab.mercurial-scm.org/D3749
Thu, 14 Jun 2018 14:04:26 -0700 crecord: fix line number in hunk header (issue5917) stable
Jun Wu <quark@fb.com> [Thu, 14 Jun 2018 14:04:26 -0700] rev 37875
crecord: fix line number in hunk header (issue5917) `@@ -1,1 +-1,0 @@` is not a valid patch hunk header. Change it to `@@ -1,1 +0,0 @@`. Differential Revision: https://phab.mercurial-scm.org/D3737
Wed, 13 Jun 2018 10:41:20 -0400 lazymanifest: don't crash when out of memory (issue5916) stable
Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [Wed, 13 Jun 2018 10:41:20 -0400] rev 37874
lazymanifest: don't crash when out of memory (issue5916) self->lines can be NULL if we failed to allocate memory for it.
Wed, 13 Jun 2018 10:37:39 -0400 cext: stop worrying and love the free(NULL) stable
Josef 'Jeff' Sipek <jeffpc@josefsipek.net> [Wed, 13 Jun 2018 10:37:39 -0400] rev 37873
cext: stop worrying and love the free(NULL) There is no need to check for a NULL pointer before calling free since free(NULL) is defined by C standards as a no-op. Lots of software relies on this behavior so it is completely safe to call even on the most obscure of systems.
Sun, 20 May 2018 23:05:18 -0400 tests: fix test-patch.t on pickier /bin/sh implementations stable
Augie Fackler <augie@google.com> [Sun, 20 May 2018 23:05:18 -0400] rev 37872
tests: fix test-patch.t on pickier /bin/sh implementations This is a graft of 0b39edeff033 and f44306940c94 from default because I'm tired of seeing the FreeBSD build be red on stable. See those revisions for details on what's going on here.
Wed, 06 Jun 2018 12:53:26 -0700 chg: fix an undefined behavior about memcpy stable
Jun Wu <quark@fb.com> [Wed, 06 Jun 2018 12:53:26 -0700] rev 37871
chg: fix an undefined behavior about memcpy Spot by Wez Furlong. `memcpy(x, NULL, 0)` is undefined according to [1]. [1]: https://stackoverflow.com/questions/5243012 Differential Revision: https://phab.mercurial-scm.org/D3698
Wed, 06 Jun 2018 13:28:49 -0400 Added signature for changeset 9c5ced5276d6 stable
Augie Fackler <raf@durin42.com> [Wed, 06 Jun 2018 13:28:49 -0400] rev 37870
Added signature for changeset 9c5ced5276d6
Wed, 06 Jun 2018 13:28:48 -0400 Added tag 4.6.1 for changeset 9c5ced5276d6 stable
Augie Fackler <raf@durin42.com> [Wed, 06 Jun 2018 13:28:48 -0400] rev 37869
Added tag 4.6.1 for changeset 9c5ced5276d6
Mon, 30 Apr 2018 22:24:58 -0400 mpatch: avoid integer overflow in combine() (SEC) stable 4.6.1
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:24:58 -0400] rev 37868
mpatch: avoid integer overflow in combine() (SEC) All the callers of this function can handle a NULL return, so that appears to be the "safe" way to report an error.
Mon, 30 Apr 2018 22:23:06 -0400 mpatch: avoid integer overflow in mpatch_decode (SEC) stable
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:23:06 -0400] rev 37867
mpatch: avoid integer overflow in mpatch_decode (SEC)
Mon, 30 Apr 2018 22:20:13 -0400 mpatch: fix UB integer overflows in discard() (SEC) stable
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:20:13 -0400] rev 37866
mpatch: fix UB integer overflows in discard() (SEC)
Mon, 30 Apr 2018 22:15:11 -0400 mpatch: fix UB in int overflows in gather() (SEC) stable
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:15:11 -0400] rev 37865
mpatch: fix UB in int overflows in gather() (SEC)
Thu, 03 May 2018 12:54:20 -0400 mpatch: introduce a safesub() helper as well stable
Augie Fackler <augie@google.com> [Thu, 03 May 2018 12:54:20 -0400] rev 37864
mpatch: introduce a safesub() helper as well Same reason as safeadd().
Mon, 30 Apr 2018 22:13:42 -0400 mpatch: introduce a safeadd() helper to work around UB int overflow stable
Augie Fackler <augie@google.com> [Mon, 30 Apr 2018 22:13:42 -0400] rev 37863
mpatch: introduce a safeadd() helper to work around UB int overflow We're about to make extensive use of this. This change duplicates some stdbool.h portability hacks from cext/util.h. We should probably clean that up in the future, but we'll skip that for now in order to make security backports easier.
Sat, 28 Apr 2018 10:09:12 -0400 mpatch: ensure fragment start isn't past the end of orig (SEC) stable
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 10:09:12 -0400] rev 37862
mpatch: ensure fragment start isn't past the end of orig (SEC) Caught by oss-fuzz fuzzer during development. This defect is OVE-20180430-0004. A CVE has not been obtained as of this writing.
Sat, 28 Apr 2018 02:04:56 -0400 mpatch: protect against underflow in mpatch_apply (SEC) stable
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 02:04:56 -0400] rev 37861
mpatch: protect against underflow in mpatch_apply (SEC) Also caught by oss-fuzz fuzzer during development. This defect is OVE-20180430-0002. A CVE has not been obtained as of this writing.
Sat, 28 Apr 2018 00:42:16 -0400 mpatch: be more careful about parsing binary patch data (SEC) stable
Augie Fackler <augie@google.com> [Sat, 28 Apr 2018 00:42:16 -0400] rev 37860
mpatch: be more careful about parsing binary patch data (SEC) It appears to have been possible to trivially walk off the end of an allocated region with a malformed patch. Oops. Caught when writing an mpatch fuzzer for oss-fuzz. This defect is OVE-20180430-0001. A CVE has not been obtained as of this writing.
Wed, 06 Jun 2018 09:14:33 -0700 zstandard: pull in bug fixes from upstream 0.9.1 release (issue5884) stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 06 Jun 2018 09:14:33 -0700] rev 37859
zstandard: pull in bug fixes from upstream 0.9.1 release (issue5884) This changeset contains the meaningful code changes from python-zstandard's 0.9.1 release. The main fix is to restore support for compiling with mingw.
Wed, 06 Jun 2018 21:19:42 +0800 templatefuncs: only render text portion of minirst.format() result stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 06 Jun 2018 21:19:42 +0800] rev 37858
templatefuncs: only render text portion of minirst.format() result When "keep" argument is provided, the function returns (text, pruned), where pruned is a list of sections from the original plain text that were pruned from the rendered result. Let's not output it together with the rendered HTML.
Wed, 06 Jun 2018 21:15:26 +0800 tests: demonstrate that hgweb renders "pruned" that minirst.format() returns stable
Anton Shestakov <av6@dwimlabs.net> [Wed, 06 Jun 2018 21:15:26 +0800] rev 37857
tests: demonstrate that hgweb renders "pruned" that minirst.format() returns Notice at the bottom of the help text there's "windows". It's a section that is in the original help text, but was pruned (because hgweb didn't ask for it).
Tue, 05 Jun 2018 23:49:54 -0400 rebase: avoid RevlogError when computing obsoletenotrebased (issue5907) stable
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Jun 2018 23:49:54 -0400] rev 37856
rebase: avoid RevlogError when computing obsoletenotrebased (issue5907) The key to reproducing this seems to be missing an obsolete node that is not an ancestor of the destination.
Sat, 02 Jun 2018 13:44:44 -0400 rebase: prioritize indicating an interrupted rebase over update (issue5838) stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 02 Jun 2018 13:44:44 -0400] rev 37855
rebase: prioritize indicating an interrupted rebase over update (issue5838) This should also cover the transplant extension, and any other non clearable states.
Sat, 02 Jun 2018 13:25:45 -0400 tests: demonstrate inconsistent messaging around interrupted rebases stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 02 Jun 2018 13:25:45 -0400] rev 37854
tests: demonstrate inconsistent messaging around interrupted rebases
Thu, 31 May 2018 22:15:52 -0400 tests: adapt test-check-pylint to run on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 May 2018 22:15:52 -0400] rev 37853
tests: adapt test-check-pylint to run on Windows The line endings are explicitly converted because this was ending up with '\r (no-eol) (esc)' lines, in addition to the usual '\r (esc)' lines. I've seen the fakerc output on other recently installed systems though (10.13 and/or Fedora 26). Unfortunately, the output here uses '\\' on Windows, so glob away the whole path.
Thu, 31 May 2018 22:11:47 -0400 hghave: avoid a deadlock reading the child process's output stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 May 2018 22:11:47 -0400] rev 37852
hghave: avoid a deadlock reading the child process's output The output of `pylint` is voluminous enough that it fills the buffer on Windows, and waited for the parent to read it out. But the parent was waiting on the child to exit. I'm not sure what the intent of setting `ret = -1` in the exception handler just above this was...
Thu, 31 May 2018 09:19:09 -0400 lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902) stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 May 2018 09:19:09 -0400] rev 37851
lfs: bypass wrapped functions when reposetup() hasn't been called (issue5902) There are only a handful of methods that access repo attributes that are applied in reposetup(). The `diff` test covers all of the commands that call scmutil.prefetchfiles(). Along the way, I saw that adding files and upgrading the repo format were also problems (also tested here). I don't think running `hg serve` through the commandserver is sane, but I conditionalized both the capabilities and the wsgirequest handler because it's trivially correct. It doesn't look like there has ever been a caller of candownload(), so there's no test for that path. The upload case isn't testable, because uploadblobs() bails if there are no pointers. The requirement should be added any time pointers are introduced, and that would force the extension to be loaded specifically for the repo. This covers `debuglfsupload`, the pre-push hook (which isn't set until the repo is promoted to LFS), and uploadblobsfromrevs(), which can be called by other extensions. I think readfromstore() and writetostore() are only reachable as a flag processor for revlog.REVIDX_EXTSTORED, and a requirement is added as soon as that is seen, so I don't think those are a problem.
Thu, 24 May 2018 21:54:31 +0900 help: correct signature of separate() template function stable
Yuya Nishihara <yuya@tcha.org> [Thu, 24 May 2018 21:54:31 +0900] rev 37850
help: correct signature of separate() template function Without the dots, it looked as if separate() would take a list of arguments.
Fri, 18 May 2018 21:32:05 +0900 hgweb: do not try to replace signal handlers while locking stable
Yuya Nishihara <yuya@tcha.org> [Fri, 18 May 2018 21:32:05 +0900] rev 37849
hgweb: do not try to replace signal handlers while locking According to the issue 5889, mod_wsgi issues a warning on signal.signal() call, and we wouldn't want to see it in error log. The problem addressed by d77c3b023393 could potentially occur in web session, but that would be less likely than in user processes.
Fri, 18 May 2018 21:24:06 +0900 lock: add internal config to not replace signal handlers while locking stable
Yuya Nishihara <yuya@tcha.org> [Fri, 18 May 2018 21:24:06 +0900] rev 37848
lock: add internal config to not replace signal handlers while locking signal.signal() is blocked in some WSGI environments, and a horrible warning is sent to the server log. So we need a way to disable it, and I think abusing ui.config is the simplest workaround.
Tue, 22 May 2018 21:51:20 -0400 merge with i18n stable
Augie Fackler <augie@google.com> [Tue, 22 May 2018 21:51:20 -0400] rev 37847
merge with i18n
Fri, 04 May 2018 18:55:57 -0300 i18n-pt_BR: synchronized with 32a75a8a5b0f stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 04 May 2018 18:55:57 -0300] rev 37846
i18n-pt_BR: synchronized with 32a75a8a5b0f
Fri, 04 May 2018 18:55:29 -0300 i18n-ja: fix block indentation stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Fri, 04 May 2018 18:55:29 -0300] rev 37845
i18n-ja: fix block indentation
Tue, 01 May 2018 18:22:52 +0900 i18n-ja: synchronized with 32a75a8a5b0f stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 01 May 2018 18:22:52 +0900] rev 37844
i18n-ja: synchronized with 32a75a8a5b0f
Mon, 21 May 2018 15:14:46 +0200 httppeer: declare 'dbg' at the function level stable
Boris Feld <boris.feld@octobus.net> [Mon, 21 May 2018 15:14:46 +0200] rev 37843
httppeer: declare 'dbg' at the function level As we just saw in the previous changeset, having the variable defined into a branch creates bug. This is a cheap to move it at the function level.
Fri, 04 May 2018 19:06:46 +0200 httppeer: properly gate debug usage behind debug flag check stable
Boris Feld <boris.feld@octobus.net> [Fri, 04 May 2018 19:06:46 +0200] rev 37842
httppeer: properly gate debug usage behind debug flag check The "dbg" local variable is only defined if the 'debugflag' is set to True. However, it was used indiscriminately later in the function. We hide its usage behind the 'debugflag' value to avoid raising a NameError.
Tue, 15 May 2018 22:12:55 +0900 push: continue without locking on lock failure other than EEXIST (issue5882) stable
Yuya Nishihara <yuya@tcha.org> [Tue, 15 May 2018 22:12:55 +0900] rev 37841
push: continue without locking on lock failure other than EEXIST (issue5882) This code was added by 3f5e75c22585 "push: make locking of source optional (issue3684)", but EACCES isn't the only error that could be triggered by filesystem permission. I think catching LockUnavailable is more appropriate than testing errno value by caller.
Sat, 12 May 2018 22:29:28 +0200 bdiff: fix yet more fallout from xdiff long/int64 conversion (issue5885) stable
Julien Cristau <jcristau@debian.org> [Sat, 12 May 2018 22:29:28 +0200] rev 37840
bdiff: fix yet more fallout from xdiff long/int64 conversion (issue5885) "l" in Py_BuildValue's format string means long, so passing int64_t instead results in fireworks on 32bit architectures. Differential Revision: https://phab.mercurial-scm.org/D3538
Fri, 11 May 2018 20:10:22 +0900 revset: pass in lookup function to matchany() (issue5879) stable
Yuya Nishihara <yuya@tcha.org> [Fri, 11 May 2018 20:10:22 +0900] rev 37839
revset: pass in lookup function to matchany() (issue5879) Silly mistake in f83cb91b052e.
Fri, 11 May 2018 20:08:30 +0900 test-hgweb: add test for foo-bar name lookup stable
Yuya Nishihara <yuya@tcha.org> [Fri, 11 May 2018 20:08:30 +0900] rev 37838
test-hgweb: add test for foo-bar name lookup This is broken since f83cb91b052e "revset: pass in lookup function instead of repo (API)."
Tue, 08 May 2018 14:17:46 -0700 bundle2: mark the bundle2 part as advisory (issue5872) stable
Boris Feld <boris.feld@octobus.net> [Tue, 08 May 2018 14:17:46 -0700] rev 37837
bundle2: mark the bundle2 part as advisory (issue5872) It blocks old clients to read bundle including this part. Differential Revision: https://phab.mercurial-scm.org/D3481
Tue, 08 May 2018 11:39:38 +0200 debugbundle: also display if a part is mandatory or advisory stable
Boris Feld <boris.feld@octobus.net> [Tue, 08 May 2018 11:39:38 +0200] rev 37836
debugbundle: also display if a part is mandatory or advisory Most parts are mandatory but when introducing new parts, they should be advisory if included by default or old clients won't be able to process it. Differential Revision: https://phab.mercurial-scm.org/D3480
Sat, 05 May 2018 18:03:01 -0500 Added signature for changeset 6614cac550ae stable
Kevin Bullock <kbullock@ringworld.org> [Sat, 05 May 2018 18:03:01 -0500] rev 37835
Added signature for changeset 6614cac550ae
Sat, 05 May 2018 18:02:59 -0500 Added tag 4.6 for changeset 6614cac550ae stable
Kevin Bullock <kbullock@ringworld.org> [Sat, 05 May 2018 18:02:59 -0500] rev 37834
Added tag 4.6 for changeset 6614cac550ae
Thu, 30 Nov 2017 21:19:46 -0500 filelog: don't crash on invalid copy metadata (issue5748) stable 4.6
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 30 Nov 2017 21:19:46 -0500] rev 37833
filelog: don't crash on invalid copy metadata (issue5748) "copy" and "copyrev" are both supposed to appear next to each other. However, a user report demonstrated a crash that indicates that something in the wild is producing "copy" without "copyrev" (probably `hg convert`). While we should definitely fix the source of the bad metadata, the bad code causing the crash is already in the wild and who knows how many repositories are impacted. So let's be more defensive when accessing the file revision metadata.
Mon, 30 Apr 2018 15:32:11 -0700 httppeer: detect redirect to URL without query string (issue5860) stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 30 Apr 2018 15:32:11 -0700] rev 37832
httppeer: detect redirect to URL without query string (issue5860) 197d10e157ce subtly changed the HTTP peer's handling of HTTP redirects. Before that changeset, we instantiated an HTTP peer instance and performed the capabilities lookup with that instance. The old code had the following relevant properties: 1) The HTTP request layer would automatically follow HTTP redirects. 2) An encountered HTTP redirect would update a peer instance variable pointing to the repo URL. 3) The peer would automagically perform a "capabilities" command request if a caller requested capabilities but capabilities were not yet defined. The first HTTP request issued by a peer is for ?cmd=capabilities. If the server responds with an HTTP redirect to a ?cmd=capabilities URL, the HTTP request layer automatically followed it, retrieved a valid capabilities response, and the peer's base URL was updated automatically so subsequent requests used the proper URL. In other words, things "just worked." In the case where the server redirected to a URL without the ?cmd=capabilities query string, the HTTP request layer would follow the redirect and likely encounter HTML. The peer's base URL would be updated and the unexpected Content-Type would raise a RepoError. We would catch RepoError and immediately call between() (testing the case for pre 0.9.1 servers not supporting the "capabilities" command). e.g. try: inst._fetchcaps() except error.RepoError: inst.between([(nullid, nullid)]) between() would eventually call into _callstream(). And _callstream() made a call to self.capable('httpheader'). capable() would call self.capabilities(), which would see that no capabilities were set (because HTML was returned for that request) and call the "capabilities" command to fetch capabilities. Because the base URL had been updated from the redirect, this 2nd "capabilities" command would succeed and the client would immediately call "between," which would also succeed. The legacy handshake succeeded. Only because "capabilities" was successfully executed as a side effect did the peer recognize that it was talking to a modern server. In other words, this all appeared to work accidentally. After 197d10e157ce, we stopped calling the "capabilities" command on the peer instance. Instead, we made the request via a low-level opener, detected the redirect as part of response handling code, and passed the redirected URL into the constructed peer instance. For cases where the redirected URL included the query string, this "just worked." But for cases where the redirected URL stripped the query string, we threw RepoError and because we removed the "between" handshake fallback, we fell through to the "is a static HTTP repo" check and performed an HTTP request for .hg/requires. While 197d10e157ce was marked as backwards incompatible, the only intended backwards incompatible behavior was not performing the "between" fallback. It was not realized that the "between" command had the side-effect of recovering from an errant redirect that dropped the query string. This commit restores the previous behavior and allows clients to handle a redirect that drops the query string. In the case where the request is redirected and the query string is dropped, we raise a special case of RepoError. We then catch this special exception in the handshake code and perform another "capabilities" request against the redirected URL. If that works, all is well. Otherwise, we fall back to the "is a static HTTP repo" check. The new code is arguably better than before 197d10e157ce, as it is explicit about the expected behavior and we avoid performing a "between" request, saving a server round trip. Differential Revision: https://phab.mercurial-scm.org/D3433
Thu, 03 May 2018 14:43:25 +0900 hgweb: prevent triggering dummy href="#" handler stable
Yuya Nishihara <yuya@tcha.org> [Thu, 03 May 2018 14:43:25 +0900] rev 37831
hgweb: prevent triggering dummy href="#" handler Follow up for the previous patch.
Wed, 02 May 2018 21:00:43 -0700 paper: add href="#" to links with click handlers stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 02 May 2018 21:00:43 -0700] rev 37830
paper: add href="#" to links with click handlers This restores the styling that was accidentally removed by the previous change to these files. Differential Revision: https://phab.mercurial-scm.org/D3438
Wed, 02 May 2018 19:16:01 -0700 paper: don't register click handlers with inline javascript (issue5812) stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 02 May 2018 19:16:01 -0700] rev 37829
paper: don't register click handlers with inline javascript (issue5812) The use of inline href="javascript:" undermines CSP policies that don't allow inline javascript. This commit changes the registering of the diffstat and line wrapping toggle handlers to the the global DOMContentLoaded handler, thus eliminating all inline javascript from the paper template. Differential Revision: https://phab.mercurial-scm.org/D3437
Mon, 30 Apr 2018 17:28:59 -0700 hgweb: allow Content-Security-Policy header on 304 responses (issue5844) stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 30 Apr 2018 17:28:59 -0700] rev 37828
hgweb: allow Content-Security-Policy header on 304 responses (issue5844) A side-effect of 98baf8dea553 was that the Content-Security-Policy header was set on all HTTP responses by default. This header wasn't in our list of allowed headers for HTTP 304 responses. This would trigger a ProgrammingError when a 304 response was issued via hgwebdir. This commit adds Content-Security-Policy to the allow list of headers for 304 responses so we no longer encounter the error. Differential Revision: https://phab.mercurial-scm.org/D3436
Mon, 30 Apr 2018 17:22:20 -0700 hgweb: discard Content-Type header for 304 responses (issue5844) stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 30 Apr 2018 17:22:20 -0700] rev 37827
hgweb: discard Content-Type header for 304 responses (issue5844) A side-effect of 98baf8dea553 was that hgwebdir always sets a global default for the Content-Type header. HTTP 304 responses don't allow the Content-Type header. So a side-effect of this change was that HTTP 304 responses served via hgwebdir resulted in a ProgrammingError being raised. This commit teaches our 304 response issuing code to drop the Content-Type header. Differential Revision: https://phab.mercurial-scm.org/D3435
Mon, 30 Apr 2018 17:08:56 -0700 tests: add tests demonstrating ISE for HTTP 304 responses with hgwebdir stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 30 Apr 2018 17:08:56 -0700] rev 37826
tests: add tests demonstrating ISE for HTTP 304 responses with hgwebdir There are two separate failures here. One for the Content-Type header. Another for the Content-Security-Policy header. Differential Revision: https://phab.mercurial-scm.org/D3434
Fri, 27 Apr 2018 14:51:02 -0700 hgweb: guard against empty Content-Length header stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 27 Apr 2018 14:51:02 -0700] rev 37825
hgweb: guard against empty Content-Length header Discussion in issue 5860 seems to indicate this can occur. Differential Revision: https://phab.mercurial-scm.org/D3432
Thu, 26 Apr 2018 21:10:56 +0900 test-push-http: do not clear pid file stable
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Apr 2018 21:10:56 +0900] rev 37824
test-push-http: do not clear pid file It's okay now, but we'll end up leaking daemon processes if we add some more.
Thu, 26 Apr 2018 21:24:13 +0900 debugcolor: fix crash by empty styles (issue5856) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 26 Apr 2018 21:24:13 +0900] rev 37823
debugcolor: fix crash by empty styles (issue5856)
Wed, 25 Apr 2018 14:51:20 -0700 tests: explicitly define compression engines for tests stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 25 Apr 2018 14:51:20 -0700] rev 37822
tests: explicitly define compression engines for tests The zstd compression engine requires C extensions and isn't present in pure Python builds. The compression engine list leaks into the server capabilities string. Unless we're testing functionality specific to a compression format, the set of compression formats supported by a server doesn't matter much. So this commit explicitly defines the server's compression engines for some tests so behavior is consistent between pure and non-pure builds. Differential Revision: https://phab.mercurial-scm.org/D3431
Wed, 25 Apr 2018 13:18:51 -0400 tests: update no-zstd branch of test-treediscovery.t as in 330ada7e8ea5 stable
Augie Fackler <augie@google.com> [Wed, 25 Apr 2018 13:18:51 -0400] rev 37821
tests: update no-zstd branch of test-treediscovery.t as in 330ada7e8ea5 This side of the test got overlooked. We should probably consider having a way to run some of our tests through a "no-zstd" case just like we run some things through a "no-obsmarkers" case, but that's not an appropriate thing for stable. Differential Revision: https://phab.mercurial-scm.org/D3430
Wed, 25 Apr 2018 13:13:42 -0400 tests: glob away content-length changes relating to missing zstd bindings stable
Augie Fackler <augie@google.com> [Wed, 25 Apr 2018 13:13:42 -0400] rev 37820
tests: glob away content-length changes relating to missing zstd bindings This doesn't fix everything in these two tests around missing zstd: we still get some changes in the CBOR payload in ways that I think we probably shouldn't bother to glob around. Maybe we should just disable zstd support in some of these lower-level wireproto tests? Differential Revision: https://phab.mercurial-scm.org/D3429
Wed, 25 Apr 2018 09:24:07 -0700 revlog: make pure version of _partialmatch() support 40-byte hex nodeids stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 25 Apr 2018 09:24:07 -0700] rev 37819
revlog: make pure version of _partialmatch() support 40-byte hex nodeids Without this patch, test-histedit-arguments.t would fail when run with --pure. It turned out to be because the pure version of _partialmatch() does not support full 40-byte hex nodeids. When histedit's instructions include things like "pick tip", it resolves the "tip" revision early to a full nodeid (but plain hex nodeid prefixes are not resolved to full nodeids). Then the nodeid (full or not) is looked up using to a full nodeid later. This step is what fails in pure mode. It has been failing since my c4131138eadb (histedit: look up partial nodeid as partial nodeid, 2018-04-06). I haven't verified, but I suspect histedit instructions like "pick <full hex nodeid>" would have been failing before my commit too, though. The fix is trivial: change a "< 40" to "<= 40". Differential Revision: https://phab.mercurial-scm.org/D3428
Tue, 24 Apr 2018 13:55:25 -0700 hgweb: reuse body file object when hgwebdir calls hgweb (issue5851) stable
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 24 Apr 2018 13:55:25 -0700] rev 37818
hgweb: reuse body file object when hgwebdir calls hgweb (issue5851) An unintended side-effect of f0a851542a05 was that the request body file object (which uses a util.cappedreader) was constructed twice when hgwebdir called into hgweb. Since we attempt to read all remaining data from this file object when Content-Length is defined and since there were two instances of this object and the client supplied no additional data to read, this resulted in deadlock. The fix implemented in this commit is to reuse the request body file object when it is passed from hgwebdir to hgweb. A test demonstrating `hg clone` and `hg push` via hgwebdir has been added. Without this patch, the test hangs when doing `hg clone`. Surprisingly, this must mean that we have effectively no test coverage of the wire protocol when run via hgwebdir. Differential Revision: https://phab.mercurial-scm.org/D3427
Wed, 25 Apr 2018 00:26:49 +0530 remotenames: mark the extension as EXPERIMENTAL stable
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 25 Apr 2018 00:26:49 +0530] rev 37817
remotenames: mark the extension as EXPERIMENTAL I still don't feel confident about locking the behavior of all the things in the remotenames extension. Moreover the extension was introduced in this cycle only. Let's mark this extension EXPERIMENTAL for now so that we can change things especially the storage layer if required in next cycle. I will like to use cbor at storage layer too. Differential Revision: https://phab.mercurial-scm.org/D3426
Tue, 24 Apr 2018 22:47:14 -0400 tests: fix test-check-commit.t when all commits are public stable
Augie Fackler <augie@google.com> [Tue, 24 Apr 2018 22:47:14 -0400] rev 37816
tests: fix test-check-commit.t when all commits are public I'm 99% sure this is a portable use of /bin/[, and it seems to fix the issue I noticed on the buildbot on my machine.
Tue, 24 Apr 2018 21:29:00 +0900 import: fix crash on --exact check of empty commit (issue5702) stable
Yuya Nishihara <yuya@tcha.org> [Tue, 24 Apr 2018 21:29:00 +0900] rev 37815
import: fix crash on --exact check of empty commit (issue5702)
Tue, 24 Apr 2018 08:20:15 -0700 tests: mark test-check-interfaces.py as requiring a repo stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 24 Apr 2018 08:20:15 -0700] rev 37814
tests: mark test-check-interfaces.py as requiring a repo This was failing our 4.6rc1 build like this: mercurial.error.RepoError: repository /tmp/build-debs.zMTRhC/src-4.6rc1 not found Differential Revision: https://phab.mercurial-scm.org/D3425
Mon, 23 Apr 2018 19:23:18 +0100 sshpeer: reflect actual command activity one handshake stable
Boris Feld <boris.feld@octobus.net> [Mon, 23 Apr 2018 19:23:18 +0100] rev 37813
sshpeer: reflect actual command activity one handshake The output from devel-peer-request is expected to give data about request and roundtrip done to the server. Changeset a9cffd14aa04 changed some of that by grouping hello and between commands call. However, the old sequence of command was "emulated" in sshpeer. Update the sshpeer to reflect this grouping of commands and update the tests that use it.
Mon, 23 Apr 2018 23:24:53 -0400 tests: drop a useless glob in test-infinite-bundlestore.t stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 23 Apr 2018 23:24:53 -0400] rev 37812
tests: drop a useless glob in test-infinite-bundlestore.t With the previous breakage tamed, the lack of test output difference was causing the test runner to report "no result code from test" because of this glob.
Mon, 23 Apr 2018 23:22:52 -0400 infinitepush: ensure fileindex bookmarks use '/' separators (issue5840) stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 23 Apr 2018 23:22:52 -0400] rev 37811
infinitepush: ensure fileindex bookmarks use '/' separators (issue5840) After loading up with status messages, I noticed that the subsequent matcher was rejecting 'scratch\mybranch' on Windows. No bookmarks were reported back, and the tests subsequently failed. I did a search for 'match', and nothing else looks like it needs to be fixed up, but someone who understands this code should also take a look. I also tried setting `infinitepush.branchpattern=re:scratch\\.*` in library-infinitepush.sh without this change, but that didn't work. Still, should we ban '\' in these bookmarks to avoid confusion? I thought I saw code that sandwiches a pattern between 're:^' and '.*', so perhaps regex characters will need special care? I also noticed comments in externalbundlestore.{read,write} that it won't work on Windows because of opening an open file. But I don't see a test failure, so this may lack test coverage.
Sun, 22 Apr 2018 11:54:10 -0700 interfaceutil: module to stub out zope.interface stable
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 22 Apr 2018 11:54:10 -0700] rev 37810
interfaceutil: module to stub out zope.interface The startup time of `hg` increased during the 4.6 development cycle. A cause of that was importing more modules and doing more work at module import time. The import of zope.interface and the declaring of various interfaces is partially responsible for the startup time regression. Our current usage of zope.interface doesn't do much at run time: we are merely declaring interfaces and stating that certain types implement various interfaces. Core Mercurial is not (yet) using of any of zope.interface features that actually require that interface plumbing be defined. The only place we actually need the interface metadata is in test-check-interfaces.py. This commit establishes a new interfaceutil module. It exposes the subset of the zope.interface API that we currently use. By default, the APIs no-op. But if an environment variable is set, we export the real zope.interface APIs. Existing importers of zope.interface have been converted to use the new module. test-check-interfaces.py has been updated to define the environment variable so the real zope.interface is used. The net effect of this change is we stop importing 9 zope.interface.* modules and we no longer perform interface bookkeeping when registering interfaces. On my i7-6700K on Linux, a shell loop that runs `hg log -r .` 300 times on a repo with 1 commit shows a significant CPU time improvement (average of 4 runs): 4.5: 14.814s before: 19.028s after: 16.945s And with `run-tests.py -j10` (single run): 4.5: ~3100s (~51.7m) before: ~4450s (~74.2m) after: ~3980s (~66.3m) So this claws back about half of the regressions in 4.6. Differential Revision: https://phab.mercurial-scm.org/D3419
Mon, 23 Apr 2018 21:13:19 +0900 test-fix: normalize precision of mtime copied by 'cp -p' stable
Yuya Nishihara <yuya@tcha.org> [Mon, 23 Apr 2018 21:13:19 +0900] rev 37809
test-fix: normalize precision of mtime copied by 'cp -p' Appears that MSYS cp only copies mtime in seconds.
Fri, 20 Apr 2018 14:43:45 -0400 merge stable heads stable
Augie Fackler <augie@google.com> [Fri, 20 Apr 2018 14:43:45 -0400] rev 37808
merge stable heads
Fri, 20 Apr 2018 14:37:48 -0400 Added signature for changeset 1ec874717d8a stable
Augie Fackler <raf@durin42.com> [Fri, 20 Apr 2018 14:37:48 -0400] rev 37807
Added signature for changeset 1ec874717d8a
Fri, 20 Apr 2018 14:37:47 -0400 Added tag 4.6rc1 for changeset 1ec874717d8a stable
Augie Fackler <raf@durin42.com> [Fri, 20 Apr 2018 14:37:47 -0400] rev 37806
Added tag 4.6rc1 for changeset 1ec874717d8a
Fri, 20 Apr 2018 15:39:32 +0200 internals: correct capitalization of 'compression' stream level parameter stable
Kim Alvefur <zash@zash.se> [Fri, 20 Apr 2018 15:39:32 +0200] rev 37805
internals: correct capitalization of 'compression' stream level parameter
Fri, 20 Apr 2018 20:54:32 +0900 test-check-code: prevent from adding Python modules shadowed by ancient C stable 4.6rc1
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Apr 2018 20:54:32 +0900] rev 37804
test-check-code: prevent from adding Python modules shadowed by ancient C
Fri, 20 Apr 2018 20:48:10 +0900 diffhelper: rename module to avoid conflicts with ancient C module (issue5846) stable
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Apr 2018 20:48:10 +0900] rev 37803
diffhelper: rename module to avoid conflicts with ancient C module (issue5846) Historically we had had C extensions in mercurial/, which shadows the pure Python modules of the same name forever unless we do clean build/install. I'm sloppy to think about new name, so just dropped the "s".
Thu, 19 Apr 2018 23:33:17 +0900 diffhelpers: backport 9e40bc4c1bde from C implementation stable
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 23:33:17 +0900] rev 37802
diffhelpers: backport 9e40bc4c1bde from C implementation 9e40bc4c1bde just says "harden testhunk." I don't think this would be the case, but it makes some sense to avoid negative index.
Fri, 20 Apr 2018 20:38:29 +0900 version: make parser more robust for rc variants and ill-formed strings stable
Yuya Nishihara <yuya@tcha.org> [Fri, 20 Apr 2018 20:38:29 +0900] rev 37801
version: make parser more robust for rc variants and ill-formed strings
Wed, 18 Apr 2018 19:02:44 -0600 phabricator: specify some metadata compatibly with arc stable
Tom Prince <mozilla@hocat.ca> [Wed, 18 Apr 2018 19:02:44 -0600] rev 37800
phabricator: specify some metadata compatibly with arc Differential Revision: https://phab.mercurial-scm.org/D3414
Thu, 19 Apr 2018 19:46:24 +0900 diff: restore original color scheme for worddiff stable
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 19:46:24 +0900] rev 37799
diff: restore original color scheme for worddiff I'm not young. "red dim" is nearly invisible, and "red" vs "red dim" is too subtle to see difference. And, "underline" is necessary to highlight whitespace changes.
Thu, 19 Apr 2018 22:12:10 +0900 test-fix: fix use of 'f --newer' to check that foo.whole is not updated stable
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 22:12:10 +0900] rev 37798
test-fix: fix use of 'f --newer' to check that foo.whole is not updated Here we want to assert not 'mtime(foo.whole.orig) < mtime(foo.whole)'. The condition has to be inverted since 'f --newer' says "newer" if the mtimes match. Alternatively, we could insert 'sleep 2' before 'cp' to ensure that foo.whole.orig is newer than foo.whole, but a fewer sleeps should be better.
Thu, 19 Apr 2018 19:55:51 +0900 context: translate FilteredIndex/LookupError at repo[changeid] (API) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 19:55:51 +0900] rev 37797
context: translate FilteredIndex/LookupError at repo[changeid] (API) This partially backs out ecd3f6909184. It seems layering violation for repo[changeid] to raise storage-level exceptions transparently. Otherwise, we would have to rewrite callers to catch all of them. try: repo[rev_or_node] except (error.RepoLookupError, error.FilteredIndexError, error.FilteredLookupError): pass This would also fix filectx._changectx(), which catches FilteredRepoLookupError to fall back to the unfiltered path.
Thu, 19 Apr 2018 20:22:33 +0900 inifinitepush: fix filebundlestore to close file stable
Yuya Nishihara <yuya@tcha.org> [Thu, 19 Apr 2018 20:22:33 +0900] rev 37796
inifinitepush: fix filebundlestore to close file
Wed, 18 Apr 2018 15:07:06 +0200 notify: only notify for non-filtered revision stable
Boris Feld <boris.feld@octobus.net> [Wed, 18 Apr 2018 15:07:06 +0200] rev 37795
notify: only notify for non-filtered revision This should fix issue5821 for hook targeting individual revision.
Wed, 18 Apr 2018 15:05:12 +0200 notify: access the initial revision on an unfiltered repository (issue5821) stable
Boris Feld <boris.feld@octobus.net> [Wed, 18 Apr 2018 15:05:12 +0200] rev 37794
notify: access the initial revision on an unfiltered repository (issue5821) This should avoid crash when the first revision pushed end up being hidden.
Wed, 18 Apr 2018 15:04:12 +0200 notify: use changelog API to iterate over revision number (issue5821) stable
Boris Feld <boris.feld@octobus.net> [Wed, 18 Apr 2018 15:04:12 +0200] rev 37793
notify: use changelog API to iterate over revision number (issue5821) This will avoid iterating over filtered revision.
Thu, 19 Apr 2018 00:55:36 -0400 infinitepush: open files in binary mode stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 19 Apr 2018 00:55:36 -0400] rev 37792
infinitepush: open files in binary mode This fixes the scary looking abort in test-infinitepush-ci.t when unbundling: --- tests/test-infinitepush-ci.t +++ tests/test-infinitepush-ci.t.err @@ -84,15 +84,12 @@ $ hg unbundle .hg/scratchbranches/filebundlestore/a4/c2/a4c202c147a9c4bb91bbadb56321fc5f3950f7f2 adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - new changesets 6cb0989601f1 - (run 'hg update' to get a working copy) - - $ hg glog - o 1:6cb0989601f1 added a - | public + transaction abort! + rollback completed + abort: stream ended unexpectedly (got 68 bytes, expected 218759168) + [255] + + $ hg glog @ 0:67145f466344 initialcommit public This was found by grepping for '"r', "'r", '"w' and "'w" after manually creating a bundle from the same revision, diffing against the corrupt one, and seeing CRs sprinkled around. Sadly, the missing bookmarks are still a problem in the two remaining test failures.
Fri, 30 Mar 2018 21:12:09 -0400 tests: stabilize test-fix.t for Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 30 Mar 2018 21:12:09 -0400] rev 37791
tests: stabilize test-fix.t for Windows
Wed, 18 Apr 2018 15:39:22 -0400 Added signature for changeset ed5448edcbfa stable
Augie Fackler <raf@durin42.com> [Wed, 18 Apr 2018 15:39:22 -0400] rev 37790
Added signature for changeset ed5448edcbfa
Wed, 18 Apr 2018 15:39:21 -0400 Added tag 4.6rc0 for changeset ed5448edcbfa stable
Augie Fackler <raf@durin42.com> [Wed, 18 Apr 2018 15:39:21 -0400] rev 37789
Added tag 4.6rc0 for changeset ed5448edcbfa
Wed, 18 Apr 2018 15:32:08 -0400 merge with default to begin 4.6 freeze stable 4.6rc0
Augie Fackler <augie@google.com> [Wed, 18 Apr 2018 15:32:08 -0400] rev 37788
merge with default to begin 4.6 freeze # no-check-commit because of many vendored packages
Sun, 04 Mar 2018 15:29:41 -0500 rebase: introduce support for automatically rebasing orphan changes
Augie Fackler <augie@google.com> [Sun, 04 Mar 2018 15:29:41 -0500] rev 37787
rebase: introduce support for automatically rebasing orphan changes _destautorebase(SRC) is based on the _destrestack(SRC) revset from fbamend. The supporting _possibledestination function is extracted from evolve, with minor cleanups. We've considered some alternatives here: * This change, but with --auto as the flag name. We're hedging our bets on this a little in this change so that if this ends up being the wrong direction we haven't burned the valauble --auto name on rebase. * --destination auto: I've got reservations about the discoverability of this, and we don't currently have a good story for a revset alias of sorts that changes behavior depending on the context in which it's used. * A "rebase presets" feature, where we could use the currently-an-error positional argument space for the rebase command to define presets, so that users could define a 'linearize' preset that specifies --revision='orphan()-obsolete()' and --dest=_destautoorphanrebase(SRC). Personally, I find the third option somewhat appealing, but am hesitant to "spend" the functionality space of positional arguments to the rebase command. We should revisit the way we expose this functionality sometime in the 4.7 cycle once we've had a chance to vet the implementation of the functionality. Differential Revision: https://phab.mercurial-scm.org/D2668
Wed, 18 Apr 2018 14:32:36 -0400 py3: whitelist six new passing tests
Augie Fackler <augie@google.com> [Wed, 18 Apr 2018 14:32:36 -0400] rev 37786
py3: whitelist six new passing tests Differential Revision: https://phab.mercurial-scm.org/D3406
Mon, 16 Apr 2018 22:21:54 -0700 wireproto: rename wireproto to wireprotov1server (API)
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 22:21:54 -0700] rev 37785
wireproto: rename wireproto to wireprotov1server (API) We have wireprotov2server, wireprotov1peer, and wireprotov2peer. wireproto only contains server functionality. So it makes sense to rename it to wireprotov1server so the naming aligns with everything else. Differential Revision: https://phab.mercurial-scm.org/D3400
Mon, 16 Apr 2018 22:10:02 -0700 wireproto: move version 2 commands dict to wireprotov2server
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 22:10:02 -0700] rev 37784
wireproto: move version 2 commands dict to wireprotov2server This was the final piece of version 2 referenced in wireproto. The break between server implementations is now much cleaner. Differential Revision: https://phab.mercurial-scm.org/D3399
Mon, 16 Apr 2018 22:08:13 -0700 wireproto: move supportedcompengines out of wireproto
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 22:08:13 -0700] rev 37783
wireproto: move supportedcompengines out of wireproto This function is used by both version 1 and version 2. It belongs in a common module. "wireprototypes" may not be the best module name. I may rename it... Differential Revision: https://phab.mercurial-scm.org/D3398
Mon, 16 Apr 2018 22:00:52 -0700 wireproto: reimplement dispatch() for version 2 server
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 22:00:52 -0700] rev 37782
wireproto: reimplement dispatch() for version 2 server The code is minimal. I'm trying to create a cleaner break between version 1 and version 2 server code. Differential Revision: https://phab.mercurial-scm.org/D3397
Mon, 16 Apr 2018 21:52:33 -0700 wireproto: move command registration types to wireprototypes
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 21:52:33 -0700] rev 37781
wireproto: move command registration types to wireprototypes These are shared across wire protocol implementations. wireprototypes is our module for common code. Differential Revision: https://phab.mercurial-scm.org/D3396
Mon, 16 Apr 2018 21:49:59 -0700 wireproto: make version 2 @wireprotocommand an independent function
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 21:49:59 -0700] rev 37780
wireproto: make version 2 @wireprotocommand an independent function Previously, the code for this decorator was shared between version 1 and version 2 commands. Very few parts of the function were identical. So I don't think sharing is justified. wireprotov2server now has its own @wireprotocommand decorator function. Because the decorator is no longer shared, code for configuring the transport policy has been removed. i.e. commands must have separate implementations for each wire protocol version. Differential Revision: https://phab.mercurial-scm.org/D3395
Mon, 16 Apr 2018 21:38:52 -0700 wireproto: don't pass transportpolicy argument
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 16 Apr 2018 21:38:52 -0700] rev 37779
wireproto: don't pass transportpolicy argument The default is version 1 only. So we don't need to pass this argument when declaring commands. Differential Revision: https://phab.mercurial-scm.org/D3394
Wed, 18 Apr 2018 19:25:35 +0530 forget: rename --confirm to --interactive
Sushil khanchi <sushilkhanchi97@gmail.com> [Wed, 18 Apr 2018 19:25:35 +0530] rev 37778
forget: rename --confirm to --interactive Differential Revision: https://phab.mercurial-scm.org/D3405
Tue, 17 Apr 2018 13:46:18 +0200 notify: add maxdiffstat option to truncate long file lists
Joerg Sonnenberger <joerg@bec.de> [Tue, 17 Apr 2018 13:46:18 +0200] rev 37777
notify: add maxdiffstat option to truncate long file lists Large scale changes like a new GCC version can easily result in 1MB+ emails due to diffstat alone. The new maxdiffstat option truncates the list similar to what maxdiff already provides for the diffs. Differential Revision: https://phab.mercurial-scm.org/D3402
Fri, 13 Apr 2018 23:45:07 +0900 log: fix crash on empty revision with --copies switch
Yuya Nishihara <yuya@tcha.org> [Fri, 13 Apr 2018 23:45:07 +0900] rev 37776
log: fix crash on empty revision with --copies switch If a revset is empty, .max() raises ValueError. I don't see any reason to recompute the revs, so I made it reuse the one returned by logcmdutil.getrevs(). If no revs specified by command line, the endrev will be smartset.spanset(repo) + 1, which is basically the same as len(repo), the default of getrenamedfn(). If --follow specified, revs.max() points to the working parent, which seems more correct.
Tue, 17 Apr 2018 21:59:58 +0900 revsetlang: do not pass in non-bytes to parse()
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Apr 2018 21:59:58 +0900] rev 37775
revsetlang: do not pass in non-bytes to parse() Since parse() isn't a simple function, we shouldn't expect it would raise TypeError or ValueError for invalid inputs. Before, TypeError was raised at 'if pos != len(spec)', which was quite late to report an error. This patch also makes tokenize() detect invalid object before converting it to a py3-safe bytes. Spotted while adding the 'revset(...)' hack to _parsewith().
Sat, 14 Apr 2018 00:30:39 +0900 fix: use templater to substitute values in command string
Yuya Nishihara <yuya@tcha.org> [Sat, 14 Apr 2018 00:30:39 +0900] rev 37774
fix: use templater to substitute values in command string bytes.format() isn't supported on Python 3. Luckily, our template syntax is similar so we can reuse it. We need a hack to disable \-escapes as '\' is a directory separator on Windows.
(0) -30000 -10000 -3000 -1000 -512 +512 +1000 +3000 +10000 tip