|
a/Allura/allura/tasks/repo_tasks.py |
|
b/Allura/allura/tasks/repo_tasks.py |
|
... |
|
... |
29 |
c.user, c.app.repo, 'created',
|
29 |
c.user, c.app.repo, 'created',
|
30 |
text='Repository %s/%s created' % (
|
30 |
text='Repository %s/%s created' % (
|
31 |
c.project.shortname, c.app.config.options.mount_point))
|
31 |
c.project.shortname, c.app.config.options.mount_point))
|
32 |
|
32 |
|
33 |
@task
|
33 |
@task
|
|
|
34 |
def reclone(*args, **kwargs):
|
|
|
35 |
from allura import model as M
|
|
|
36 |
from ming.orm import ThreadLocalORMSession
|
|
|
37 |
repo = c.app.repo
|
|
|
38 |
if repo is not None:
|
|
|
39 |
shutil.rmtree(repo.full_fs_path, ignore_errors=True)
|
|
|
40 |
repo.delete()
|
|
|
41 |
ThreadLocalORMSession.flush_all()
|
|
|
42 |
M.MergeRequest.query.remove(dict(
|
|
|
43 |
app_config_id=c.app.config._id))
|
|
|
44 |
clone(*args, **kwargs)
|
|
|
45 |
|
|
|
46 |
@task
|
34 |
def refresh(**kwargs):
|
47 |
def refresh(**kwargs):
|
35 |
c.app.repo.refresh()
|
48 |
c.app.repo.refresh()
|
36 |
|
49 |
|
37 |
@task
|
50 |
@task
|
38 |
def uninstall(**kwargs):
|
51 |
def uninstall(**kwargs):
|