|
a/Allura/allura/model/repo_refresh.py |
|
b/Allura/allura/model/repo_refresh.py |
|
... |
|
... |
307 |
last_commit_collection = LastCommitDoc.m.session.db[
|
307 |
last_commit_collection = LastCommitDoc.m.session.db[
|
308 |
LastCommitDoc.m.collection_name]
|
308 |
LastCommitDoc.m.collection_name]
|
309 |
last_commits = set(
|
309 |
last_commits = set(
|
310 |
d['object_id']
|
310 |
d['object_id']
|
311 |
for d in last_commit_collection.find(
|
311 |
for d in last_commit_collection.find(
|
312 |
dict(repo_id=repo_id, object_id={'$in': rhs_tree_ids}),
|
312 |
dict(object_id={'$in': rhs_tree_ids}),
|
313 |
{ 'object_id': 1, '_id': 0 }))
|
313 |
{ 'object_id': 1, '_id': 0 }))
|
314 |
for tree_id in rhs_tree_ids:
|
314 |
for tree_id in rhs_tree_ids:
|
315 |
if tree_id not in last_commits:
|
315 |
if tree_id not in last_commits:
|
316 |
set_last_commit(repo_id, tree_id, commit_info)
|
316 |
set_last_commit(repo_id, tree_id, commit_info)
|
317 |
# Build the diffinfo
|
317 |
# Build the diffinfo
|
|
... |
|
... |
322 |
return tree_cache
|
322 |
return tree_cache
|
323 |
|
323 |
|
324 |
def send_notifications(repo, commit_ids):
|
324 |
def send_notifications(repo, commit_ids):
|
325 |
'''Create appropriate notification and feed objects for a refresh'''
|
325 |
'''Create appropriate notification and feed objects for a refresh'''
|
326 |
from allura.model import Feed, Notification
|
326 |
from allura.model import Feed, Notification
|
327 |
from allura.model.repository import config
|
|
|
328 |
commit_msgs = []
|
327 |
commit_msgs = []
|
329 |
base_url = tg.config.get('base_url', 'sourceforge.net')
|
328 |
base_url = tg.config.get('base_url', 'sourceforge.net')
|
330 |
for oids in utils.chunked_iter(commit_ids, QSIZE):
|
329 |
for oids in utils.chunked_iter(commit_ids, QSIZE):
|
331 |
chunk = list(oids)
|
330 |
chunk = list(oids)
|
332 |
index = dict(
|
331 |
index = dict(
|