From: Andrew Gerrand Date: Thu, 2 Feb 2012 19:25:13 +0000 (-0500) Subject: codereview: don't check default paths when codereview disabled X-Git-Tag: weekly.2012-02-07~126 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e10150f96d9d7dd8f3ab45a04288a75dc1f3c218;p=gostls13.git codereview: don't check default paths when codereview disabled R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5622043 --- diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 56ccb508db..fd0b4b4aea 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -2187,10 +2187,6 @@ def reposetup(ui, repo): if codereview_init: return codereview_init = True - - remote = ui.config("paths", "default", "") - if remote.find("://") < 0: - raise hg_util.Abort("codereview: default path '%s' is not a URL" % (remote,)) # Read repository-specific options from lib/codereview/codereview.cfg or codereview.cfg. root = '' @@ -2200,7 +2196,7 @@ def reposetup(ui, repo): # Yes, repo might not have root; see issue 959. codereview_disabled = 'codereview disabled: repository has no root' return - + repo_config_path = '' p1 = root + '/lib/codereview/codereview.cfg' p2 = root + '/codereview.cfg' @@ -2220,6 +2216,10 @@ def reposetup(ui, repo): codereview_disabled = 'codereview disabled: cannot open ' + repo_config_path return + remote = ui.config("paths", "default", "") + if remote.find("://") < 0: + raise hg_util.Abort("codereview: default path '%s' is not a URL" % (remote,)) + InstallMatch(ui, repo) RietveldSetup(ui, repo)