From 487621360ca343f2fe683cb9f3c9269a33eadb8e Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 23 May 2013 02:55:28 -0400 Subject: [PATCH] bug fix: --- README.md | 2 ++ doc/bitbucket.go | 2 ++ doc/github.go | 4 +++- doc/google.go | 3 +++ doc/launchpad.go | 1 + docs/Quick_Start.md | 2 +- 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 35c3b7ed0..bebfc8d3c 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,8 @@ This application still in experiment, any change could happen, but it doesn't af - Command `install` and `remove` and `update` backup data(up to 100 records) before executing. - Command `rollback` is for rolling back to certain operation. - Add configure option for auto-enable feature, like always using `-p` for downloading. +- Command `install` add flag `-all` for re-installing everything in GOPATH, usually use this after upgrading Go version. +- Command `clean` is for cleaning empty directories. ## License diff --git a/doc/bitbucket.go b/doc/bitbucket.go index 6aea175c2..c90b02446 100644 --- a/doc/bitbucket.go +++ b/doc/bitbucket.go @@ -61,6 +61,8 @@ func GetBitbucketDoc(client *http.Client, match map[string]string, installGOPATH if err != nil { return nil, err } + node.Type = "commit" + node.Value = match["commit"] } else { match["commit"] = node.Value } diff --git a/doc/github.go b/doc/github.go index 1bd05837e..5af666d8f 100644 --- a/doc/github.go +++ b/doc/github.go @@ -27,7 +27,9 @@ var ( }*/ func SetGithubCredentials(token string) { - githubCred = "access_token=" + token + if len(token) > 0 { + githubCred = "access_token=" + token + } } // GetGithubDoc downloads tarball from github.com. diff --git a/doc/google.go b/doc/google.go index aa60895fe..1aeedf930 100644 --- a/doc/google.go +++ b/doc/google.go @@ -76,6 +76,9 @@ func GetGoogleDoc(client *http.Client, match map[string]string, installGOPATH st if m := googleRevisionRe.FindSubmatch(p); m == nil { return nil, errors.New("doc.GetGoogleDoc(): Could not find revision for " + match["importPath"]) + } else { + node.Type = "commit" + node.Value = string(m[1]) } projectPath := expand("code.google.com/p/{repo}{dot}{subrepo}{dir}", match) diff --git a/doc/launchpad.go b/doc/launchpad.go index ecca7da9e..8dc8d7eda 100644 --- a/doc/launchpad.go +++ b/doc/launchpad.go @@ -44,6 +44,7 @@ func GetLaunchpadDoc(client *http.Client, match map[string]string, installGOPATH // Check if download with specific revision. if isCheckImport || len(node.Value) == 1 { downloadPath = expand("https://bazaar.launchpad.net/+branch/{repo}/tarball", match) + node.Type = "commit" } else { downloadPath = expand("https://bazaar.launchpad.net/+branch/{repo}/tarball/"+node.Value, match) } diff --git a/docs/Quick_Start.md b/docs/Quick_Start.md index ac3a796fb..2c94ed118 100644 --- a/docs/Quick_Start.md +++ b/docs/Quick_Start.md @@ -47,7 +47,7 @@ Because we don't have all kinds of operating systems, we need your help to compl - windows_386: - windows_amd64: [gpm0.1.5 Build 0523](https://docs.google.com/file/d/0B2GBHFyTK2N8Y241eUlKd01Ia1U/edit?usp=sharing) -**Attention** Because we use API to get information of packages that are hosted on github.com, but it limits 60 requests per hour, so you may get errors if you download too much(more than 50 packages per hour). We do not provider access token for secure reason, but we do have configure option `github_access_token` in configuration file `conf/gpm.toml`, so you can go to [here](https://github.com/settings/applications) and create your personal access token, and set it in `gpm.toml`. +**Attention** Because we use API to get information of packages that are hosted on github.com, but it limits 60 requests per hour, so you may get errors if you download too much(more than 50 packages per hour). We do not provider access token for security reason, but we do have configure option `github_access_token` in configuration file `conf/gpm.toml`, so you can go to [here](https://github.com/settings/applications) and create your personal access token, and set it in `gpm.toml`. ## Build your first project