Submitter | phabricator |
---|---|
Date | March 4, 2020, 4:47 p.m. |
Message ID | <differential-rev-PHID-DREV-26a4dpcodanitqy672yw-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/45465/ |
State | Superseded |
Headers | show |
Comments
mharbison72 added inline comments. INLINE COMMENTS > __init__.py:226 > def reposetup(ui, repo): > - if isinstance(repo.store, gitstore): > + if util.safehasattr(repo, 'store') and isinstance(repo.store, gitstore): > orig = repo.__class__ It seems like the usual `reposetup()` check to handle peers is if not repo.local(): return IDK if it matters though. It looks like `localpeer.local()` returns a non-None value. REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8217/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8217 To: pulkit, #hg-reviewers Cc: mharbison72, mercurial-devel
This revision now requires changes to proceed. durin42 added a comment. durin42 requested changes to this revision. Could you rebase this on the new version of 6734? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8217/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8217 To: pulkit, #hg-reviewers, durin42 Cc: durin42, mharbison72, mercurial-devel
Patch
diff --git a/hgext/git/__init__.py b/hgext/git/__init__.py --- a/hgext/git/__init__.py +++ b/hgext/git/__init__.py @@ -19,6 +19,7 @@ localrepo, pycompat, store, + util, ) from . import ( @@ -222,7 +223,7 @@ def reposetup(ui, repo): - if isinstance(repo.store, gitstore): + if util.safehasattr(repo, 'store') and isinstance(repo.store, gitstore): orig = repo.__class__ repo.store._progress_factory = repo.ui.makeprogress