directaccess: fix uses of commands.status() that don't go through flag parsing
authorKyle Lippincott <spectral@google.com>
Tue, 07 Dec 2021 15:48:22 -0800
changeset 48460 c51408b92b88
parent 48459 bc6547f61310
child 48461 eaad68294904
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
mercurial/scmutil.py
--- 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'
     ):