diff options
Diffstat (limited to 'doPull.go')
| -rw-r--r-- | doPull.go | 40 |
1 files changed, 21 insertions, 19 deletions
@@ -14,26 +14,28 @@ import ( // is every repo on the devel branch? func doPull() error { - if argv.Pull.Check != nil { - // stats := me.forge.RillFuncError(rillPull) - log.Info("TODO: actually git pull here? this is a bad idea. stopping.") - submit := gitpb.NewRepos() - for repo := range me.forge.Repos.IterByFullPath() { - newrepo := new(gitpb.Repo) - newrepo.MasterHash = repo.MasterHash - newrepo.DevelHash = repo.DevelHash - newrepo.Namespace = repo.Namespace - newrepo.URL = repo.URL - submit.Append(newrepo) - } - updatepb, regPB, err := submit.HttpPost(myServer(), "check") - if regPB == nil || err != nil { - log.Info("regPB==nil or err:", err) + /* + if argv.Pull.Check != nil { + // stats := me.forge.RillFuncError(rillPull) + log.Info("TODO: actually git pull here? this is a bad idea. stopping.") + submit := gitpb.NewRepos() + for repo := range me.forge.Repos.IterByFullPath() { + newrepo := new(gitpb.Repo) + newrepo.MasterHash = repo.MasterHash + newrepo.DevelHash = repo.DevelHash + newrepo.Namespace = repo.Namespace + newrepo.URL = repo.URL + submit.Append(newrepo) + } + updatepb, regPB, err := submit.HttpPost(myServer(), "check") + if regPB == nil || err != nil { + log.Info("regPB==nil or err:", err) + return nil + } + log.Infof("pull check %s pb.Len()=%d client.Len()=%d server.Len()=%d err=%v\n", regPB.URL, updatepb.Len(), regPB.ClientDataLen, regPB.ServerDataLen, err) return nil } - log.Infof("pull check %s pb.Len()=%d client.Len()=%d server.Len()=%d err=%v\n", regPB.URL, updatepb.Len(), regPB.ClientDataLen, regPB.ServerDataLen, err) - return nil - } + */ // below this, you must not be in 'normal' mode if me.forge.Config.Mode == forgepb.ForgeMode_NORMAL { @@ -41,7 +43,7 @@ func doPull() error { return nil } - if argv.Force == true { + if argv.Pull.Force { now := time.Now() stats := me.forge.RillFuncError(rillPull) count := me.forge.RillReload() |
