~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-07 21:26:25 UTC
  • mto: (1908.4.6 commit-perf)
  • mto: This revision was merged to the branch mainline in revision 1923.
  • Revision ID: john@arbash-meinel.com-20060807212625-80d116ae82323e5c
Updated bench_bench tests to test exactly what we really want to test

Show diffs side-by-side

added added

removed removed

Lines of Context:
814
814
    def run(self, dir='.'):
815
815
        tree = WorkingTree.open_containing(dir)[0]
816
816
        tree.lock_write()
 
817
        existing_pending_merges = tree.pending_merges()
817
818
        try:
818
819
            last_rev = tree.last_revision() 
819
820
            if last_rev == tree.branch.last_revision():
826
827
            conflicts = tree.update()
827
828
            revno = tree.branch.revision_id_to_revno(tree.last_revision())
828
829
            note('Updated to revision %d.' % (revno,))
 
830
            if tree.pending_merges() != existing_pending_merges:
 
831
                note('Your local commits will now show as pending merges with '
 
832
                     "'bzr status', and can be committed with 'bzr commit'.")
829
833
            if conflicts != 0:
830
834
                return 1
831
835
            else:
1755
1759
            raise BzrCommandError("Commit refused because there are unknown "
1756
1760
                                  "files in the working tree.")
1757
1761
        except errors.BoundBranchOutOfDate, e:
1758
 
            raise BzrCommandError(str(e)
1759
 
                                  + ' Either unbind, update, or'
1760
 
                                    ' pass --local to commit.')
1761
 
 
 
1762
            raise BzrCommandError(str(e) + "\n"
 
1763
                'To commit to master branch, run update and then commit.\n'
 
1764
                'You can also pass --local to commit to continue working '
 
1765
                'disconnected.')
1762
1766
 
1763
1767
class cmd_check(Command):
1764
1768
    """Validate consistency of branch history.
1940
1944
                     Option('lsprof-timed',
1941
1945
                            help='generate lsprof output for benchmarked'
1942
1946
                                 ' sections of code.'),
 
1947
                     Option('cache-dir', type=str,
 
1948
                            help='a directory to cache intermediate'
 
1949
                                 ' benchmark steps'),
1943
1950
                     ]
1944
1951
 
1945
1952
    def run(self, testspecs_list=None, verbose=None, one=False,
1946
1953
            keep_output=False, transport=None, benchmark=None,
1947
 
            lsprof_timed=None):
 
1954
            lsprof_timed=None, cache_dir=None):
1948
1955
        import bzrlib.ui
1949
1956
        from bzrlib.tests import selftest
1950
1957
        import bzrlib.benchmarks as benchmarks
 
1958
 
 
1959
        if cache_dir is not None:
 
1960
            benchmarks.Benchmark.CACHE_ROOT = osutils.abspath(cache_dir)
1951
1961
        # we don't want progress meters from the tests to go to the
1952
1962
        # real output; and we don't want log messages cluttering up
1953
1963
        # the real logs.