~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Parth Malwankar
  • Date: 2010-05-11 13:39:27 UTC
  • mto: This revision was merged to the branch mainline in revision 5241.
  • Revision ID: parth.malwankar@gmail.com-20100511133927-ayuyfsg0b6kdxknz
initial approximation of progress.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1370
1370
            where possible.
1371
1371
        :return: The tree of the created checkout
1372
1372
        """
1373
 
        def _is_checkout_in_shared_repo(checkout):
1374
 
            """Return true is checkout is done inside shared repo."""
1375
 
            shared = True
1376
 
            try:
1377
 
                repo = checkout.open_repository()
1378
 
                shared = repo.is_shared()
1379
 
            except errors.NoRepositoryPresent, e:
1380
 
                pass
1381
 
            return shared
1382
 
 
1383
1373
        t = transport.get_transport(to_location)
1384
1374
        t.ensure_base()
1385
1375
        if lightweight:
1393
1383
                to_location, force_new_tree=False, format=format)
1394
1384
            checkout = checkout_branch.bzrdir
1395
1385
            checkout_branch.bind(self)
1396
 
            if _is_checkout_in_shared_repo(checkout) == False:
1397
 
                message = ('Copying history to "%s". '
1398
 
                    'To checkout without local history '
1399
 
                    'use --lightweight.' % to_location)
1400
 
                ui.ui_factory.show_message(message)
1401
1386
            # pull up to the specified revision_id to set the initial
1402
1387
            # branch tip correctly, and seed it with history.
1403
1388
            checkout_branch.pull(self, stop_revision=revision_id)