mirror of
https://github.com/golang/go
synced 2024-11-22 00:24:41 -07:00
codereview: fix clpatch
I love Python. Write once, crash anywhere. TBR=r CC=golang-dev https://golang.org/cl/4382043
This commit is contained in:
parent
710028d3a4
commit
88bbf4f1df
@ -1333,16 +1333,16 @@ def reposetup(ui, repo):
|
||||
|
||||
def CheckContributor(ui, repo, user=None):
|
||||
set_status("checking CONTRIBUTORS file")
|
||||
if not user:
|
||||
user = ui.config("ui", "username")
|
||||
if not user:
|
||||
raise util.Abort("[ui] username is not configured in .hgrc")
|
||||
_, userline = FindContributor(ui, repo, user, warn=False)
|
||||
if not userline:
|
||||
raise util.Abort("cannot find %s in CONTRIBUTORS" % (user,))
|
||||
return userline
|
||||
|
||||
def FindContributor(ui, repo, user, warn=True):
|
||||
def FindContributor(ui, repo, user=None, warn=True):
|
||||
if not user:
|
||||
user = ui.config("ui", "username")
|
||||
if not user:
|
||||
raise util.Abort("[ui] username is not configured in .hgrc")
|
||||
user = user.lower()
|
||||
m = re.match(r".*<(.*)>", user)
|
||||
if m:
|
||||
|
Loading…
Reference in New Issue
Block a user