Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 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 | 8c4881c07f57 |
children | f8f2ecdde4b5 |
comparison
equal
deleted
inserted
replaced
48459:bc6547f61310 | 48460:c51408b92b88 |
---|---|
2195 hiddentype can be: 1) 'warn': warn while unhiding changesets | 2195 hiddentype can be: 1) 'warn': warn while unhiding changesets |
2196 2) 'nowarn': don't warn while unhiding changesets | 2196 2) 'nowarn': don't warn while unhiding changesets |
2197 | 2197 |
2198 returns a repo object with the required changesets unhidden | 2198 returns a repo object with the required changesets unhidden |
2199 """ | 2199 """ |
2200 if not specs: | |
2201 return repo | |
2202 | |
2200 if not repo.filtername or not repo.ui.configbool( | 2203 if not repo.filtername or not repo.ui.configbool( |
2201 b'experimental', b'directaccess' | 2204 b'experimental', b'directaccess' |
2202 ): | 2205 ): |
2203 return repo | 2206 return repo |
2204 | 2207 |