Parent: [3f60d2] (diff)

Child: [ddf08c] (diff)

Download this file

test-light.py    31 lines (24 with data), 904 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import sys
from pylons import tmpl_context as c
from allura.lib import helpers as h
from allura.model.repo import CommitDoc, TreeDoc, TreesDoc, DiffInfoDoc
from allura.model.repo import LastCommitDoc, CommitRunDoc
from allura.model.repo_refresh import refresh_repo
def main():
if len(sys.argv) > 1:
h.set_context('test')
c.project.install_app('Git', 'code', 'Code', init_from_url='/home/rick446/src/forge')
c.project.install_app('Hg', 'code2', 'Code2', init_from_url='/home/rick446/src/Kajiki')
CommitDoc.m.remove({})
TreeDoc.m.remove({})
TreesDoc.m.remove({})
DiffInfoDoc.m.remove({})
LastCommitDoc.m.remove({})
CommitRunDoc.m.remove({})
h.set_context('test', 'code')
refresh_repo(c.app.repo, notify=False)
h.set_context('test', 'code2')
refresh_repo(c.app.repo, notify=False)
if __name__ == '__main__':
main()
# dolog()