diff options
Diffstat (limited to 'doPull.go')
| -rw-r--r-- | doPull.go | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -6,8 +6,7 @@ package main import ( "time" - "go.wit.com/lib/config" - "go.wit.com/lib/gui/shell" + "go.wit.com/lib/cobol" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -39,12 +38,12 @@ func needToUpdateRepo(repo *gitpb.Repo) (*gitpb.Repo, error) { if dur < time.Minute { return nil, nil } - log.Infof("checking for updates %s %s\n", shell.FormatDuration(dur), found.Namespace) + log.Infof("checking for updates %s %s\n", cobol.FormatDuration(dur), found.Namespace) /* dur := time.Since(repo.Tags.Master.Authordate.AsTime()) when := repo.Tags.Master.Creatordate.AsTime() dur = time.Since(when) - log.Infof("stuff %s age=%s %v\n", repo.Namespace, shell.FormatDuration(dur), when) + log.Infof("stuff %s age=%s %v\n", repo.Namespace, cobol.FormatDuration(dur), when) */ return found, nil } @@ -112,7 +111,7 @@ func doPull() error { r.State = "git pull failed" + repo.State dur := stat.End.Sub(stat.Start) if dur > 1*time.Second { - msg := log.Sprintf("pull time (%s)", config.FormatDuration(dur)) + msg := log.Sprintf("pull time (%s)", cobol.FormatDuration(dur)) r.State = msg + repo.State } } @@ -149,7 +148,7 @@ func rillPull(repo *gitpb.Repo) error { t, _ := repo.LastGitPull() if time.Since(t) < time.Minute*10 && !argv.Force { if argv.Verbose { - log.Info(repo.GetFullPath(), "git pulled too recently", shell.FormatDuration(time.Since(t))) + log.Info(repo.GetFullPath(), "git pulled too recently", cobol.FormatDuration(time.Since(t))) } return nil } |
