~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to utilities/make-dummy-hosted-branches

  • Committer: jml at canonical
  • Date: 2007-10-09 10:04:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5017.
  • Revision ID: jml@canonical.com-20071009100410-0ddv0572kpmvwhw8
Add make-dummy-hosted-branches as a target to branches, remove branch dir
before create dummy branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
import _pythonpath
5
5
 
 
6
import os
 
7
import shutil
6
8
import sys
7
9
 
8
 
from bzrlib import config
 
10
from bzrlib.config import GlobalConfig
9
11
 
10
12
from zope.component import getUtility
11
13
 
12
14
from canonical.codehosting.tests.helpers import make_bazaar_branch_and_tree
 
15
from canonical.config import config
13
16
from canonical.database.sqlbase import sqlvalues
14
17
from canonical.launchpad.database import Branch
15
18
from canonical.launchpad.interfaces import BranchType
18
21
 
19
22
 
20
23
def main(argv):
 
24
    if os.path.exists(config.codehosting.branches_root):
 
25
        shutil.rmtree(config.codehosting.branches_root)
21
26
    execute_zcml_for_scripts()
22
27
    ztm = initZopeless()
23
 
    conf = config.GlobalConfig()
 
28
    conf = GlobalConfig()
24
29
    signing_policy = conf.get_user_option('create_signatures')
25
30
    conf.set_user_option('create_signatures', 'never')
26
31
    try: