[Request] [+ ] D11883: directaccess: fix uses of commands.status() that don't go through flag parsing

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Tue Dec 7 23:57:21 UTC 2021


spectral created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D11883

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -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'
     ):



To: spectral, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20211207/5a9817ec/attachment.html>


More information about the Mercurial-patches mailing list