Able to change mirror interval now

This commit is contained in:
Unknown 2014-04-12 22:30:00 -04:00
parent 52b4ab2aa5
commit c9a1eb4789
6 changed files with 60 additions and 6 deletions

View file

@ -62,6 +62,7 @@ type Context struct {
HTTPS string
Git string
}
*models.Mirror
}
}

View file

@ -102,9 +102,17 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
ctx.Repo.HasAccess = true
ctx.Data["HasAccess"] = true
if repo.IsMirror {
ctx.Repo.Mirror, err = models.GetMirror(repo.Id)
if err != nil {
ctx.Handle(500, "RepoAssignment(GetMirror)", err)
return
}
ctx.Data["MirrorInterval"] = ctx.Repo.Mirror.Interval
}
repo.NumOpenIssues = repo.NumIssues - repo.NumClosedIssues
ctx.Repo.Repository = repo
ctx.Data["IsBareRepo"] = ctx.Repo.Repository.IsBare
gitRepo, err := git.OpenRepository(models.RepoPath(userName, repoName))