changeset 48460:c51408b92b88

directaccess: fix uses of commands.status() that don't go through flag parsing When `commands.commit.post-status` is enabled, after commit/amend, commands.status() is called without any revs argument, which means that status gets None instead of an empty list like it would receive if the user had invoked this on the commandline. With the `experimental.directaccess` config enabled, this gets passed to `unhidehashlikerevs`, which didn't previously handle None, but now should. Differential Revision: https://phab.mercurial-scm.org/D11883
author Kyle Lippincott <spectral@google.com>
date Tue, 07 Dec 2021 15:48:22 -0800
parents bc6547f61310
children eaad68294904
files mercurial/scmutil.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Sun Nov 07 16:25:42 2021 -0500
+++ b/mercurial/scmutil.py	Tue Dec 07 15:48:22 2021 -0800
@@ -2197,6 +2197,9 @@
 
     returns a repo object with the required changesets unhidden
     """
+    if not specs:
+        return repo
+
     if not repo.filtername or not repo.ui.configbool(
         b'experimental', b'directaccess'
     ):