repo-or-peer: deprecate calling `islocal` on non-path object
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 29 Nov 2022 21:42:08 +0100
changeset 49686 b478e1b132e9
parent 49684 229e0ed88895
child 49687 0d5b2e010614
repo-or-peer: deprecate calling `islocal` on non-path object There object have a `.local()` method and should use it.
mercurial/hg.py
--- a/mercurial/hg.py	Wed Nov 30 11:12:48 2022 +0100
+++ b/mercurial/hg.py	Tue Nov 29 21:42:08 2022 +0100
@@ -168,6 +168,7 @@
             return _peerlookup(repo).islocal(repo)
         except AttributeError:
             return False
+    repo.ui.deprecwarn(b"use obj.local() instead of islocal(obj)", b"6.4")
     return repo.local()