/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: Aaron Bentley
  • Date: 2007-01-17 16:13:50 UTC
  • mfrom: (2236 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2240.
  • Revision ID: abentley@panoramicfeedback.com-20070117161350-z0poe4762mzt2mlb
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
834
834
                                             % to_location)
835
835
            else:
836
836
                raise
837
 
        old_format = bzrdir.BzrDirFormat.get_default_format()
838
 
        bzrdir.BzrDirFormat.set_default_format(bzrdir.BzrDirMetaFormat1())
839
 
        try:
840
 
            source.create_checkout(to_location, revision_id, lightweight)
841
 
        finally:
842
 
            bzrdir.BzrDirFormat.set_default_format(old_format)
 
837
        source.create_checkout(to_location, revision_id, lightweight)
843
838
 
844
839
 
845
840
class cmd_renames(Command):
2058
2053
class cmd_selftest(Command):
2059
2054
    """Run internal test suite.
2060
2055
    
2061
 
    This creates temporary test directories in the working directory,
2062
 
    but not existing data is affected.  These directories are deleted
2063
 
    if the tests pass, or left behind to help in debugging if they
2064
 
    fail and --keep-output is specified.
 
2056
    This creates temporary test directories in the working directory, but not
 
2057
    existing data is affected.  These directories are deleted if the tests
 
2058
    pass, or left behind to help in debugging if they fail and --keep-output
 
2059
    is specified.
2065
2060
    
2066
 
    If arguments are given, they are regular expressions that say
2067
 
    which tests should run.
 
2061
    If arguments are given, they are regular expressions that say which tests
 
2062
    should run.  Tests matching any expression are run, and other tests are
 
2063
    not run.
 
2064
 
 
2065
    Alternatively if --first is given, matching tests are run first and then
 
2066
    all other tests are run.  This is useful if you have been working in a
 
2067
    particular area, but want to make sure nothing else was broken.
2068
2068
 
2069
2069
    If the global option '--no-plugins' is given, plugins are not loaded
2070
2070
    before running the selftests.  This has two effects: features provided or
2071
2071
    modified by plugins will not be tested, and tests provided by plugins will
2072
2072
    not be run.
2073
2073
 
2074
 
    examples:
 
2074
    examples::
2075
2075
        bzr selftest ignore
 
2076
            run only tests relating to 'ignore'
2076
2077
        bzr --no-plugins selftest -v
 
2078
            disable plugins and list tests as they're run
2077
2079
    """
2078
2080
    # TODO: --list should give a list of all available tests
2079
2081
 
2114
2116
                     Option('clean-output',
2115
2117
                            help='clean temporary tests directories'
2116
2118
                                 ' without running tests'),
 
2119
                     Option('first',
 
2120
                            help='run all tests, but run specified tests first',
 
2121
                            )
2117
2122
                     ]
2118
2123
    encoding_type = 'replace'
2119
2124
 
2120
2125
    def run(self, testspecs_list=None, verbose=None, one=False,
2121
2126
            keep_output=False, transport=None, benchmark=None,
2122
 
            lsprof_timed=None, cache_dir=None, clean_output=False):
 
2127
            lsprof_timed=None, cache_dir=None, clean_output=False,
 
2128
            first=False):
2123
2129
        import bzrlib.ui
2124
2130
        from bzrlib.tests import selftest
2125
2131
        import bzrlib.benchmarks as benchmarks
2158
2164
                              transport=transport,
2159
2165
                              test_suite_factory=test_suite_factory,
2160
2166
                              lsprof_timed=lsprof_timed,
2161
 
                              bench_history=benchfile)
 
2167
                              bench_history=benchfile,
 
2168
                              matching_tests_first=first,
 
2169
                              )
2162
2170
        finally:
2163
2171
            if benchfile is not None:
2164
2172
                benchfile.close()