go.tools/go/vcs: support cloned repos in code.google.com
R=golang-dev, bradfitz, dsymonds CC=golang-dev https://golang.org/cl/13241047
This commit is contained in:
parent
1d214a6a09
commit
b38e3512f0
|
|
@ -585,7 +585,7 @@ var vcsPaths = []*vcsPath{
|
|||
// Google Code - new syntax
|
||||
{
|
||||
prefix: "code.google.com/",
|
||||
re: `^(?P<root>code\.google\.com/p/(?P<project>[a-z0-9\-]+)(\.(?P<subrepo>[a-z0-9\-]+))?)(/[A-Za-z0-9_.\-]+)*$`,
|
||||
re: `^(?P<root>code\.google\.com/(?:p|r)/(?P<project>[a-z0-9\-]+)(\.(?P<subrepo>[a-z0-9\-]+))?)(/[A-Za-z0-9_.\-]+)*$`,
|
||||
repo: "https://{root}",
|
||||
check: googleCodeVCS,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,6 +25,13 @@ func TestRepoRootForImportPath(t *testing.T) {
|
|||
Repo: "https://code.google.com/p/go",
|
||||
},
|
||||
},
|
||||
{
|
||||
"code.google.com/r/go",
|
||||
&RepoRoot{
|
||||
VCS: vcsHg,
|
||||
Repo: "https://code.google.com/r/go",
|
||||
},
|
||||
},
|
||||
{
|
||||
"github.com/golang/groupcache",
|
||||
&RepoRoot{
|
||||
|
|
|
|||
Loading…
Reference in New Issue