Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
88e365ce
Commit
88e365ce
authored
Nov 07, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make temporary google.com -> golang.org hack more sophisticated
R=r
http://go/go-review/1024013
parent
0eb2a79f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
codereview.py
lib/codereview/codereview.py
+8
-8
No files found.
lib/codereview/codereview.py
View file @
88e365ce
...
...
@@ -912,7 +912,7 @@ def CheckContributor(ui, repo, user=None):
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
)
_
,
userline
=
FindContributor
(
ui
,
repo
,
user
,
warn
=
False
)
if
not
userline
:
raise
util
.
Abort
(
"cannot find
%
s in CONTRIBUTORS"
%
(
user
,))
return
userline
...
...
@@ -926,16 +926,14 @@ def FindContributor(ui, repo, user, warn=True):
line
=
line
.
rstrip
()
if
line
.
startswith
(
'#'
):
continue
if
line
==
user
:
return
line
match
=
re
.
match
(
r"(.*) <(.*)>"
,
line
)
if
not
match
:
continue
if
match
.
group
(
2
)
==
user
:
return
line
if
line
==
user
or
match
.
group
(
2
)
==
user
:
return
match
.
group
(
2
),
line
if
warn
:
ui
.
warn
(
"warning: cannot find
%
s in CONTRIBUTORS
\n
"
%
(
user
,))
return
None
return
None
,
None
def
submit
(
ui
,
repo
,
*
pats
,
**
opts
):
"""submit change to remote repository
...
...
@@ -1320,8 +1318,10 @@ def DownloadCL(ui, repo, clname):
email
=
match
.
group
(
1
)
# Temporary hack until we move to the public code review server.
email
=
re
.
sub
(
"@google.com$"
,
"@golang.org"
,
email
)
email1
,
_
=
FindContributor
(
ui
,
repo
,
email
,
warn
=
False
)
if
email1
==
""
:
email
=
re
.
sub
(
"@google.com$"
,
"@golang.org"
,
email
)
# Print warning if email is not in CONTRIBUTORS file.
FindContributor
(
ui
,
repo
,
email
)
cl
.
original_author
=
email
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment