mirror of
https://github.com/golang/go
synced 2024-11-25 10:17:57 -07:00
codereview: add submit message support for newer clone URL and subrepos
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5689063
This commit is contained in:
parent
e5013e89f1
commit
d86213c371
@ -1949,9 +1949,17 @@ def submit(ui, repo, *pats, **opts):
|
|||||||
# We're committed. Upload final patch, close review, add commit message.
|
# We're committed. Upload final patch, close review, add commit message.
|
||||||
changeURL = hg_node.short(node)
|
changeURL = hg_node.short(node)
|
||||||
url = ui.expandpath("default")
|
url = ui.expandpath("default")
|
||||||
m = re.match("^https?://([^@/]+@)?([^.]+)\.googlecode\.com/hg/?", url)
|
m = re.match("(^https?://([^@/]+@)?([^.]+)\.googlecode\.com/hg/?)" + "|" +
|
||||||
|
"(^https?://([^@/]+@)?code\.google\.com/p/([^/.]+)(\.[^./]+)?/?)", url)
|
||||||
if m:
|
if m:
|
||||||
changeURL = "http://code.google.com/p/%s/source/detail?r=%s" % (m.group(2), changeURL)
|
if m.group(1): # prj.googlecode.com/hg/ case
|
||||||
|
changeURL = "http://code.google.com/p/%s/source/detail?r=%s" % (m.group(3), changeURL)
|
||||||
|
elif m.group(4) and m.group(7): # code.google.com/p/prj.subrepo/ case
|
||||||
|
changeURL = "http://code.google.com/p/%s/source/detail?r=%s&repo=%s" % (m.group(6), changeURL, m.group(7)[1:])
|
||||||
|
elif m.group(4): # code.google.com/p/prj/ case
|
||||||
|
changeURL = "http://code.google.com/p/%s/source/detail?r=%s" % (m.group(6), changeURL)
|
||||||
|
else:
|
||||||
|
print >>sys.stderr, "URL: ", url
|
||||||
else:
|
else:
|
||||||
print >>sys.stderr, "URL: ", url
|
print >>sys.stderr, "URL: ", url
|
||||||
pmsg = "*** Submitted as " + changeURL + " ***\n\n" + message
|
pmsg = "*** Submitted as " + changeURL + " ***\n\n" + message
|
||||||
|
Loading…
Reference in New Issue
Block a user