changeset 39560:2182e67ea912

fastannotate: use repo.local() This is the proper way to check whether we're dealing with a local repository, since extensions should be coding to an interface and not testing for exact types. Differential Revision: https://phab.mercurial-scm.org/D4542
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 07 Sep 2018 18:35:54 -0700
parents 0a5f7e16ec96
children 10a8472f6662
files hgext/fastannotate/protocol.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/fastannotate/protocol.py	Tue Sep 11 16:04:55 2018 -0700
+++ b/hgext/fastannotate/protocol.py	Fri Sep 07 18:35:54 2018 -0700
@@ -14,7 +14,6 @@
     error,
     extensions,
     hg,
-    localrepo,
     util,
     wireprotov1peer,
     wireprotov1server,
@@ -221,7 +220,7 @@
 
 def clientreposetup(ui, repo):
     _registerwireprotocommand()
-    if isinstance(repo, localrepo.localrepository):
+    if repo.local():
         localreposetup(ui, repo)
     # TODO: this mutates global state, but only if at least one repo
     # has the extension enabled. This is probably bad for hgweb.