hgit: make sure repository is local before checking for store type
authorPulkit Goyal <7895pulkit@gmail.com>
Wed, 04 Mar 2020 22:13:15 +0530
changeset 44542 a2b49606a837
parent 44541 d880805d5442
child 44543 36f08ae87ef6
hgit: make sure repository is local before checking for store type httppeer (and maybe others too) does not have a store attribute. This was causing `hg pull` being broken on a hg repository when the extension is enabled. localpeer.local() does returns a non-None value but I am not sure if it matters. Differential Revision: https://phab.mercurial-scm.org/D8217
hgext/git/__init__.py
--- a/hgext/git/__init__.py	Fri Mar 06 18:08:23 2020 +0100
+++ b/hgext/git/__init__.py	Wed Mar 04 22:13:15 2020 +0530
@@ -230,7 +230,7 @@
 
 
 def reposetup(ui, repo):
-    if isinstance(repo.store, gitstore):
+    if repo.local() and isinstance(repo.store, gitstore):
         orig = repo.__class__
         repo.store._progress_factory = repo.ui.makeprogress