/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-08-11 12:19:56 UTC
  • mfrom: (6986.2.4 git-graduate)
  • Revision ID: breezy.the.bot@gmail.com-20180811121956-vg4h6snulccpy99e
Move git support to breezy.git.

Merged from https://code.launchpad.net/~jelmer/brz/git-graduate/+merge/348051

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
    viewitems,
37
37
    )
49
49
                     ]
50
50
 
51
51
    def _get_colocated_branch(self, target_controldir, name):
52
 
        from ...errors import NotBranchError
 
52
        from ..errors import NotBranchError
53
53
        try:
54
54
            return target_controldir.open_branch(name=name)
55
55
        except NotBranchError:
56
56
            return target_controldir.create_branch(name=name)
57
57
 
58
58
    def _get_nested_branch(self, dest_transport, dest_format, name):
59
 
        from ...controldir import ControlDir
60
 
        from ...errors import NotBranchError
 
59
        from ..controldir import ControlDir
 
60
        from ..errors import NotBranchError
61
61
        head_transport = dest_transport.clone(name)
62
62
        try:
63
63
            head_controldir = ControlDir.open_from_transport(head_transport)
72
72
    def run(self, src_location, dest_location=None, colocated=False):
73
73
        import os
74
74
        import urllib
75
 
        from ... import (
 
75
        from .. import (
76
76
            controldir,
77
77
            trace,
78
78
            ui,
79
79
            urlutils,
80
80
            )
81
 
        from ...controldir import (
 
81
        from ..controldir import (
82
82
            ControlDir,
83
83
            )
84
 
        from ...errors import (
 
84
        from ..errors import (
85
85
            BzrCommandError,
86
86
            NoRepositoryPresent,
87
87
            NotBranchError,
88
88
            )
89
89
        from . import gettext
90
 
        from ...repository import (
 
90
        from ..repository import (
91
91
            InterRepository,
92
92
            Repository,
93
93
            )
94
 
        from ...transport import get_transport
 
94
        from ..transport import get_transport
95
95
        from .branch import (
96
96
            LocalGitBranch,
97
97
            )
179
179
 
180
180
    @display_command
181
181
    def run(self, sha1=None, directory=".", pretty=False):
182
 
        from ...errors import (
 
182
        from ..errors import (
183
183
            BzrCommandError,
184
184
            )
185
 
        from ...controldir import (
 
185
        from ..controldir import (
186
186
            ControlDir,
187
187
            )
188
188
        from .object_store import (
219
219
 
220
220
    @display_command
221
221
    def run(self, location="."):
222
 
        from ...controldir import (
 
222
        from ..controldir import (
223
223
            ControlDir,
224
224
            )
225
225
        from .refs import (
259
259
        :param signoff: Add Signed-Off-By flag.
260
260
        """
261
261
        from . import gettext
262
 
        from ...errors import BzrCommandError
 
262
        from ..errors import BzrCommandError
263
263
        from dulwich.patch import git_am_patch_split
264
264
        import subprocess
265
265
        (c, diff, version) = git_am_patch_split(f)
278
278
        wt.commit(authors=[c.author], message=message)
279
279
 
280
280
    def run(self, patches_list=None, signoff=False, force=False):
281
 
        from ...errors import UncommittedChanges
282
 
        from ...workingtree import WorkingTree
 
281
        from ..errors import UncommittedChanges
 
282
        from ..workingtree import WorkingTree
283
283
        if patches_list is None:
284
284
            patches_list = []
285
285
 
301
301
    takes_args = ['target', 'package']
302
302
 
303
303
    def run(self, target, package, directory='.'):
304
 
        from ...branch import Branch
305
 
        from ...errors import (
 
304
        from ..branch import Branch
 
305
        from ..errors import (
306
306
            BzrCommandError,
307
307
            NoSuchRevision,
308
308
            )
309
 
        from ...trace import warning
310
 
        from ...repository import Repository
 
309
        from ..trace import warning
 
310
        from ..repository import Repository
311
311
        from .object_store import get_object_store
312
312
        from .pristine_tar import (
313
313
            revision_pristine_tar_data,