Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 982C5FB3C for ; Mon, 8 Apr 2013 15:19:06 +0000 (UTC) Received: (qmail 30384 invoked by uid 500); 8 Apr 2013 15:19:06 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 30348 invoked by uid 500); 8 Apr 2013 15:19:06 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 30151 invoked by uid 99); 8 Apr 2013 15:19:05 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Apr 2013 15:19:05 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 67C6650DF4; Mon, 8 Apr 2013 15:19:04 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: allura-commits@incubator.apache.org Date: Mon, 08 Apr 2013 15:19:44 -0000 Message-Id: <2270fa1ddf6a4b93838a22e4815e4228@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [43/50] [abbrv] git commit: [#5453] only count commits for incremental commits, not full refreshes [#5453] only count commits for incremental commits, not full refreshes Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e81542a2 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e81542a2 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e81542a2 Branch: refs/heads/db/6007 Commit: e81542a2cd132895e549019e1f517f7d0111b4ac Parents: 2e6c61f Author: Dave Brondsema Authored: Wed Mar 27 21:04:59 2013 +0000 Committer: Dave Brondsema Committed: Thu Apr 4 18:37:38 2013 +0000 ---------------------------------------------------------------------- Allura/allura/model/repo_refresh.py | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e81542a2/Allura/allura/model/repo_refresh.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py index 799d3cc..d06e879 100644 --- a/Allura/allura/model/repo_refresh.py +++ b/Allura/allura/model/repo_refresh.py @@ -112,13 +112,14 @@ def refresh_repo(repo, all_commits=False, notify=True, new_clone=False): if (i+1) % 100 == 0: log.info('Compute last commit info %d: %s', (i+1), ci._id) - for commit in commit_ids: - new = repo.commit(commit) - user = User.by_email_address(new.committed.email) - if user is None: - user = User.by_username(new.committed.name) - if user is not None: - g.statsUpdater.newCommit(new, repo.app_config.project, user) + if not all_commits: + for commit in commit_ids: + new = repo.commit(commit) + user = User.by_email_address(new.committed.email) + if user is None: + user = User.by_username(new.committed.name) + if user is not None: + g.statsUpdater.newCommit(new, repo.app_config.project, user) log.info('Refresh complete for %s', repo.full_fs_path) g.post_event('repo_refreshed', len(commit_ids), all_commits, new_clone)