Switch to unified view

a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
...
...
98
                    _id=bson.ObjectId(),
98
                    _id=bson.ObjectId(),
99
                    ref_id=index_id,
99
                    ref_id=index_id,
100
                    project_id=repo.app.config.project_id,
100
                    project_id=repo.app.config.project_id,
101
                    app_config_id=repo.app.config._id,
101
                    app_config_id=repo.app.config._id,
102
                    link=repo.shorthand_for_commit(oid)[1:-1],
102
                    link=repo.shorthand_for_commit(oid)[1:-1],
103
                    url=repo.url() + 'ci/' + oid + '/'))
103
                    url=repo.url_for_commit(oid)))
104
            # Always create a link for the full commit ID
104
            # Always create a link for the full commit ID
105
            link1 = ShortlinkDoc(dict(
105
            link1 = ShortlinkDoc(dict(
106
                    _id=bson.ObjectId(),
106
                    _id=bson.ObjectId(),
107
                    ref_id=index_id,
107
                    ref_id=index_id,
108
                    project_id=repo.app.config.project_id,
108
                    project_id=repo.app.config.project_id,
109
                    app_config_id=repo.app.config._id,
109
                    app_config_id=repo.app.config._id,
110
                    link=oid,
110
                    link=oid,
111
                    url=repo.url() + 'ci/' + oid + '/'))
111
                    url=repo.url_for_commit(oid)))
112
            ci.m.save(safe=False, validate=False)
112
            ci.m.save(safe=False, validate=False)
113
            ref.m.save(safe=False, validate=False)
113
            ref.m.save(safe=False, validate=False)
114
            link0.m.save(safe=False, validate=False)
114
            link0.m.save(safe=False, validate=False)
115
            link1.m.save(safe=False, validate=False)
115
            link1.m.save(safe=False, validate=False)
116
116
...
...
290
        index = dict(
290
        index = dict(
291
            (doc._id, doc)
291
            (doc._id, doc)
292
            for doc in Commit.query.find(dict(_id={'$in':chunk})))
292
            for doc in Commit.query.find(dict(_id={'$in':chunk})))
293
        for oid in chunk:
293
        for oid in chunk:
294
            ci = index[oid]
294
            ci = index[oid]
295
            href = '%s%sci/%s/' % (
295
            href = repo.url_for_commit(oid)
296
                config.common_prefix,
297
                repo.url(),
298
                oid)
299
            summary = _summarize(ci.message)
296
            summary = _summarize(ci.message)
300
            item = Feed.post(
297
            item = Feed.post(
301
                repo, title='New commit',
298
                repo, title='New commit',
302
                description='%s<br><a href="%s/">View Changes</a>' % (
299
                description='%s<br><a href="%s">View Changes</a>' % (
303
                    summary, href))
300
                    summary, href))
304
            item.author_link = ci.author_url
301
            item.author_link = ci.author_url
305
            item.author_name = ci.authored.name
302
            item.author_name = ci.authored.name
306
            commit_msgs.append('%s by %s <%s>' % (
303
            commit_msgs.append('%s by %s <%s>' % (
307
                    summary, ci.authored.name, href))
304
                    summary, ci.authored.name, href))