summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go7
-rw-r--r--doPull.go38
2 files changed, 21 insertions, 24 deletions
diff --git a/argv.go b/argv.go
index 8d52d49..524c91f 100644
--- a/argv.go
+++ b/argv.go
@@ -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 {
diff --git a/doPull.go b/doPull.go
index 2ed67a1..e4e248d 100644
--- a/doPull.go
+++ b/doPull.go
@@ -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