~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/code-import-worker.py

  • Committer: Michael Hudson
  • Date: 2009-03-26 23:38:33 UTC
  • mto: (9905.7.1 hg-imports)
  • mto: This revision was merged to the branch mainline in revision 9938.
  • Revision ID: michael.hudson@canonical.com-20090326233833-n43ht5o32dtwow3y
small refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
from canonical.codehosting import load_optional_plugin
22
22
from canonical.codehosting.codeimport.worker import (
23
 
    CSCVSImportWorker, CodeImportSourceDetails, PullingImportWorker,
 
23
    CSCVSImportWorker, CodeImportSourceDetails, GitImportWorker,
24
24
    get_default_bazaar_branch_store, get_default_foreign_tree_store)
25
25
from canonical.launchpad import scripts
26
26
 
38
38
        source_details = CodeImportSourceDetails.fromArguments(self.args)
39
39
        if source_details.rcstype == 'git':
40
40
            load_optional_plugin('git')
41
 
            import_worker = PullingImportWorker(
 
41
            import_worker = GitImportWorker(
 
42
                source_details, get_default_bazaar_branch_store(),
 
43
                self.logger)
 
44
        elif source_details.rcstype == 'bzr-svn':
 
45
            load_optional_plugin('svn')
 
46
            import_worker = BzrSvnImportWorker(
42
47
                source_details, get_default_bazaar_branch_store(),
43
48
                self.logger)
44
49
        else: