/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/plugins/upload/cmds.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-07 18:37:11 UTC
  • mfrom: (6667.2.1 trunk)
  • Revision ID: breezy.the.bot@gmail.com-20170607183711-oz0x9xqqh9x8jgas
Use ControlDir rather than BzrDir, remove unused imports.

Merged from https://code.launchpad.net/~jelmer/brz/small-fixes/+merge/325196

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
import sys
31
31
 
32
32
from breezy import (
33
 
    bzrdir,
 
33
    controldir,
34
34
    errors,
35
35
    globbing,
36
36
    ignores,
37
 
    osutils,
38
37
    revision,
39
 
    revisionspec,
40
 
    trace,
41
38
    transport,
42
39
    urlutils,
43
 
    workingtree,
44
40
    )
45
41
""")
46
42
 
478
474
            directory = u'.'
479
475
 
480
476
        (wt, branch,
481
 
         relpath) = bzrdir.BzrDir.open_containing_tree_or_branch(directory)
 
477
         relpath) = controldir.ControlDir.open_containing_tree_or_branch(
 
478
             directory)
482
479
 
483
480
        if wt:
484
481
            wt.lock_read()
510
507
 
511
508
            # Check that we are not uploading to a existing working tree.
512
509
            try:
513
 
                to_bzr_dir = bzrdir.BzrDir.open_from_transport(to_transport)
 
510
                to_bzr_dir = controldir.ControlDir.open_from_transport(
 
511
                        to_transport)
514
512
                has_wt = to_bzr_dir.has_workingtree()
515
513
            except errors.NotBranchError:
516
514
                has_wt = False