diff options
Diffstat (limited to 'doPatchsets.go')
| -rw-r--r-- | doPatchsets.go | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/doPatchsets.go b/doPatchsets.go index 90d11c6..7a22c0a 100644 --- a/doPatchsets.go +++ b/doPatchsets.go @@ -206,39 +206,6 @@ func lookupRepos(msg []byte) (*gitpb.Repos, error) { return newpb, nil } -/* save the git.pb files -+ if repo.Namespace == "" { -+ log.Infof("repo: ERROR. no namespace. %s\n", repo.FullPath) -+ continue -+ } -+ -+ repopath := filepath.Join("/home/forge", repo.Namespace) -+ if !shell.IsDir(repopath) { -+ if err := os.MkdirAll(repopath, os.ModePerm); err != nil { -+ log.Warn("mkdir fail", repo.Namespace, err) -+ continue -+ } -+ } -+ -+ filename := filepath.Join(repopath, "git.pb") -+ if !shell.Exists(filename) { -+ data, err := repo.Marshal() -+ if err != nil { -+ log.Info("patchsets.Marshal() to wire failed", err) -+ continue -+ } -+ gitpbf, err := os.OpenFile(filename, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0666) -+ defer gitpbf.Close() -+ if err != nil { -+ log.Info("filename open error:", filename, err) -+ continue -+ } -+ gitpbf.Write(data) -+ } -+ -+ log.Infof("repo path: %s\n", repopath) -*/ - func updateRepos(msg []byte) (*gitpb.Repos, error) { log.Info("proto.Unmarshal() try message len", len(msg)) m := gitpb.NewRepos() |
