~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bundle/commands.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-11 09:26:57 UTC
  • mfrom: (1996.3.37 use_lazy_importer)
  • Revision ID: pqm@pqm.ubuntu.com-20061011092657-e42bec6ef14c036c
(John Arbash Meinel) use lazy importing to improve startup time

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
import sys
10
10
 
11
 
from bzrlib.branch import Branch
12
 
from bzrlib.commands import Command, register_command
13
 
import bzrlib.errors as errors
 
11
from bzrlib.lazy_import import lazy_import
 
12
lazy_import(globals(), """
 
13
from bzrlib import (
 
14
    branch,
 
15
    errors,
 
16
    urlutils,
 
17
    )
 
18
from bzrlib.revision import common_ancestor
 
19
""")
 
20
 
 
21
from bzrlib.commands import Command
14
22
from bzrlib.option import Option
15
 
from bzrlib.revision import (common_ancestor, MultipleRevisionSources,
16
 
                             NULL_REVISION)
17
23
from bzrlib.trace import note
18
 
from bzrlib import urlutils
19
24
 
20
25
 
21
26
class cmd_send_changeset(Command):
43
48
                raise BzrCommandError('We do not support rollup-changesets yet.')
44
49
            revision = revision[0]
45
50
 
46
 
        b = Branch.open_containing('.')
 
51
        b = branch.Branch.open_containing('.')
47
52
 
48
53
        if not to:
49
54
            try:
84
89
        from bzrlib import user_encoding
85
90
        from bzrlib.bundle.serializer import write_bundle
86
91
 
87
 
        target_branch = Branch.open_containing(u'.')[0]
 
92
        target_branch = branch.Branch.open_containing(u'.')[0]
88
93
 
89
94
        if base is None:
90
95
            base_specified = False
118
123
                # we must format with 'ascii' to be safe
119
124
                note('Using saved location: %s',
120
125
                     urlutils.unescape_for_display(base, 'ascii'))
121
 
            base_branch = Branch.open(base)
 
126
            base_branch = branch.Branch.open(base)
122
127
 
123
128
            # We don't want to lock the same branch across
124
129
            # 2 different branches
159
164
        from read_changeset import read_changeset
160
165
        #from bzrlib.xml import serializer_v4
161
166
 
162
 
        b, relpath = Branch.open_containing('.')
 
167
        b, relpath = branch.Branch.open_containing('.')
163
168
 
164
169
        if filename is None or filename == '-':
165
170
            f = sys.stdin