You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/03/01 21:08:00 UTC

[6/26] git commit: [#5788] Fixed broken --clean option for RefreshLastCommits

[#5788] Fixed broken --clean option for RefreshLastCommits

Signed-off-by: Cory Johns <jo...@geek.net>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/4c623e66
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/4c623e66
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/4c623e66

Branch: refs/heads/cj/5854
Commit: 4c623e66d6de0465cdd0ca678403f17b80040018
Parents: 63f5acd
Author: Cory Johns <jo...@geek.net>
Authored: Mon Feb 25 23:59:46 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Thu Feb 28 21:48:32 2013 +0000

----------------------------------------------------------------------
 Allura/allura/scripts/refresh_last_commits.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/4c623e66/Allura/allura/scripts/refresh_last_commits.py
----------------------------------------------------------------------
diff --git a/Allura/allura/scripts/refresh_last_commits.py b/Allura/allura/scripts/refresh_last_commits.py
index ac924f3..4508039 100644
--- a/Allura/allura/scripts/refresh_last_commits.py
+++ b/Allura/allura/scripts/refresh_last_commits.py
@@ -152,14 +152,14 @@ class RefreshLastCommits(ScriptTask):
     def _clean(cls, commit_ids, clean_diffs):
         if clean_diffs:
             # delete DiffInfoDocs
-            i = M.repo.DiffInfoDoc.m.find(dict(commit_ids={'$in': commit_ids})).count()
+            i = M.repo.DiffInfoDoc.m.find(dict(_id={'$in': commit_ids})).count()
             log.info("Deleting %i DiffInfoDoc docs for %i commits...", i, len(commit_ids))
-            M.repo.LastCommitDoc.m.remove(dict(commit_ids={'$in': commit_ids}))
+            M.repo.DiffInfoDoc.m.remove(dict(_id={'$in': commit_ids}))
 
         # delete LastCommitDocs
-        i = M.repo.LastCommitDoc.m.find(dict(commit_ids={'$in': commit_ids})).count()
+        i = M.repo.LastCommitDoc.m.find(dict(commit_id={'$in': commit_ids})).count()
         log.info("Deleting %i LastCommitDoc docs for %i commits...", i, len(commit_ids))
-        M.repo.LastCommitDoc.m.remove(dict(commit_ids={'$in': commit_ids}))
+        M.repo.LastCommitDoc.m.remove(dict(commit_id={'$in': commit_ids}))
 
     @classmethod
     def _print_stats(cls, processed, timings, debug_step):