Patchwork D2973: narrow: use repo.local() instead of isinstance()

login
register
mail settings
Submitter phabricator
Date March 30, 2018, 6:16 p.m.
Message ID <differential-rev-PHID-DREV-36lxmtw7cs53nknurzx6-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29980/
State Superseded
Headers show

Comments

phabricator - March 30, 2018, 6:16 p.m.
martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2973

AFFECTED FILES
  hgext/narrow/__init__.py

CHANGE DETAILS




To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/__init__.py b/hgext/narrow/__init__.py
--- a/hgext/narrow/__init__.py
+++ b/hgext/narrow/__init__.py
@@ -71,7 +71,7 @@ 
 
 def reposetup(ui, repo):
     """Wraps local repositories with narrow repo support."""
-    if not isinstance(repo, localrepo.localrepository):
+    if not repo.local():
         return
 
     narrowrepo.wraprepo(repo)