From 8aec5e16c4cb7fb045088b04781ef307558a33c3 Mon Sep 17 00:00:00 2001 From: Unknown Date: Mon, 24 Mar 2014 09:32:24 -0400 Subject: Locating issue of git push not update repo last updated time --- models/action.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'models') diff --git a/models/action.go b/models/action.go index 9471e9810e..44d7aea8ca 100644 --- a/models/action.go +++ b/models/action.go @@ -59,14 +59,18 @@ func (a Action) GetContent() string { // CommitRepoAction records action for commit repository. func CommitRepoAction(userId int64, userName string, repoId int64, repoName string, refName string, commits *base.PushCommits) error { + log.Trace("action.CommitRepoAction: %d/%s", userId, repoName) + bs, err := json.Marshal(commits) if err != nil { + log.Error("action.CommitRepoAction(json): %d/%s", userId, repoName) return err } // Add feeds for user self and all watchers. watches, err := GetWatches(repoId) if err != nil { + log.Error("action.CommitRepoAction(get watches): %d/%s", userId, repoName) return err } watches = append(watches, Watch{UserId: userId}) @@ -86,22 +90,23 @@ func CommitRepoAction(userId int64, userName string, RepoName: repoName, RefName: refName, }) + if err != nil { + log.Error("action.CommitRepoAction(notify watches): %d/%s", userId, repoName) + } return err } // Update repository last update time. repo, err := GetRepositoryByName(userId, repoName) if err != nil { - log.Error("action.CommitRepoAction(GetRepositoryByName): %d/%s", userId, repo.LowerName) + log.Error("action.CommitRepoAction(GetRepositoryByName): %d/%s", userId, repoName) return err } repo.IsBare = false if err = UpdateRepository(repo); err != nil { - log.Error("action.CommitRepoAction(UpdateRepository): %d/%s", userId, repo.LowerName) + log.Error("action.CommitRepoAction(UpdateRepository): %d/%s", userId, repoName) return err } - - log.Trace("action.CommitRepoAction: %d/%s", userId, repo.LowerName) return nil } -- cgit v1.2.3