Sat, 07 Nov 2020 19:24:12 +0100 transaction: rename find to findoffset and drop backup file support
Joerg Sonnenberger <joerg@bec.de> [Sat, 07 Nov 2020 19:24:12 +0100] rev 45885
transaction: rename find to findoffset and drop backup file support transaction.find used to support access to both the regular file and backup file list. They have different formats, so any consumer has to be aware of the difference alredy. There is no in-core consumer for the backup file access, so don't provide it. Differential Revision: https://phab.mercurial-scm.org/D9276
Sat, 07 Nov 2020 17:56:01 +0100 transaction: drop per-file extra data support
Joerg Sonnenberger <joerg@bec.de> [Sat, 07 Nov 2020 17:56:01 +0100] rev 45884
transaction: drop per-file extra data support At the moment, transactions support an optional extra data argument for all files to be stored in addition to the original offset. This is used in core only by the revlog inline to external data migration. It is used to memoize the number of revisions before the transaction. That number of can be computed during the walk easily, so drop the requirement. Differential Revision: https://phab.mercurial-scm.org/D9275
Thu, 12 Nov 2020 14:07:34 -0800 templates: define a {onelinesummary} keyword
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 14:07:34 -0800] rev 45883
templates: define a {onelinesummary} keyword It is sometimes useful to be able to use the configured `command-template.oneline-summary` in higher-level templates. For example, I would like to use it in an internal template that lists commits in a "review unit" (kind of a pull request). This patch adds support for that. We may want to define a way of formatting a context using a command-specific override (from `command-templates.oneline-summary.<command>`), but that will have to be a template function instead. I don't plan to do that, but I'm mentioning it now in case reviewers would prefer that we use a no-arg function (i.e. `{onelinesummary()}`) already today to prepare for that. Differential Revision: https://phab.mercurial-scm.org/D9314
Fri, 30 Oct 2020 12:46:38 -0700 relnotes: document new [command-templates] section
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Oct 2020 12:46:38 -0700] rev 45882
relnotes: document new [command-templates] section Differential Revision: https://phab.mercurial-scm.org/D9266
Fri, 30 Oct 2020 13:26:18 -0700 help: document the new [command-templates] config section
Martin von Zweigbergk <martinvonz@google.com> [Fri, 30 Oct 2020 13:26:18 -0700] rev 45881
help: document the new [command-templates] config section Differential Revision: https://phab.mercurial-scm.org/D9265
Sun, 08 Nov 2020 16:23:35 -0500 strip: move into core
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Sun, 08 Nov 2020 16:23:35 -0500] rev 45880
strip: move into core As discussed at the 5.2 sprint, replace strip extension by a core command, debugstrip. Obviously, the extension stays for backwards compatibility. As an implementation note, I moved the strip file as is into core, which is not done elsewhere, AFAIK. I could have inlined it into debugcommands, but that doesn't sound great. Differential Revision: https://phab.mercurial-scm.org/D9285
Sat, 07 Nov 2020 16:36:19 -0800 revlog: pass sidedata argument to flagutil.processflagswrite()
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Nov 2020 16:36:19 -0800] rev 45879
revlog: pass sidedata argument to flagutil.processflagswrite() Bug found through pytype. Differential Revision: https://phab.mercurial-scm.org/D9280
Sat, 07 Nov 2020 16:45:58 -0800 pure: guard against empty blocks
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 07 Nov 2020 16:45:58 -0800] rev 45878
pure: guard against empty blocks If blocks is empty, we append `None` to the returned list, which is incorrect. This subtle issue was caught by pytype, which correctly identified the return value as List[Optional[Tuple]] because of this possibility. Differential Revision: https://phab.mercurial-scm.org/D9279
Mon, 16 Nov 2020 16:38:57 +0100 rust-status: don't bubble up os errors, translate them to bad matches
Raphaël Gomès <rgomes@octobus.net> [Mon, 16 Nov 2020 16:38:57 +0100] rev 45877
rust-status: don't bubble up os errors, translate them to bad matches In the rare cases when either the OS/filesystem throws an error on an otherwise valid action, or because a path is not representable on the filesystem, or because of concurrent actions in the filesystem, we want to warn the user about said path instead of bubbling up the error, causing an exception to be raised in the Python layer. Differential Revision: https://phab.mercurial-scm.org/D9320
Mon, 16 Nov 2020 16:36:00 +0100 rust-status: properly translate OSError to Python
Raphaël Gomès <rgomes@octobus.net> [Mon, 16 Nov 2020 16:36:00 +0100] rev 45876
rust-status: properly translate OSError to Python This is probably never going to be called after the next few patches, but we might as well make sure this is done correctly for the future rewrite. Differential Revision: https://phab.mercurial-scm.org/D9319
Mon, 16 Nov 2020 21:28:42 -0800 shelve: clear merge state after partial shelve
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 21:28:42 -0800] rev 45875
shelve: clear merge state after partial shelve Differential Revision: https://phab.mercurial-scm.org/D9335
Mon, 16 Nov 2020 22:38:36 -0800 tests: show that interactive shelve can leave the repo with a merge state
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 22:38:36 -0800] rev 45874
tests: show that interactive shelve can leave the repo with a merge state If part of a file is shelved (as we already do in a test), there will be an unfinished merge state left after `hg shelve` finishes. There should never be a merge conflict and there should never be a reason that the user would like to re-resolve conflicts, so we should clear that state (see next patch). Differential Revision: https://phab.mercurial-scm.org/D9334
Mon, 16 Nov 2020 10:30:53 -0800 histedit: disable color while rendering template for use in plan
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 10:30:53 -0800] rev 45873
histedit: disable color while rendering template for use in plan Differential Revision: https://phab.mercurial-scm.org/D9324
Mon, 16 Nov 2020 10:30:06 -0800 tests: show how `hg histedit` can put color codes in histedit plan
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 10:30:06 -0800] rev 45872
tests: show how `hg histedit` can put color codes in histedit plan Differential Revision: https://phab.mercurial-scm.org/D9323
Fri, 13 Nov 2020 09:41:49 -0800 split: disable color while rendering template for use in commit message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 13 Nov 2020 09:41:49 -0800] rev 45871
split: disable color while rendering template for use in commit message Differential Revision: https://phab.mercurial-scm.org/D9322
Thu, 12 Nov 2020 17:06:45 -0800 tests: show how `hg split` can put color codes in commit template
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 17:06:45 -0800] rev 45870
tests: show how `hg split` can put color codes in commit template With D9255, I made it so `hg split` respects the `commmand-templates.oneline-summary` config. I don't think I realized that the output I modified was being put in a commit message template. The result was that if you have coloring enabled, you get colors in the commit template. This patch show that. The test is unfortunately pretty verbose (like most other `hg split` tests) and shows a bunch of irrelevant "color codes" (templater labels). Differential Revision: https://phab.mercurial-scm.org/D9321
Mon, 16 Nov 2020 16:00:13 -0800 dispatch: move some helper functions down into scmutil
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 16:00:13 -0800] rev 45869
dispatch: move some helper functions down into scmutil I plan to reuse `formatparse()` in the next patch. Differential Revision: https://phab.mercurial-scm.org/D9331
Mon, 16 Nov 2020 15:11:51 -0800 errors: raise more specific errors from rewriteutil
Martin von Zweigbergk <martinvonz@google.com> [Mon, 16 Nov 2020 15:11:51 -0800] rev 45868
errors: raise more specific errors from rewriteutil Differential Revision: https://phab.mercurial-scm.org/D9330
Tue, 17 Nov 2020 19:29:08 +0900 chgserver: backport py3 buffered I/O workarounds from procutil
Yuya Nishihara <yuya@tcha.org> [Tue, 17 Nov 2020 19:29:08 +0900] rev 45867
chgserver: backport py3 buffered I/O workarounds from procutil I've recently switched to new machine and I found chg's stdout is fully buffered. Even though chg server is a daemon process, it inherits the environment where the chg client originally forked the server. This means the server's stdout might have been wrapped by LineBufferedWrapper. That's why we need to do wrap/unwrap in both ways. The "if" condition in _restoreio() looks weird, but I'm not willing to clean things up because stdio behavior is fundamentally different between py2 and py3, and py2 support will be dropped anyway.
Thu, 12 Nov 2020 15:28:06 -0800 errors: use InputError for some errors on `hg clone`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 15:28:06 -0800] rev 45866
errors: use InputError for some errors on `hg clone` Differential Revision: https://phab.mercurial-scm.org/D9329
Thu, 12 Nov 2020 13:22:40 -0800 errors: raise InputError when given non-existent paths etc
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 13:22:40 -0800] rev 45865
errors: raise InputError when given non-existent paths etc Differential Revision: https://phab.mercurial-scm.org/D9328
Thu, 12 Nov 2020 10:35:33 -0800 errors: use InputError for errors about bad label names (tags etc)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 10:35:33 -0800] rev 45864
errors: use InputError for errors about bad label names (tags etc) Differential Revision: https://phab.mercurial-scm.org/D9327
Thu, 12 Nov 2020 09:53:14 -0800 errors: use InputError for errors about bad paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 12 Nov 2020 09:53:14 -0800] rev 45863
errors: use InputError for errors about bad paths Differential Revision: https://phab.mercurial-scm.org/D9326
Tue, 10 Nov 2020 09:14:01 -0800 destutil: raise more specific error when histedit.defaultrev is empty
Martin von Zweigbergk <martinvonz@google.com> [Tue, 10 Nov 2020 09:14:01 -0800] rev 45862
destutil: raise more specific error when histedit.defaultrev is empty Differential Revision: https://phab.mercurial-scm.org/D9313
Tue, 20 Oct 2020 08:56:00 -0700 errors: raise more specific errors when default remote not configured
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Oct 2020 08:56:00 -0700] rev 45861
errors: raise more specific errors when default remote not configured Differential Revision: https://phab.mercurial-scm.org/D9312
Thu, 22 Oct 2020 13:56:01 -0700 errors: set detailed exit code to 30 for config errors
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 13:56:01 -0700] rev 45860
errors: set detailed exit code to 30 for config errors This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9311
Mon, 12 Oct 2020 12:44:18 -0700 errors: introduce StateError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Oct 2020 12:44:18 -0700] rev 45859
errors: introduce StateError and use it from commands and cmdutil This very similar to an earlier patch (which was for `InputError`). In this patch, I also updated the transplant extension only because `test-transplant.t` would otherwise have needed a `#if continueflag`. Differential Revision: https://phab.mercurial-scm.org/D9310
Thu, 22 Oct 2020 13:31:34 -0700 errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 13:31:34 -0700] rev 45858
errors: set detailed exit code to 100 for some remote errors This is per https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. Differential Revision: https://phab.mercurial-scm.org/D9309
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 tip