diff options
| -rw-r--r-- | argv.go | 7 | ||||
| -rw-r--r-- | doPull.go | 38 |
2 files changed, 21 insertions, 24 deletions
@@ -114,10 +114,9 @@ type SubmitCmd struct { } type PullCmd struct { - Force bool `arg:"--force" help:"try to strong-arm things"` - List *EmptyCmd `arg:"subcommand:list" help:"list repo versions"` - // Dirty *EmptyCmd `arg:"subcommand:dirty" help:"only check dirty repos"` - // Patches *EmptyCmd `arg:"subcommand:patches" help:"only check repos with patches"` + Force bool `arg:"--force" help:"try to strong-arm things"` + List *EmptyCmd `arg:"subcommand:list" help:"list repo versions"` + Check *EmptyCmd `arg:"subcommand:check" help:"check for repo changes"` } type TagCmd struct { @@ -14,28 +14,26 @@ 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) - 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) + 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 + } if argv.Pull.List != nil { found := gitpb.NewRepos() var count int |
