allura
Revision | 5dafae54af0f7e44ba5862e2146b4067fb9c0339 (tree) |
---|---|
Time | 2012-07-13 01:23:06 |
Author | Tim Van Steenburgh <tvansteenburgh@gmai...> |
Commiter | Cory Johns |
[#4523] Make sure LastCommitDocs get set properly for forks.
Signed-off-by: Tim Van Steenburgh <tvansteenburgh@gmail.com>
@@ -67,7 +67,10 @@ def refresh_repo(repo, all_commits=False, notify=True): | ||
67 | 67 | |
68 | 68 | # Compute diffs |
69 | 69 | cache = {} |
70 | - for i, oid in enumerate(reversed(commit_ids)): | |
70 | + # Have to compute_diffs() for all commits to ensure that LastCommitDocs | |
71 | + # are set properly for forked repos. For SVN, compute_diffs() will return | |
72 | + # immediately, so no real work is done. | |
73 | + for i, oid in enumerate(reversed(all_commit_ids)): | |
71 | 74 | ci = CommitDoc.m.find(dict(_id=oid), validate=False).next() |
72 | 75 | compute_diffs(repo._id, cache, ci) |
73 | 76 | if (i+1) % 100 == 0: |