Comment 9 for bug 1090118

Revision history for this message
Jeremy Stanley (fungi) wrote : Re: Problems encountered installing commit-msg hook

I didn't mean to imply that checking out the repo with -o (so that you can use a name other than "origin") was a bad idea. Mediawiki's Gerrit admins might suggest this so that they don't have to help users troubleshoot separate origin fetch problems, or because they might have branches for some projects which aren't updated on their Web mirrors in real time. The problem here is that git-review very much intends to use the "gerrit" remote from your local git configuration so that it can decide how to reach your Gerrit server's SSH interface to push changes. If you set it to an HTTP-based mirror of the repo, that likely won't be possible regardless.

As for the port=="None" thing... it appears you're getting this because urlparse.urlparse() tries to break down your "https://gerrit.wikimedia.org/r/p/mediawiki/extensions/UploadWizard.git" URL into a host and port, but the port isn't mentioned in that URL so an object of type None is returned for the port instead. The conditional you're seeing (if parsed_url.scheme == "ssh" and port is None) doesn't even apply in this case because your parsed_url.scheme is "https" anyway. I don't really see a lot in the way of sane alternatives... we could add a separate scheme check for "https" and default the port to 443 (and that likely needs to be done at some point), but it seems unlikely you'd be able to push changes to that. I would suggest confirming with the Gerrit admins for Mediawiki whether that is a recommended configuration.

I'll go ahead and resurrect this bug as a wishlist request for supporting additional "gerrit" remote protocols besides SSH, but unless you can get confirmation there are Gerrit servers accepting changes via other protocols this will likely remain on the back burner.