~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Move working tree initialisation out from  Branch.initialize, deprecated Branch.initialize to Branch.create.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from bzrlib.errors import (BzrError, BzrCheckError, BzrCommandError, 
35
35
                           NotBranchError, DivergedBranches, NotConflicted,
36
36
                           NoSuchFile, NoWorkingTree, FileInWrongBranch)
 
37
from bzrlib.log import show_one_log
37
38
from bzrlib.option import Option
38
39
from bzrlib.revisionspec import RevisionSpec
39
40
import bzrlib.trace
40
41
from bzrlib.trace import mutter, note, log_error, warning, is_quiet
 
42
from bzrlib.transport.local import LocalTransport
41
43
from bzrlib.workingtree import WorkingTree
42
 
from bzrlib.log import show_one_log
43
44
 
44
45
 
45
46
def tree_files(file_list, default_branch=u'.'):
502
503
                        if new_transport.base == transport.base:
503
504
                            raise BzrCommandError("Could not creeate "
504
505
                                                  "path prefix.")
505
 
            br_to = Branch.initialize(location)
 
506
            if isinstance(transport, LocalTransport):
 
507
                br_to = WorkingTree.create_standalone(location).branch
 
508
            else:
 
509
                br_to = Branch.create(location)
506
510
        old_rh = br_to.revision_history()
507
511
        try:
508
512
            try:
740
744
            # locations if the user supplies an extended path
741
745
            if not os.path.exists(location):
742
746
                os.mkdir(location)
743
 
        Branch.initialize(location)
 
747
        WorkingTree.create_standalone(location)
744
748
 
745
749
 
746
750
class cmd_diff(Command):
1433
1437
        if typestring == "sftp":
1434
1438
            from bzrlib.transport.sftp import SFTPAbsoluteServer
1435
1439
            return SFTPAbsoluteServer
 
1440
        if typestring == "memory":
 
1441
            from bzrlib.transport.memory import MemoryServer
 
1442
            return MemoryServer
1436
1443
        msg = "No known transport type %s. Supported types are: sftp\n" %\
1437
1444
            (typestring)
1438
1445
        raise BzrCommandError(msg)