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/02/26 01:05:11 UTC

[3/4] 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/ab969be2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ab969be2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ab969be2

Branch: refs/heads/cj/5788
Commit: ab969be263f57d731134dc55d4204faeddd3990b
Parents: 5b62eac
Author: Cory Johns <jo...@geek.net>
Authored: Mon Feb 25 23:59:46 2013 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Mon Feb 25 23:59:46 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/ab969be2/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):