This is an archive of the discontinued Mercurial Phabricator instance.

hgit: make sure repository is local before checking for store type
ClosedPublic

Authored by pulkit on Mar 4 2020, 11:47 AM.

Details

Summary

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.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Mar 4 2020, 11:47 AM
mharbison72 added inline comments.
hgext/git/__init__.py
233

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.

durin42 requested changes to this revision.Mar 4 2020, 1:47 PM
durin42 added a subscriber: durin42.

Could you rebase this on the new version of 6734?

This revision now requires changes to proceed.Mar 4 2020, 1:47 PM
pulkit retitled this revision from hgit: make sure repository has store attribute before checking for type to hgit: make sure repository is local before checking for store type.Mar 5 2020, 3:17 AM
pulkit edited the summary of this revision. (Show Details)
pulkit updated this revision to Diff 20493.
mharbison72 accepted this revision.Mar 5 2020, 7:06 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.