~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2008-09-16 21:38:29 UTC
  • mto: (3697.2.5 1.7)
  • mto: This revision was merged to the branch mainline in revision 3710.
  • Revision ID: john@arbash-meinel.com-20080916213829-g18jj2b94k70fkxj
Merge vila's init[-repo] changes and add a NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1312
1312
            _create_prefix(to_transport)
1313
1313
 
1314
1314
        try:
1315
 
            existing_bzrdir = bzrdir.BzrDir.open_from_transport(to_transport)
 
1315
            a_bzrdir = bzrdir.BzrDir.open_from_transport(to_transport)
1316
1316
        except errors.NotBranchError:
1317
1317
            # really a NotBzrDir error...
1318
1318
            create_branch = bzrdir.BzrDir.create_branch_convenience
1319
1319
            branch = create_branch(to_transport.base, format=format,
1320
1320
                                   possible_transports=[to_transport])
 
1321
            a_bzrdir = branch.bzrdir
1321
1322
        else:
1322
1323
            from bzrlib.transport.local import LocalTransport
1323
 
            if existing_bzrdir.has_branch():
 
1324
            if a_bzrdir.has_branch():
1324
1325
                if (isinstance(to_transport, LocalTransport)
1325
 
                    and not existing_bzrdir.has_workingtree()):
 
1326
                    and not a_bzrdir.has_workingtree()):
1326
1327
                        raise errors.BranchExistsWithoutWorkingTree(location)
1327
1328
                raise errors.AlreadyBranchError(location)
1328
 
            else:
1329
 
                branch = existing_bzrdir.create_branch()
1330
 
                existing_bzrdir.create_workingtree()
 
1329
            branch = a_bzrdir.create_branch()
 
1330
            a_bzrdir.create_workingtree()
1331
1331
        if append_revisions_only:
1332
1332
            try:
1333
1333
                branch.set_append_revisions_only(True)
1336
1336
                    ' to append-revisions-only.  Try --experimental-branch6')
1337
1337
        if not is_quiet():
1338
1338
            from bzrlib.info import show_bzrdir_info
1339
 
            show_bzrdir_info(bzrdir.BzrDir.open_containing_from_transport(
1340
 
                to_transport)[0], verbose=0, outfile=self.outf)
 
1339
            show_bzrdir_info(a_bzrdir, verbose=0, outfile=self.outf)
1341
1340
 
1342
1341
 
1343
1342
class cmd_init_repository(Command):
1391
1390
        repo.set_make_working_trees(not no_trees)
1392
1391
        if not is_quiet():
1393
1392
            from bzrlib.info import show_bzrdir_info
1394
 
            show_bzrdir_info(bzrdir.BzrDir.open_containing_from_transport(
1395
 
                to_transport)[0], verbose=0, outfile=self.outf)
 
1393
            show_bzrdir_info(repo.bzrdir, verbose=0, outfile=self.outf)
1396
1394
 
1397
1395
 
1398
1396
class cmd_diff(Command):