/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/commands.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-14 17:59:16 UTC
  • mto: This revision was merged to the branch mainline in revision 7065.
  • Revision ID: jelmer@jelmer.uk-20180614175916-a2e2xh5k533guq1x
Move breezy.plugins.git to breezy.git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from __future__ import absolute_import
25
25
 
26
26
import breezy.bzr.bzrdir
27
 
from ...commands import (
 
27
from ..commands import (
28
28
    Command,
29
29
    display_command,
30
30
    )
31
 
from ...option import (
 
31
from ..option import (
32
32
    Option,
33
33
    )
34
 
from ...sixish import (
 
34
from ..sixish import (
35
35
    text_type,
36
36
    )
37
37
 
48
48
                     ]
49
49
 
50
50
    def _get_colocated_branch(self, target_controldir, name):
51
 
        from ...errors import NotBranchError
 
51
        from ..errors import NotBranchError
52
52
        try:
53
53
            return target_controldir.open_branch(name=name)
54
54
        except NotBranchError:
55
55
            return target_controldir.create_branch(name=name)
56
56
 
57
57
    def _get_nested_branch(self, dest_transport, dest_format, name):
58
 
        from ...controldir import ControlDir
59
 
        from ...errors import NotBranchError
 
58
        from ..controldir import ControlDir
 
59
        from ..errors import NotBranchError
60
60
        head_transport = dest_transport.clone(name)
61
61
        try:
62
62
            head_controldir = ControlDir.open_from_transport(head_transport)
71
71
    def run(self, src_location, dest_location=None, colocated=False):
72
72
        import os
73
73
        import urllib
74
 
        from ... import (
 
74
        from .. import (
75
75
            controldir,
76
76
            trace,
77
77
            ui,
78
78
            urlutils,
79
79
            )
80
 
        from ...controldir import (
 
80
        from ..controldir import (
81
81
            ControlDir,
82
82
            )
83
 
        from ...errors import (
 
83
        from ..errors import (
84
84
            BzrCommandError,
85
85
            NoRepositoryPresent,
86
86
            NotBranchError,
87
87
            )
88
88
        from . import gettext
89
 
        from ...repository import (
 
89
        from ..repository import (
90
90
            InterRepository,
91
91
            Repository,
92
92
            )
93
 
        from ...transport import get_transport
 
93
        from ..transport import get_transport
94
94
        from .branch import (
95
95
            LocalGitBranch,
96
96
            )
178
178
 
179
179
    @display_command
180
180
    def run(self, sha1=None, directory=".", pretty=False):
181
 
        from ...errors import (
 
181
        from ..errors import (
182
182
            BzrCommandError,
183
183
            )
184
 
        from ...controldir import (
 
184
        from ..controldir import (
185
185
            ControlDir,
186
186
            )
187
187
        from .object_store import (
218
218
 
219
219
    @display_command
220
220
    def run(self, location="."):
221
 
        from ...controldir import (
 
221
        from ..controldir import (
222
222
            ControlDir,
223
223
            )
224
224
        from .refs import (
258
258
        :param signoff: Add Signed-Off-By flag.
259
259
        """
260
260
        from . import gettext
261
 
        from ...errors import BzrCommandError
 
261
        from ..errors import BzrCommandError
262
262
        from dulwich.patch import git_am_patch_split
263
263
        import subprocess
264
264
        (c, diff, version) = git_am_patch_split(f)
277
277
        wt.commit(authors=[c.author], message=message)
278
278
 
279
279
    def run(self, patches_list=None, signoff=False, force=False):
280
 
        from ...errors import UncommittedChanges
281
 
        from ...workingtree import WorkingTree
 
280
        from ..errors import UncommittedChanges
 
281
        from ..workingtree import WorkingTree
282
282
        if patches_list is None:
283
283
            patches_list = []
284
284
 
300
300
    takes_args = ['target', 'package']
301
301
 
302
302
    def run(self, target, package, directory='.'):
303
 
        from ...branch import Branch
304
 
        from ...errors import (
 
303
        from ..branch import Branch
 
304
        from ..errors import (
305
305
            BzrCommandError,
306
306
            NoSuchRevision,
307
307
            )
308
 
        from ...trace import warning
309
 
        from ...repository import Repository
 
308
        from ..trace import warning
 
309
        from ..repository import Repository
310
310
        from .object_store import get_object_store
311
311
        from .pristine_tar import (
312
312
            revision_pristine_tar_data,