/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 bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-15 13:20:18 UTC
  • mfrom: (1924 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1926.
  • Revision ID: john@arbash-meinel.com-20060815132018-b753fd07689ac31a
[merge] bzr.dev 1924

Show diffs side-by-side

added added

removed removed

Lines of Context:
762
762
        old_format = bzrdir.BzrDirFormat.get_default_format()
763
763
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirMetaFormat1())
764
764
        try:
765
 
            if lightweight:
766
 
                checkout = bzrdir.BzrDirMetaFormat1().initialize(to_location)
767
 
                branch.BranchReferenceFormat().initialize(checkout, source)
768
 
            else:
769
 
                checkout_branch =  bzrdir.BzrDir.create_branch_convenience(
770
 
                    to_location, force_new_tree=False)
771
 
                checkout = checkout_branch.bzrdir
772
 
                checkout_branch.bind(source)
773
 
                if revision_id is not None:
774
 
                    rh = checkout_branch.revision_history()
775
 
                    checkout_branch.set_revision_history(rh[:rh.index(revision_id) + 1])
776
 
            checkout.create_workingtree(revision_id)
 
765
            source.create_checkout(to_location, revision_id, lightweight)
777
766
        finally:
778
767
            bzrdir.BzrDirFormat.set_default_format(old_format)
779
768
 
1944
1933
                     Option('lsprof-timed',
1945
1934
                            help='generate lsprof output for benchmarked'
1946
1935
                                 ' sections of code.'),
 
1936
                     Option('cache-dir', type=str,
 
1937
                            help='a directory to cache intermediate'
 
1938
                                 ' benchmark steps'),
1947
1939
                     ]
1948
1940
 
1949
1941
    def run(self, testspecs_list=None, verbose=None, one=False,
1950
1942
            keep_output=False, transport=None, benchmark=None,
1951
 
            lsprof_timed=None):
 
1943
            lsprof_timed=None, cache_dir=None):
1952
1944
        import bzrlib.ui
1953
1945
        from bzrlib.tests import selftest
1954
1946
        import bzrlib.benchmarks as benchmarks
 
1947
        from bzrlib.benchmarks import tree_creator
 
1948
 
 
1949
        if cache_dir is not None:
 
1950
            tree_creator.TreeCreator.CACHE_ROOT = osutils.abspath(cache_dir)
1955
1951
        # we don't want progress meters from the tests to go to the
1956
1952
        # real output; and we don't want log messages cluttering up
1957
1953
        # the real logs.