}
// Scrape result for vcs details.
- m := googleRepoRe.FindSubmatch(b)
- if len(m) == 2 {
- if v := vcsMap[string(m[1])]; v != nil {
+ if m := googleRepoRe.FindSubmatch(b); len(m) == 2 {
+ s := string(m[1])
+ if v := vcsMap[s]; v != nil {
+ if s == "svn" {
+ // Subversion still uses the old-style URL.
+ r.url = fmt.Sprintf("http://%s.googlecode.com/svn", p[0])
+ }
r.vcs = v
return r.url, r.root, r.vcs, nil
}
"code.google.com/p/repo/path/foo",
"svn",
"code.google.com/p/repo",
- "https://code.google.com/p/repo",
+ "https://repo.googlecode.com/svn",
&testTransport{
"https://code.google.com/p/repo/source/checkout",
`<tt id="checkoutcmd">svn checkout https://...`,