Sun, 14 Oct 2018 04:37:25 -0400 logcmdutil: add a helpful assertion to catch mistyped templates early
Augie Fackler <augie@google.com> [Sun, 14 Oct 2018 04:37:25 -0400] rev 40285
logcmdutil: add a helpful assertion to catch mistyped templates early This would have made a defect in test-notify.t much easier to figure out. Differential Revision: https://phab.mercurial-scm.org/D5097
Sun, 14 Oct 2018 05:28:01 -0400 notify: adapt to new location of email module's errors
Augie Fackler <augie@google.com> [Sun, 14 Oct 2018 05:28:01 -0400] rev 40284
notify: adapt to new location of email module's errors Differential Revision: https://phab.mercurial-scm.org/D5099
Sun, 14 Oct 2018 04:33:47 -0400 notify: add some b prefixes
Augie Fackler <augie@google.com> [Sun, 14 Oct 2018 04:33:47 -0400] rev 40283
notify: add some b prefixes # skip-blame just b prefixes Differential Revision: https://phab.mercurial-scm.org/D5098
Sun, 14 Oct 2018 09:24:36 +0000 py3: fix test-diff-color.t
Mark Thomas <mbthomas@fb.com> [Sun, 14 Oct 2018 09:24:36 +0000] rev 40282
py3: fix test-diff-color.t Differential Revision: https://phab.mercurial-scm.org/D5095
Sun, 14 Oct 2018 09:07:43 +0000 py3: fix test-revlog.t
Mark Thomas <mbthomas@fb.com> [Sun, 14 Oct 2018 09:07:43 +0000] rev 40281
py3: fix test-revlog.t The mpatchError has a trailing comma on Python 2 but not on Python 3, so use a glob to handle both Python 2 and Python 3. Differential Revision: https://phab.mercurial-scm.org/D5093
Sun, 14 Oct 2018 04:11:35 -0400 fuzz: try *even harder* to prevent Python from looking up usernames
Augie Fackler <augie@google.com> [Sun, 14 Oct 2018 04:11:35 -0400] rev 40280
fuzz: try *even harder* to prevent Python from looking up usernames Differential Revision: https://phab.mercurial-scm.org/D5092
Sun, 14 Oct 2018 03:42:43 -0400 wireproto: fix incorrect function name in docstring
Connor Sheehan <sheehan@mozilla.com> [Sun, 14 Oct 2018 03:42:43 -0400] rev 40279
wireproto: fix incorrect function name in docstring The docstring for `iwireprotocolcommandcacher` references an `onoutputfinished` method. The actual name of the function is `onfinished`. Differential Revision: https://phab.mercurial-scm.org/D5090
Sat, 13 Oct 2018 15:32:52 +0000 py3: fix test-status.t
Mark Thomas <mbthomas@fb.com> [Sat, 13 Oct 2018 15:32:52 +0000] rev 40278
py3: fix test-status.t Differential Revision: https://phab.mercurial-scm.org/D5089
Sun, 14 Oct 2018 07:25:01 +0200 formatter: make debug output prettier
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Oct 2018 07:25:01 +0200] rev 40277
formatter: make debug output prettier "(glob)" won't be needed since pprintgen() can print dict items in stable order.
Sun, 14 Oct 2018 07:23:02 +0200 stringutil: allow to specify initial indent level of pprint()
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Oct 2018 07:23:02 +0200] rev 40276
stringutil: allow to specify initial indent level of pprint() I want to pprint() an inner object, which starts with level=1 indent.
Sun, 14 Oct 2018 07:18:19 +0200 stringutil: make level parameter of pprintgen() 0-origin
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Oct 2018 07:18:19 +0200] rev 40275
stringutil: make level parameter of pprintgen() 0-origin I think this makes more sense in that the level is incremented where nesting goes one more deep.
Sun, 14 Oct 2018 06:51:19 +0200 formatter: use stringutil.pprint() in debug output to drop b''
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Oct 2018 06:51:19 +0200] rev 40274
formatter: use stringutil.pprint() in debug output to drop b''
Thu, 27 Sep 2018 16:56:15 +0200 rust: exposing in parsers module
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 16:56:15 +0200] rev 40273
rust: exposing in parsers module To build with the Rust code, set the HGWITHRUSTEXT environment variable. At this point, it's possible to instantiate and use a rustlazyancestors object from a Python interpreter. The changes in setup.py are obviously a quick hack, just good enough to test/bench without much refactoring. We'd be happy to improve on that with help from the community. Rust bindings crate gets compiled as a static library, which in turn gets linked within 'parsers.so' With respect to the plans at https://www.mercurial-scm.org/wiki/OxidationPlan this would probably qualify as "roll our own FFI". Also, it doesn't quite meet the target of getting rid of C code, since it brings actually more, yet: - the new C code does nothing else than parsing arguments and calling Rust functions. In particular, there's no complex allocation involved. - subsequent changes could rewrite more of revlog.c, this time resulting in an overall decrease of C code and unsafety.
Thu, 27 Sep 2018 16:51:36 +0200 rust: iterator bindings to C code
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 16:51:36 +0200] rev 40272
rust: iterator bindings to C code In this changeset, still made of Rust code only, we expose the Rust iterator for instantiation and consumption from C code. The idea is that both the index and index_get_parents() will be passed from the C extension, hence avoiding a hard link dependency to parsers.so, so that the crate can still be built and tested independently. On the other hand, parsers.so will use the symbols defined in this changeset.
Thu, 27 Sep 2018 17:03:16 +0200 rust: pure Rust lazyancestors iterator
Georges Racinet <gracinet@anybox.fr> [Thu, 27 Sep 2018 17:03:16 +0200] rev 40271
rust: pure Rust lazyancestors iterator This is the first of a patch series aiming to provide an alternative implementation in the Rust programming language of the _lazyancestorsiter from the ancestor module. This iterator has been brought to our attention by the people at Octobus, as a potential good candidate for incremental "oxydation" (rewriting in Rust), because it has shown performance issues lately and it merely deals with ints (revision numbers) obtained by calling the index, whih should be directly callable from Rust code, being itself implemented as a C extension. The idea behind this series is to provide a minimal example of Rust code collaborating with existing C and Python code. To open the way to gradually rewriting more of Mercurial's Python code in Rust, without being forced to pay a large initial cost of rewriting the existing fast core into Rust. This patch does not introduce any bindings to other Mercurial code yet. Instead, it introduces the necessary abstractions to address the problem independently, and unit-test it. Since this is the first use of Rust as a Python module within Mercurial, the hg-core crate gets created within this patch. See its Cargo.toml for more details. Someone with a rustc/cargo installation may chdir into rust/hg-core and run the tests by issuing: cargo test --lib The algorithm is a bit simplified (see details in docstrings), and at its simplest becomes rather trivial, showcasing that Rust has batteries included too: BinaryHeap, the Rust analog of Python's heapq does actually all the work. The implementation can be further optimized and probably be made more idiomatic Rust.
Sat, 13 Oct 2018 23:08:29 -0400 run-tests: restore quoting the python executable for running *.py tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Oct 2018 23:08:29 -0400] rev 40270
run-tests: restore quoting the python executable for running *.py tests This was accidentally dropped in 8cf459d8b111.
Sat, 13 Oct 2018 19:49:33 -0400 tests: replace `cd ..` with an absolute path in a couple ssh tests
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Oct 2018 19:49:33 -0400] rev 40269
tests: replace `cd ..` with an absolute path in a couple ssh tests These tests are broken under py3 on Windows to the point where the `cd ..` was actually escaping into the system wide $TEMP. The subsequent `hg init` created a repo there, and then added a local extension to the hgrc. This breaks every single subsequent test when it tries to `hg init` in its $TESTTMP, and can't load the localwrite.py extension. And since I botched this the first time and replaced the wrong `cd ..`, this just replaces all of them. I've noticed test garbage in $TEMP recently, and maybe this will help. Perhaps `hg init` shouldn't load the config for the local repo, but this is an easy enough workaround for now.
Thu, 04 Oct 2018 00:17:26 -0400 lfs: register the flag processors per repository
Matt Harbison <matt_harbison@yahoo.com> [Thu, 04 Oct 2018 00:17:26 -0400] rev 40268
lfs: register the flag processors per repository Previously, enabling the extension for any repo in commandserver or hgweb would enable the flags on all repos. Since localrepo.resolverevlogstorevfsoptions() is called so early, the check to see if the extension is enabled on the repo (which hasn't been instantiated yet) is a bit awkward. But I don't see a better way.
Tue, 09 Oct 2018 21:53:21 -0400 revlog: allow flag processors to be applied via store options
Matt Harbison <matt_harbison@yahoo.com> [Tue, 09 Oct 2018 21:53:21 -0400] rev 40267
revlog: allow flag processors to be applied via store options This allows flag processors to be registered to specific repos in an extension by wrapping localrepo.resolverevlogstorevfsoptions(). I wanted to add the processors via a function on localrepo, but some of the places where the processors are globally registered don't have a repository available. This makes targeting specific repos in the wrapper awkward, but still manageable.
Fri, 12 Oct 2018 17:34:45 -0400 py3: use str to query registry values on Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Oct 2018 17:34:45 -0400] rev 40266
py3: use str to query registry values on Windows This blew up launching any command if extdiff processed a tool with a regkey config.
Sat, 13 Oct 2018 16:57:28 +0200 py3: convert "usage" literal to bytes
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 16:57:28 +0200] rev 40265
py3: convert "usage" literal to bytes Here _() is practically an identity function, but we shouldn't pass in unicode to _().
Sat, 13 Oct 2018 09:47:53 -0400 churn: remove redundant round()
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 09:47:53 -0400] rev 40264
churn: remove redundant round() To my surprise, the int() is required. Spotted by Mads when he reviewed D5063. Thanks! Differential Revision: https://phab.mercurial-scm.org/D5086
Sat, 13 Oct 2018 10:09:12 +0200 py3: use py3 as the test tag, dropping the k
Martijn Pieters <mj@octobus.net> [Sat, 13 Oct 2018 10:09:12 +0200] rev 40263
py3: use py3 as the test tag, dropping the k Differential Revision: https://phab.mercurial-scm.org/D5079
Sat, 13 Oct 2018 09:03:08 -0400 tests: fix inline extension in test-fncache.t for Python 3
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 09:03:08 -0400] rev 40262
tests: fix inline extension in test-fncache.t for Python 3 # skip-blame just some b prefixing Differential Revision: https://phab.mercurial-scm.org/D5083
Sat, 13 Oct 2018 08:59:06 -0400 py3: 3 more passing tests
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 08:59:06 -0400] rev 40261
py3: 3 more passing tests Differential Revision: https://phab.mercurial-scm.org/D5082
Sat, 13 Oct 2018 08:54:44 -0400 simplemerge: port to Python 3
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 08:54:44 -0400] rev 40260
simplemerge: port to Python 3 Differential Revision: https://phab.mercurial-scm.org/D5081
Sat, 13 Oct 2018 05:14:21 -0400 contrib: fix up output in check-config.py to use strs to avoid b prefixes
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 05:14:21 -0400] rev 40259
contrib: fix up output in check-config.py to use strs to avoid b prefixes Differential Revision: https://phab.mercurial-scm.org/D5059
Sat, 13 Oct 2018 08:54:31 -0400 context: open files in bytes mode
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 08:54:31 -0400] rev 40258
context: open files in bytes mode I'm stunned this open() call has survived this long without the b in the mode - it seems like it should have been a source of bugs somewhere... Differential Revision: https://phab.mercurial-scm.org/D5080
Sat, 13 Oct 2018 09:45:49 -0400 tests: fix up test-hghave for recent run-tests change to use more CPUs
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 09:45:49 -0400] rev 40257
tests: fix up test-hghave for recent run-tests change to use more CPUs Differential Revision: https://phab.mercurial-scm.org/D5085
Sat, 13 Oct 2018 13:39:07 +0000 py3: fix test-parse-date.t
Mark Thomas <mbthomas@fb.com> [Sat, 13 Oct 2018 13:39:07 +0000] rev 40256
py3: fix test-parse-date.t Differential Revision: https://phab.mercurial-scm.org/D5084
Fri, 12 Oct 2018 16:51:11 +0200 obsolete: don't translate internal error message
Yuya Nishihara <yuya@tcha.org> [Fri, 12 Oct 2018 16:51:11 +0200] rev 40255
obsolete: don't translate internal error message AFAIK, it's caught only by "hg debugobsolete", so it's pretty much a programming error.
Fri, 12 Oct 2018 19:25:08 +0200 py3: get around unicode docstrings in test-encoding-textwrap.t and test-help.t
Yuya Nishihara <yuya@tcha.org> [Fri, 12 Oct 2018 19:25:08 +0200] rev 40254
py3: get around unicode docstrings in test-encoding-textwrap.t and test-help.t On Python 3, docstrings are converted back to utf-8 bytes, which practically disables the "if type(message) is pycompat.unicode" hack in gettext(). Let's add one more workaround for the Py3 path.
Sat, 13 Oct 2018 11:52:30 +0200 crecord: make enter move cursor down to the next item of the same type
Anton Shestakov <av6@dwimlabs.net> [Sat, 13 Oct 2018 11:52:30 +0200] rev 40253
crecord: make enter move cursor down to the next item of the same type Let's replace experimental.spacemovesdown with a separate key: Enter, since it wasn't used for anything in crecord. Not sure if '\n' works on Windows though. nextsametype() strictly only moves to items of the same type as the current item. This, for example, allows to go over individual lines in a diff and skip hunk and file headers (which would toggle multiple lines).
Sat, 13 Oct 2018 12:58:24 +0000 py3: fix infinitepush extension tests
Mark Thomas <mbthomas@fb.com> [Sat, 13 Oct 2018 12:58:24 +0000] rev 40252
py3: fix infinitepush extension tests Differential Revision: https://phab.mercurial-scm.org/D5078
Sat, 13 Oct 2018 14:17:25 +0200 py3: build help of compression engines in bytes
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 14:17:25 +0200] rev 40251
py3: build help of compression engines in bytes Removes "b''" from help.
Sat, 13 Oct 2018 14:11:12 +0200 py3: do I/O in bytes in test-help.t
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 14:11:12 +0200] rev 40250
py3: do I/O in bytes in test-help.t
Sat, 13 Oct 2018 07:55:34 -0400 tests: accept slightly different zip file in Python 3
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 07:55:34 -0400] rev 40249
tests: accept slightly different zip file in Python 3 I added some `unzip -t` here and I *think* the only change is from Python 3 having more data in the zip file headers or something. Sigh. Differential Revision: https://phab.mercurial-scm.org/D5075
Sat, 13 Oct 2018 07:53:51 -0400 webcommands: use stringutil.pprint() to repr invalid archive types
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 07:53:51 -0400] rev 40248
webcommands: use stringutil.pprint() to repr invalid archive types Differential Revision: https://phab.mercurial-scm.org/D5074
Sat, 13 Oct 2018 07:51:22 -0400 archival: don't try and fsdecode non-{bytes,str} objects
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 07:51:22 -0400] rev 40247
archival: don't try and fsdecode non-{bytes,str} objects This function accepts both bytes and file-like objects. Differential Revision: https://phab.mercurial-scm.org/D5073
Sat, 13 Oct 2018 06:34:53 -0400 tests: fix last failure in test-tools.t
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 06:34:53 -0400] rev 40246
tests: fix last failure in test-tools.t Differential Revision: https://phab.mercurial-scm.org/D5072
Sat, 13 Oct 2018 12:20:24 +0200 run-tests: run tests with as many processes as cores by default
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 13 Oct 2018 12:20:24 +0200] rev 40245
run-tests: run tests with as many processes as cores by default This seems like a useful default behavior so tests run faster by default* * Except in special circumstances where the OS/filesystem doesn't scale well to many CPU cores (like APFS *cough* *cough*). Differential Revision: https://phab.mercurial-scm.org/D5071
Sat, 13 Oct 2018 12:11:45 +0200 run-tests: print number of tests and parallel process count
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 13 Oct 2018 12:11:45 +0200] rev 40244
run-tests: print number of tests and parallel process count This seems like a useful output message to have. I also sneak in a change to lower the parallel process count if it is larger than the number of tests, as that makes no sense and output saying we're running more tests in parallel than there exists tests would be wonky. Differential Revision: https://phab.mercurial-scm.org/D5070
Sat, 13 Oct 2018 12:29:43 +0200 releasenotes: use stringutil.wrap() instead of handcrafted TextWrapper wrapper
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 12:29:43 +0200] rev 40243
releasenotes: use stringutil.wrap() instead of handcrafted TextWrapper wrapper It's silly to splitlines() a joined string, but we don't care the performance here.
Sat, 13 Oct 2018 00:22:05 -0700 match: optimize matcher when all patterns are of rootfilesin kind
Martin von Zweigbergk <martinvonz@google.com> [Sat, 13 Oct 2018 00:22:05 -0700] rev 40242
match: optimize matcher when all patterns are of rootfilesin kind Internally at Google, we use narrowspecs with only rootfilesin-kind patterns. Sometimes there are thousands of such patterns (i.e. thousands of tracked directories). In such cases, it can take quite long to build and evaluate the resulting matcher. This patch optimizes matchers that have only patterns of rootfilesin so it instead of creating a regular expression, it matches the given file's directory against the set of directories. In a repo with ~3600 tracked directories, it takes about 1.35 s to build the matcher and 2.7 s to walk the dirstate before this patch. After, it takes 0.04 s to create the matcher and 0.87 s to walk the dirstate. It may be worthwhile to do similar optimizations for e.g. patterns of type "kind:", but that's not a priority for us right now. Differential Revision: https://phab.mercurial-scm.org/D5058
Sat, 13 Oct 2018 06:02:27 -0400 churn: use integer division consistently
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 06:02:27 -0400] rev 40241
churn: use integer division consistently This results in slight output changes, but it's at least consistent between Python 2 and 3. Since the output is just bar graphs anyway, I'm content with the changes. Differential Revision: https://phab.mercurial-scm.org/D5063
Sat, 13 Oct 2018 05:58:16 -0400 churn: fix stack traces on Python 3
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 05:58:16 -0400] rev 40240
churn: fix stack traces on Python 3 Differential Revision: https://phab.mercurial-scm.org/D5062
Sat, 13 Oct 2018 04:00:57 -0400 py3: moar passing tests
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 04:00:57 -0400] rev 40239
py3: moar passing tests Differential Revision: https://phab.mercurial-scm.org/D5055
Fri, 12 Oct 2018 12:52:49 -0400 py3: one new passing tests
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 12:52:49 -0400] rev 40238
py3: one new passing tests Differential Revision: https://phab.mercurial-scm.org/D5006
Fri, 12 Oct 2018 12:38:37 -0400 tests: expand our coverage of errors in Python 3 for bad extensions
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 12:38:37 -0400] rev 40237
tests: expand our coverage of errors in Python 3 for bad extensions What a mess. Differential Revision: https://phab.mercurial-scm.org/D5005
Fri, 12 Oct 2018 12:32:12 -0400 tests: add lots of globs and conditional output lines
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 12:32:12 -0400] rev 40236
tests: add lots of globs and conditional output lines The test now passes on Python 3. I'm going to do one follow-up where I'll adjust some grep calls to improve our checking of things on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5004
Sat, 13 Oct 2018 04:00:47 -0400 releasenotes: fix remaining bytes/unicode issues caught by tests
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 04:00:47 -0400] rev 40235
releasenotes: fix remaining bytes/unicode issues caught by tests All tests now pass. Differential Revision: https://phab.mercurial-scm.org/D5054
Sat, 13 Oct 2018 03:27:21 -0400 relnotes: port to Python 3
Augie Fackler <augie@google.com> [Sat, 13 Oct 2018 03:27:21 -0400] rev 40234
relnotes: port to Python 3 The big annoyance here was having to feed textwrap unicodes instead of bytes, but it all seems to work. Differential Revision: https://phab.mercurial-scm.org/D5053
Sat, 13 Oct 2018 11:01:38 +0200 py3: use __code__ instead of func_code to test if func is cachable
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 11:01:38 +0200] rev 40233
py3: use __code__ instead of func_code to test if func is cachable Surprisingly, this fixes test-cache-abuse.t, which would generate a different revbranch cache if filtered set had no cache.
Sat, 13 Oct 2018 10:58:06 +0200 py3: pass in system string to vars(branchmap).__contains__()
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Oct 2018 10:58:06 +0200] rev 40232
py3: pass in system string to vars(branchmap).__contains__()
Sat, 13 Oct 2018 08:48:59 +0000 test-bookmarks-pushpull: use correct tmp dir for no-bm-move.sh
Mark Thomas <mbthomas@fb.com> [Sat, 13 Oct 2018 08:48:59 +0000] rev 40231
test-bookmarks-pushpull: use correct tmp dir for no-bm-move.sh test-bookmarks-pushpull.t writes a temporary file in $TESTDIR instead of $TESTTMP. Make it use $TESTTMP instead. Differential Revision: https://phab.mercurial-scm.org/D5057
Sat, 13 Oct 2018 05:17:28 +0300 py3: add some glob to make output compatible with python 3
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:17:28 +0300] rev 40230
py3: add some glob to make output compatible with python 3 This makes test-pathconflicts-basic.t and test-origbackup-conflict.t passing on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5042
Sat, 13 Oct 2018 05:14:23 +0300 py3: add a b'' prefix in tests/test-requires.t
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:14:23 +0300] rev 40229
py3: add a b'' prefix in tests/test-requires.t This makes the test pass on Python 3. # skip-blame because just b'' prefix. Differential Revision: https://phab.mercurial-scm.org/D5041
Sat, 13 Oct 2018 05:12:20 +0300 py3: use '%d' for rev nums instead of '%s'
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:12:20 +0300] rev 40228
py3: use '%d' for rev nums instead of '%s' This makes test-close-head.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5040
Sat, 13 Oct 2018 05:03:24 +0300 py3: more globing of things to make output compatible between py2 and py3
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:03:24 +0300] rev 40227
py3: more globing of things to make output compatible between py2 and py3 This also makes the test-ssh-repoerror.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5038
Sat, 13 Oct 2018 04:54:35 +0300 py3: use stringutil.pprint() instead of '%r'
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:54:35 +0300] rev 40226
py3: use stringutil.pprint() instead of '%r' This makes test-pager-legacy.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5037
Sat, 13 Oct 2018 04:51:09 +0300 py3: use '%d' for integers instead of '%s'
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:51:09 +0300] rev 40225
py3: use '%d' for integers instead of '%s' Differential Revision: https://phab.mercurial-scm.org/D5036
Sat, 13 Oct 2018 04:47:51 +0300 py3: add some py3 specific output to test
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:47:51 +0300] rev 40224
py3: add some py3 specific output to test This makes the test work on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5035
Sat, 13 Oct 2018 04:42:14 +0300 py3: use stringutil.pprint() in color.py instead of '%r'
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:42:14 +0300] rev 40223
py3: use stringutil.pprint() in color.py instead of '%r' This fixes the test-status-color.t on python 3. Differential Revision: https://phab.mercurial-scm.org/D5034
Sat, 13 Oct 2018 04:36:04 +0300 py3: add b'' prefixes in tests/test-progress.t
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:36:04 +0300] rev 40222
py3: add b'' prefixes in tests/test-progress.t This makes the test pass on Python 3. # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5033
Sat, 13 Oct 2018 04:29:03 +0300 py3: add b'' prefixes to tests/test-keyword.t
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:29:03 +0300] rev 40221
py3: add b'' prefixes to tests/test-keyword.t This test is now pretty close to passing on Python 3. # skip-blame because just b'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D5032
Sat, 13 Oct 2018 04:24:19 +0300 py3: use stringutil.pprint() if we are printing bool values
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:24:19 +0300] rev 40220
py3: use stringutil.pprint() if we are printing bool values Differential Revision: https://phab.mercurial-scm.org/D5031
Sat, 13 Oct 2018 04:21:02 +0300 py3: glob some difference between py2 and py3 output
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:21:02 +0300] rev 40219
py3: glob some difference between py2 and py3 output On py2, the directory names are under quotes and on py3 they are not and I don't know why. Differential Revision: https://phab.mercurial-scm.org/D5030
Sat, 13 Oct 2018 04:09:34 +0300 py3: byteify tests/wireprotosimplecache.py
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:09:34 +0300] rev 40218
py3: byteify tests/wireprotosimplecache.py # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5029
Sat, 13 Oct 2018 04:08:53 +0300 py3: add b'' prefixes in tests/test-help.t
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 04:08:53 +0300] rev 40217
py3: add b'' prefixes in tests/test-help.t This takes us close to make the test passing. # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5028
Sat, 13 Oct 2018 03:59:15 +0300 py3: use sys.stdout.buffer for binary output in tests/svnxml.py
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 03:59:15 +0300] rev 40216
py3: use sys.stdout.buffer for binary output in tests/svnxml.py Just following 6c0b1d964537ab62d76c208f5f04ab414814c94e here. Differential Revision: https://phab.mercurial-scm.org/D5027
Sat, 13 Oct 2018 03:58:20 +0300 py3: use '%s' instead of %r in hgext/convert/subversion.py
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 03:58:20 +0300] rev 40215
py3: use '%s' instead of %r in hgext/convert/subversion.py Using '%r' on bytes in python 3 adds b'' prefixes to output which is bad. I don't see a reason why we want to repr() the string here, so just switched to '%s'. This fixes some output failure in one of the subversion test. Differential Revision: https://phab.mercurial-scm.org/D5026
Sat, 13 Oct 2018 03:46:57 +0300 py3: make test-contrib-perf.t work on python 3
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 03:46:57 +0300] rev 40214
py3: make test-contrib-perf.t work on python 3 Differential Revision: https://phab.mercurial-scm.org/D5025
Sat, 13 Oct 2018 03:32:12 +0300 py3: add 3 more passing tests to whitelist caught by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 03:32:12 +0300] rev 40213
py3: add 3 more passing tests to whitelist caught by buildbot Differential Revision: https://phab.mercurial-scm.org/D5024
Sat, 13 Oct 2018 00:35:37 +0300 py3: add some r'' prefixes in hgext/narrow/narrowwirepeer.py
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 00:35:37 +0300] rev 40212
py3: add some r'' prefixes in hgext/narrow/narrowwirepeer.py This fixes test-narrow-widen-no-ellipsis.t on Python 3. # skip-blame because just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5023
Fri, 12 Oct 2018 19:49:02 +0200 py3: r'' prefix default values for mimetypes.guess_mime()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:49:02 +0200] rev 40211
py3: r'' prefix default values for mimetypes.guess_mime() As suggested by @yuja in D4967. Differential Revision: https://phab.mercurial-scm.org/D5020
Fri, 12 Oct 2018 20:03:29 +0000 absorb: update help text
Mark Thomas <mbthomas@fb.com> [Fri, 12 Oct 2018 20:03:29 +0000] rev 40210
absorb: update help text Update the help text to reflect the recent changes to absorb in D4999. The `-p` option actually only affects the `-a` option: without `-a`, the changes are printed; with `-a` the changes are only printed if `-p` is specified. Reword the help text for `-p` to reflect this. Differential Revision: https://phab.mercurial-scm.org/D5022
Fri, 12 Oct 2018 16:45:46 +0900 fsmonitor: use vfs instead of opener (issue5938)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Oct 2018 16:45:46 +0900] rev 40209
fsmonitor: use vfs instead of opener (issue5938) "opener" of localrepository object was dropped at Mercurial 4.3 (or a7e210167c28). "vfs" should be used instead. wlock is required to write into a file under .hg directory. For efficiency, we should change _cmpsets() from: 1. acquire wlock 2. open log file under .hg directory with write mode 3. compare between result of watchman and Mercurial's dirstate logic 4. write out error info into a file, if error is detected 5. release wlock to: 1. compare between result of watchman and Mercurial's dirstate logic 2. acquire wlock, if error is detected 3. open and write error info into a file 4. release wlock But this is another issue.
Fri, 12 Oct 2018 16:07:08 +0900 tests: configure fsmonitor.mode=paranoid always if fsmonitor is used
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 12 Oct 2018 16:07:08 +0900] rev 40208
tests: configure fsmonitor.mode=paranoid always if fsmonitor is used This forces fsmonitor extension execute "paranoid" code path. Strict speaking, we should make fsmonitor-run-tests.py accept own specific options, but there is no code path, which is disabled in "paranoid" mode, at least now. Therefore, this solution seems reasonable enough.
Mon, 08 Oct 2018 13:12:06 +0900 tests: drop files from exclusion list in test-check-module-imports.t
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Oct 2018 13:12:06 +0900] rev 40207
tests: drop files from exclusion list in test-check-module-imports.t Now, these files has no style issue at checking with import-checker.py. BTW, tests/test-imports-checker.t is still excluded, because almost all code fragments in it has intentional importing style violation. Using NO_CHECK_EOF instead of EOF as heredoc limit mark can make import-checker.py ignore such fragments. But keeping these fragments checkable seems still useful: for example, test-imports-checker.t can be used to test whether import-checker.py can detect erroneous code fragment in test script as expected.
Mon, 08 Oct 2018 12:03:04 +0900 tests: use NO_CHECK_EOF for fragments used to test importing via extension
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Oct 2018 12:03:04 +0900] rev 40206
tests: use NO_CHECK_EOF for fragments used to test importing via extension test-extension.t is excluded in test-check-module-imports.t, because import-checker.py reports that some python code fragments in it does not import modules in recommended style. These code fragments are used to test importing modules relatively and absolutely via extension (e.g. issue4029, issue5208, and so on). Test specific package hierarchy becomes complicated for this purpose, and it seems reasonable to avoid checking these code fragments with import-checker.py. But on the other hand, other code fragments in test-extension.t should be checked by import-checker.py. Therefore, this patch uses NO_CHECK_EOF limit mark only for python code fragments, which are used to test importing via extension in test-extension.t. NO_CHECK_EOF limit mark tells import-checker.py that this code fragment should be ignored, via testparseutil.py.
Mon, 08 Oct 2018 10:30:59 +0900 tests: use NO_CHECK_EOF for fragments having intentional error
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Oct 2018 10:30:59 +0900] rev 40205
tests: use NO_CHECK_EOF for fragments having intentional error Some test scripts are excluded in test-check-module-imports.t, because import-checker.py reports that code fragments embedded in these test scripts have syntax error. But these syntax error is intentional. This patch uses NO_CHECK_EOF instead of EOF as heredoc limit mark for such fragments, in order to make import-checker.py ignore them. NO_CHECK_EOF limit mark tells import-checker.py that this code fragment should be ignored, via testparseutil.py.
Mon, 08 Oct 2018 10:45:36 +0900 tests: fix style issue of importing order in test-lock.py
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Oct 2018 10:45:36 +0900] rev 40204
tests: fix style issue of importing order in test-lock.py test-lock.py is excluded in test-check-module-imports.t, because import-checker.py reports that some stdlibs are imported after local silenttestrunner module. I can not found out any reason why tests/silenttestrunner.py should be imported before some stdlibs from the point of functionality view.
Mon, 08 Oct 2018 10:10:06 +0900 tests: fix style issue of importing hgweb in embedded code fragments
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Mon, 08 Oct 2018 10:10:06 +0900] rev 40203
tests: fix style issue of importing hgweb in embedded code fragments Some test scripts are excluded in test-check-module-imports.t, because import-checker.py reports that hgweb and/or hgwebdir of mercurial.hgweb are not imported in recommended style. To fix this issues, this patch make python code fragments embedded in these files import hgweb from mercurial package at first, and refer hgweb and hgwebdir via imported hgweb.
Fri, 12 Oct 2018 18:20:17 +0200 py3: encode str to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:20:17 +0200] rev 40202
py3: encode str to bytes These fields are str on Python 2 and 3. This module doesn't import any Mercurial modules. So I just did the str -> bytes inline. Differential Revision: https://phab.mercurial-scm.org/D5010
Fri, 12 Oct 2018 19:00:24 +0200 py3: sprinkle statprof.py with utf-8 encoding
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:00:24 +0200] rev 40201
py3: sprinkle statprof.py with utf-8 encoding Trying to chase the long tail of unicode badness in this file due to frame / code objects holding str everywhere. Differential Revision: https://phab.mercurial-scm.org/D5016
Fri, 12 Oct 2018 19:17:22 +0200 py3: flush stdout
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:17:22 +0200] rev 40200
py3: flush stdout This avoids buffering due to mixed print() and sys.stdout.write() by profiling code. And with this, test-profile.t passes on Python 3 \o/. Honestly, I'd be shocked if there weren't more Python 3 encoding issues lingering in the profiling code. That code isn't super high quality and doesn't seem to have thorough test coverage. Differential Revision: https://phab.mercurial-scm.org/D5018
Fri, 12 Oct 2018 19:07:12 +0200 py3: use raw strings in statprof.py
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 19:07:12 +0200] rev 40199
py3: use raw strings in statprof.py This allows main() and argument parsing to work. Differential Revision: https://phab.mercurial-scm.org/D5017
Fri, 12 Oct 2018 18:51:10 +0200 py3: switch from print(..., file=) to write()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:51:10 +0200] rev 40198
py3: switch from print(..., file=) to write() Because Python 3's print() doesn't like bytes. Differential Revision: https://phab.mercurial-scm.org/D5015
Fri, 12 Oct 2018 18:40:32 +0200 py3: use %d in a few places
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:40:32 +0200] rev 40197
py3: use %d in a few places Differential Revision: https://phab.mercurial-scm.org/D5014
Fri, 12 Oct 2018 18:37:42 +0200 py3: use raw strings for stack names
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:37:42 +0200] rev 40196
py3: use raw strings for stack names These are used for simple compares. We don't need to normalize to bytes. As part of this, I expanded a set literal so entries are 1 per line. Differential Revision: https://phab.mercurial-scm.org/D5013
Fri, 12 Oct 2018 18:30:40 +0200 py3: use sysbytes for converting code attributes
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:30:40 +0200] rev 40195
py3: use sysbytes for converting code attributes Differential Revision: https://phab.mercurial-scm.org/D5012
Fri, 12 Oct 2018 18:26:10 +0200 py3: use write() instead of print()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 18:26:10 +0200] rev 40194
py3: use write() instead of print() Because print() expects str and we want to write bytes. There should be no functional changes as part of this. Differential Revision: https://phab.mercurial-scm.org/D5011
Fri, 12 Oct 2018 17:35:54 +0200 py3: use %d to format ints
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 17:35:54 +0200] rev 40193
py3: use %d to format ints Differential Revision: https://phab.mercurial-scm.org/D5009
Fri, 12 Oct 2018 17:31:10 +0200 py3: convert sorting field to sysstr
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 17:31:10 +0200] rev 40192
py3: convert sorting field to sysstr This is used as part of an attribute name check and needs to be native str. Differential Revision: https://phab.mercurial-scm.org/D5008
Fri, 12 Oct 2018 17:25:02 +0200 py3: encode json output to bytes and use write()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 17:25:02 +0200] rev 40191
py3: encode json output to bytes and use write() Differential Revision: https://phab.mercurial-scm.org/D5007
Fri, 12 Oct 2018 17:48:40 +0000 absorb: prompt user to accept absorb changes by default
Mark Thomas <mbthomas@fb.com> [Fri, 12 Oct 2018 17:48:40 +0000] rev 40190
absorb: prompt user to accept absorb changes by default Change the default absorb behaviour to print the changes out and then prompt the user if they want to absorb the changes or not. Providing the `-p` option still prints the result and exits. A new `-a` option is provided which applies the changes without printing them, giving the equivalent of the old behaviour. Differential Revision: https://phab.mercurial-scm.org/D4999
Fri, 12 Oct 2018 15:46:52 +0000 templatefuncs: add truncate parameter to pad
Mark Thomas <mbthomas@fb.com> [Fri, 12 Oct 2018 15:46:52 +0000] rev 40189
templatefuncs: add truncate parameter to pad Add a truncate option to pad that additionally truncates the text to the pad width if it is wider. Since color codes can cause a problem with this, when the text is truncated, the color codes are also stripped. Users of the truncate option should label the text outside the pad. Differential Revision: https://phab.mercurial-scm.org/D5000
Fri, 12 Oct 2018 15:46:51 +0000 absorb: print summary of changesets affected
Mark Thomas <mbthomas@fb.com> [Fri, 12 Oct 2018 15:46:51 +0000] rev 40188
absorb: print summary of changesets affected Differential Revision: https://phab.mercurial-scm.org/D4998
Fri, 12 Oct 2018 13:35:58 +0000 absorb: use a formatter to generate output
Mark Thomas <mbthomas@fb.com> [Fri, 12 Oct 2018 13:35:58 +0000] rev 40187
absorb: use a formatter to generate output Change absorb to use a formatter to generate its output. This allows the use of templates to customize the output. Differential Revision: https://phab.mercurial-scm.org/D4997
Fri, 12 Oct 2018 12:31:17 -0400 tests: fix up test-bad-extension.t's inline extension
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 12:31:17 -0400] rev 40186
tests: fix up test-bad-extension.t's inline extension Upcoming patches will be simpler, I think. Differential Revision: https://phab.mercurial-scm.org/D5003
Fri, 12 Oct 2018 11:44:27 -0400 polib: update to latest release 1.0.7 (upstream rev d75ce6dbbc2a)
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 11:44:27 -0400] rev 40185
polib: update to latest release 1.0.7 (upstream rev d75ce6dbbc2a) # no-check-commit third-party code that doesn't match our style Differential Revision: https://phab.mercurial-scm.org/D5001
Fri, 12 Oct 2018 10:01:09 -0400 tests: glob away some annoying py3 differences
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 10:01:09 -0400] rev 40184
tests: glob away some annoying py3 differences Differential Revision: https://phab.mercurial-scm.org/D4994
Fri, 12 Oct 2018 10:00:43 -0400 tests: fix a repr on python3 in test-extension.t
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 10:00:43 -0400] rev 40183
tests: fix a repr on python3 in test-extension.t Differential Revision: https://phab.mercurial-scm.org/D4993
Fri, 12 Oct 2018 10:00:14 -0400 tests: so many b prefixes in test-extension.t
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 10:00:14 -0400] rev 40182
tests: so many b prefixes in test-extension.t # skip-blame because it's b prefixes Differential Revision: https://phab.mercurial-scm.org/D4992
Fri, 12 Oct 2018 09:59:11 -0400 tests: ensure print() statements in test-extension.t all flush
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 09:59:11 -0400] rev 40181
tests: ensure print() statements in test-extension.t all flush Differential Revision: https://phab.mercurial-scm.org/D4991
Fri, 12 Oct 2018 16:19:21 +0200 revlog: update pure nodecache start lookup offset on insertion
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Oct 2018 16:19:21 +0200] rev 40180
revlog: update pure nodecache start lookup offset on insertion test-storage.py is failing in pure builds because the population of the node cache isn't accounting for the new starting offset after a revlog insertion. This commit updates the node cache start offset to account for insertions. I'm not 100% convinced this is the ideal solution. But it works and seems correct. Differential Revision: https://phab.mercurial-scm.org/D4996
Wed, 03 Oct 2018 13:57:42 -0700 exchangev2: use filesdata
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 03 Oct 2018 13:57:42 -0700] rev 40179
exchangev2: use filesdata filesdata is a more efficient mechanism for bulk fetching files data for a range of changesets. Let's use it in exchangev2. With this change, a client performing a full clone of mozilla-unified transmits substantially fewer bytes across the wire: before: 139,124,863 bytes sent after: 20,522,499 bytes sent The bulk of the remaining bytes is likely the transfer of ~1M nodes for changesets and manifests. We can eliminate this by making requests in terms of node ranges instead of explicit node lists... Differential Revision: https://phab.mercurial-scm.org/D4982
Wed, 03 Oct 2018 12:54:39 -0700 wireprotov2: define and implement "filesdata" command
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 03 Oct 2018 12:54:39 -0700] rev 40178
wireprotov2: define and implement "filesdata" command Previously, the only way to access file revision data was the "filedata" command. This command is useful to have. But, it only allowed resolving revision data for a single file. This meant that clients needed to send 1 command for each tracked path they were seeking data on. Furthermore, those commands would need to enumerate the exact file nodes they wanted data for. This approach meant that clients were sending a lot of data to remotes in order to request file data. e.g. if there were 1M file revisions, we'd need at least 20,000,000 bytes just to encode file nodes! Many clients on the internet don't have that kind of upload capacity. In order to limit the amount of data that clients must send, we'll need more efficient ways to request repository data. This commit defines and implements a new "filesdata" command. This command allows the retrieval of data for multiple files by specifying changeset revisions and optional file patterns. The command figures out what file revisions are "relevant" and sends them in bulk. The logic around choosing which file revisions to send in the case of haveparents not being set is overly simple and will over-send files. We will need more smarts here eventually. (Specifically, the client will need to tell the server which revisions it knows about.) This work is deferred until a later time. Differential Revision: https://phab.mercurial-scm.org/D4981
Tue, 02 Oct 2018 10:31:36 -0700 wireprotov2: extract file object emission to own function
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 02 Oct 2018 10:31:36 -0700] rev 40177
wireprotov2: extract file object emission to own function An upcoming commit will introduce another caller. Differential Revision: https://phab.mercurial-scm.org/D4980
Mon, 08 Oct 2018 18:17:12 -0700 wireprotov2: change how revisions are specified to changesetdata
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 08 Oct 2018 18:17:12 -0700] rev 40176
wireprotov2: change how revisions are specified to changesetdata Right now, we have a handful of arguments for specifying the revisions whose data should be returned. Defining how all these arguments interact when various combinations are present is difficult. This commit establishes a new, generic mechanism for specifying revisions. Instead of a hodgepodge of arguments defining things, we have a list of dicts that specify revision selectors. The final set of revisions is a union of all these selectors. We implement support for specifying revisions based on: * An explicit list of changeset revisions * An explicit list of changeset revisions plus ancestry depth * A DAG range between changeset roots and heads If you squint hard enough, this problem has already been solved by revsets. But I'm reluctant to expose revsets to the wire protocol because that would require servers to implement a revset parser. Plus there are security and performance implications: the set of revision selectors needs to be narrowly and specifically tailored for what is appropriate to be executing on a server. Perhaps there would be a way for us to express the "parse tree" of a revset query, for example. I'm not sure. We can explore this space another time. For now, the new mechanism should bring sufficient flexibility while remaining relatively simple. The selector "types" are prefixed with "changeset" because I plan to add manifest and file-flavored selectors as well. This will enable us to e.g. select file revisions based on a range of changeset revisions. Differential Revision: https://phab.mercurial-scm.org/D4979
Mon, 08 Oct 2018 17:54:14 -0700 wireprotov2: stop sending phase updates for base revisions
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 08 Oct 2018 17:54:14 -0700] rev 40175
wireprotov2: stop sending phase updates for base revisions This feature is broken and doesn't work properly in all scenarios. e.g. if we have the following DAGs: client server D draft C draft C draft B draft B public A public A public The current code would only send the phase data for C. The client wouldn't see that B moved from draft to public. This feature will be restored in a future commit. For now, it is making refactoring of how revisions are specified in the wire protocol a bit difficult... Differential Revision: https://phab.mercurial-scm.org/D4978
Thu, 11 Oct 2018 09:47:52 +0200 debugcommands: support wrapping long lines
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 09:47:52 +0200] rev 40174
debugcommands: support wrapping long lines If a line within a block is indented more than the line that came before, we automatically concatenate it with the previous line. This allows us to pretty format data. This will make tests easier to read. At some point we may just want to evaluate entire blocks as Python code or something, as even with this change, things aren't perfect, as we can't e.g. have formatting like: foo eval:[ True ] But this is strictly better than before, where we couldn't wrap long lines. Differential Revision: https://phab.mercurial-scm.org/D4977
Wed, 03 Oct 2018 13:17:00 -0700 exchangev2: honor server advertised manifestdata recommended batch size
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 03 Oct 2018 13:17:00 -0700] rev 40173
exchangev2: honor server advertised manifestdata recommended batch size Let's plug the client up to the server-advertised recommended batch size for manifestdata requests. Differential Revision: https://phab.mercurial-scm.org/D4976
Mon, 08 Oct 2018 17:45:51 -0700 wireprotov2: advertise recommended batch size for requests
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 08 Oct 2018 17:45:51 -0700] rev 40172
wireprotov2: advertise recommended batch size for requests Currently, exchangev2 hardcodes the batch size for how many revisions to fetch per command request. A single value is not appropriate for every repository because some repositories may have a drastically different "shape" from other repositories. e.g. a repo with lots of small files may benefit from larger batch sizes than a repo with lots of large files. And depending on caching used by the server, the server may wish to control the number of commands (to e.g. mitigate overhead of following content redirects). This commit teaches wireprotov2 commands to declare extra metadata which is advertised as part of the command descriptor. The manifestdata command has been taught to advertise a recommended batch size for requests. Differential Revision: https://phab.mercurial-scm.org/D4975
Wed, 03 Oct 2018 13:07:28 -0700 httppeer: expose API descriptor on httpv2peer
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 03 Oct 2018 13:07:28 -0700] rev 40171
httppeer: expose API descriptor on httpv2peer The API descriptor in wireprotov2 is much more expressive than space-delimited tokens and it will be difficult to define methods to query it in all of the ways we'll want to query it. So let's just declare defeat and expose the API descriptor on the peer instance. As part of this, we define a new interface for version 2 peers, fulfilling a TODO in the process. Differential Revision: https://phab.mercurial-scm.org/D4974
Thu, 11 Oct 2018 09:26:05 +0200 tests: use baseurl instead of advertisedbaseurl
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 09:26:05 +0200] rev 40170
tests: use baseurl instead of advertisedbaseurl The distinction matters for e.g. hosts behind load balancers. But for the test environment, it doesn't matter. For whatever reason, advertisedbaseurl is resolving to http://1.0.0.127.in-addr.arpa:$HGPORT on my MBP. This hostname fails to resolve, causing the test to fail. No clue what's up with that behavior. Differential Revision: https://phab.mercurial-scm.org/D4973
Fri, 12 Oct 2018 09:23:55 -0400 py3: another one started passing
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 09:23:55 -0400] rev 40169
py3: another one started passing Differential Revision: https://phab.mercurial-scm.org/D4990
Fri, 12 Oct 2018 06:55:11 -0400 py3: one more passing test
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:55:11 -0400] rev 40168
py3: one more passing test Differential Revision: https://phab.mercurial-scm.org/D4989
Fri, 12 Oct 2018 06:50:01 -0400 scmutil: wrap locker information in bytestr before repr()ing it
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:50:01 -0400] rev 40167
scmutil: wrap locker information in bytestr before repr()ing it Differential Revision: https://phab.mercurial-scm.org/D4988
Fri, 12 Oct 2018 06:50:46 -0400 py3: more passing tests
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:50:46 -0400] rev 40166
py3: more passing tests Differential Revision: https://phab.mercurial-scm.org/D4987
Fri, 12 Oct 2018 06:35:55 -0400 py3: whitelist another passing test
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:35:55 -0400] rev 40165
py3: whitelist another passing test Differential Revision: https://phab.mercurial-scm.org/D4986
Fri, 12 Oct 2018 06:22:15 -0400 obsolete: convert error string to a sysstr
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:22:15 -0400] rev 40164
obsolete: convert error string to a sysstr This should be okay because we're just %-formatting a hash into a localized string. Differential Revision: https://phab.mercurial-scm.org/D4985
Fri, 12 Oct 2018 06:39:32 -0400 tests: ensure the python 3 passing test list stays sorted
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:39:32 -0400] rev 40163
tests: ensure the python 3 passing test list stays sorted Differential Revision: https://phab.mercurial-scm.org/D4984
Fri, 12 Oct 2018 06:35:33 -0400 py3: sort passing test list
Augie Fackler <augie@google.com> [Fri, 12 Oct 2018 06:35:33 -0400] rev 40162
py3: sort passing test list Differential Revision: https://phab.mercurial-scm.org/D4983
Thu, 11 Oct 2018 23:07:23 +0200 py3: tweak stdout writing in test-hgweb-no-path-info.t
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 23:07:23 +0200] rev 40161
py3: tweak stdout writing in test-hgweb-no-path-info.t We want to write bytes for convenience. This requires sys.stdout.buffer. But using sys.stdout.buffer introducing buffered output. So we sprinkle code with sys.stdout.flush() to force immediate writes. After all that, Python 3 was emitting b'' prefixed output for errors. So we only print errors if there were some. There aren't, so b'' don't come into play and output is identical in Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D4972
Thu, 11 Oct 2018 22:53:44 +0200 py3: use .+ instead of .* in regexp pattern
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:53:44 +0200] rev 40160
py3: use .+ instead of .* in regexp pattern Python 3.7 changed the behavior of re.sub(). See https://bugs.python.org/issue33585. The new code should work on old and new Pythons. Differential Revision: https://phab.mercurial-scm.org/D4971
Thu, 11 Oct 2018 22:26:12 +0200 py3: coerce bytestr to bytes to appease urllib.parse.quote_from_bytes()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:26:12 +0200] rev 40159
py3: coerce bytestr to bytes to appease urllib.parse.quote_from_bytes() Differential Revision: https://phab.mercurial-scm.org/D4969
Thu, 11 Oct 2018 21:47:39 +0200 py3: pass str and return bytes from mimetypes.guess_type()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 21:47:39 +0200] rev 40158
py3: pass str and return bytes from mimetypes.guess_type() This function wants a str (which represents a path) and returns a str. We normalize input to str and output to bytes. Differential Revision: https://phab.mercurial-scm.org/D4967
(0) -30000 -10000 -3000 -1000 -128 +128 +1000 +3000 +10000 tip