D4542: fastannotate: use repo.local()
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Sep 12 00:33:12 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4542
AFFECTED FILES
hgext/fastannotate/protocol.py
CHANGE DETAILS
diff --git a/hgext/fastannotate/protocol.py b/hgext/fastannotate/protocol.py
--- a/hgext/fastannotate/protocol.py
+++ b/hgext/fastannotate/protocol.py
@@ -221,7 +221,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.
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list