Mercurial > public > mercurial-scm > hg-stable
diff mercurial/rewriteutil.py @ 50951:d718eddf01d9
safehasattr: drop usage in favor of hasattr
The two functions should now be equivalent at least in their usage in core.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 31 Aug 2023 23:56:15 +0200 |
parents | cbcbf63b6dbf |
children | f4733654f144 |
line wrap: on
line diff
--- a/mercurial/rewriteutil.py Thu Dec 08 15:33:19 2022 +0100 +++ b/mercurial/rewriteutil.py Thu Aug 31 23:56:15 2023 +0200 @@ -21,7 +21,6 @@ obsutil, revset, scmutil, - util, ) @@ -77,7 +76,7 @@ hint = _(b"no changeset checked out") raise error.InputError(msg, hint=hint) - if any(util.safehasattr(r, 'rev') for r in revs): + if any(hasattr(r, 'rev') for r in revs): repo.ui.develwarn(b"rewriteutil.precheck called with ctx not revs") revs = (r.rev() for r in revs)