~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/codehosting/puller/worker.py

  • Committer: Curtis Hovey
  • Date: 2011-09-06 12:13:13 UTC
  • mfrom: (13883 devel)
  • mto: This revision was merged to the branch mainline in revision 13884.
  • Revision ID: curtis.hovey@canonical.com-20110906121313-2r9ep4ird8jw4nrl
Merged devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
1
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
2
2
# GNU Affero General Public License version 3 (see the file LICENSE).
3
3
 
4
4
__metaclass__ = type
8
8
import sys
9
9
import urllib2
10
10
 
 
11
import lp.codehosting # to load bzr plugins
 
12
 
11
13
from bzrlib import (
12
14
    errors,
13
15
    urlutils,
14
16
    )
15
 
from bzrlib.branch import (
16
 
    Branch,
17
 
    BzrBranchFormat4,
18
 
    )
19
 
from bzrlib.repofmt.weaverepo import (
 
17
from bzrlib.branch import Branch
 
18
from bzrlib.bzrdir import BzrDir
 
19
from bzrlib.plugins.loom.branch import LoomSupport
 
20
from bzrlib.plugins.weave_fmt.branch import BzrBranchFormat4
 
21
from bzrlib.plugins.weave_fmt.repository import (
20
22
    RepositoryFormat4,
21
23
    RepositoryFormat5,
22
24
    RepositoryFormat6,
23
25
    )
 
26
from bzrlib.transport import get_transport
24
27
import bzrlib.ui
25
 
from bzrlib.plugins.loom.branch import LoomSupport
26
 
from bzrlib.transport import get_transport
27
28
from bzrlib.ui import SilentUIFactory
28
29
from lazr.uri import (
29
30
    InvalidURIError,
77
78
        self.scheme = scheme
78
79
 
79
80
 
80
 
 
81
 
 
82
81
def get_canonical_url_for_branch_name(unique_name):
83
82
    """Custom implementation of canonical_url(branch) for error reporting.
84
83
 
214
213
        :return: The destination branch.
215
214
        """
216
215
        return self.opener.runWithTransformFallbackLocationHookInstalled(
217
 
            self.policy.createDestinationBranch, source_branch,
 
216
            BzrDir.open, self.policy.createDestinationBranch, source_branch,
218
217
            destination_url)
219
218
 
220
219
    def openDestinationBranch(self, source_branch, destination_url):