/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/benchmarks/tree_creator/kernel_like.py

  • Committer: Martin von Gagern
  • Date: 2010-04-20 08:47:38 UTC
  • mfrom: (5167 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5195.
  • Revision ID: martin.vgagern@gmx.net-20100420084738-ygymnqmdllzrhpfn
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
"""Tree creators for kernel-like trees"""
18
18
 
48
48
        if self._url is not None:
49
49
            b = bzrdir.BzrDir.create_branch_convenience(self._url)
50
50
            d = bzrdir.BzrDir.create(root)
51
 
            bzrlib.branch.BranchReferenceFormat().initialize(d, b)
 
51
            bzrlib.branch.BranchReferenceFormat().initialize(d,
 
52
                target_branch=b)
52
53
            tree = d.create_workingtree()
53
54
        else:
54
55
            tree = bzrdir.BzrDir.create_standalone_workingtree(root)
69
70
        return tree
70
71
 
71
72
    def _create_tree(self, root, in_cache=False):
72
 
        # a kernel tree has ~10000 and 500 directory, with most files around 
73
 
        # 3-4 levels deep. 
 
73
        # a kernel tree has ~10000 and 500 directory, with most files around
 
74
        # 3-4 levels deep.
74
75
        # we simulate this by three levels of dirs named 0-7, givin 512 dirs,
75
76
        # and 20 files each.
76
77
        files = []