~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_log.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-14 16:16:53 UTC
  • mto: (1946.2.6 reduce-knit-churn)
  • mto: This revision was merged to the branch mainline in revision 1919.
  • Revision ID: john@arbash-meinel.com-20060814161653-54cdcdadcd4e9003
Remove bogus entry from BRANCH.TODO

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006 by Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
 
# it under the terms of the GNU General Public License as published by
5
 
# the Free Software Foundation; either version 2 of the License, or
6
 
# (at your option) any later version.
 
4
# it under the terms of the GNU General Public License version 2 as published by
 
5
# the Free Software Foundation.
7
6
#
8
7
# This program is distributed in the hope that it will be useful,
9
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
44
43
 
45
44
    def test_log(self):
46
45
        """Run log in a many-commit tree.""" 
47
 
        tree = self.make_many_commit_tree(hardlink=True)
 
46
        tree = self.make_many_commit_tree()
48
47
        lf = log_formatter('long', to_file=StringIO())
49
48
        self.time(show_log, tree.branch, lf, direction='reverse')
50
49
 
51
50
    def test_merge_log(self):
52
51
        """Run log in a tree with many merges"""
53
 
        tree = self.make_heavily_merged_tree(hardlink=True)
 
52
        tree = self.make_heavily_merged_tree()
54
53
        lf = log_formatter('short', to_file=StringIO())
55
54
        self.time(show_log, tree.branch, lf, direction='reverse')
56
55
 
68
67
 
69
68
    def screenful_tester(self, formatter):
70
69
        """Run show_log, but stop after 25 lines are generated"""
71
 
        tree = self.make_many_commit_tree(hardlink=True)
 
70
        tree = self.make_many_commit_tree()
72
71
        def log_screenful():
73
72
            lf = log_formatter(formatter, to_file=LineConsumer(25))
74
73
            try:
81
80
 
82
81
    def test_cmd_log(self):
83
82
        """Test execution of the log command.""" 
84
 
        tree = self.make_many_commit_tree(hardlink=True)
 
83
        tree = self.make_many_commit_tree()
85
84
        self.time(self.run_bzr, 'log', '-r', '-4..')
86
85
 
87
86
    def test_cmd_log_subprocess(self):
88
87
        """Text startup and execution of the log command.""" 
89
 
        tree = self.make_many_commit_tree(hardlink=True)
 
88
        tree = self.make_many_commit_tree()
90
89
        self.time(self.run_bzr_subprocess, 'log', '-r', '-4..')
91
90
 
92
91
    def test_log_verbose(self):
93
92
        """'verbose' log -- shows file changes"""
94
 
        tree = self.make_many_commit_tree(hardlink=True)
 
93
        tree = self.make_many_commit_tree()
95
94
        lf = log_formatter('long', to_file=StringIO())
96
95
        self.time(show_log, tree.branch, lf, direction='reverse', verbose=True)