/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/directory_service.py

  • Committer: Lawrence Mitchell
  • Date: 2011-11-08 10:54:09 UTC
  • mto: This revision was merged to the branch mainline in revision 6245.
  • Revision ID: wence@gmx.li-20111108105409-cgdqeek7vl7e8nbb
Only set check_clean if {clean} is asked for in template
      
The {clean} flag in templates requires an lstat of every file in the
repository.  If the filesystem is slow this can take a noticeable
amount of time.  So only switch check_clean to True if the template
actually asks for it, to avoid penalising those who don't want to
know.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2008 Canonical Ltd
 
1
# Copyright (C) 2008, 2009, 2011 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
20
20
to true URLs.  Examples include lp:urls and per-user location aliases.
21
21
"""
22
22
 
23
 
from bzrlib import errors, registry
 
23
from bzrlib import (
 
24
    errors,
 
25
    registry,
 
26
    )
24
27
from bzrlib.lazy_import import lazy_import
25
28
lazy_import(globals(), """
26
 
from bzrlib.branch import Branch
27
 
from bzrlib import urlutils
 
29
from bzrlib import (
 
30
    branch as _mod_branch,
 
31
    urlutils,
 
32
    )
28
33
""")
29
34
 
30
35
 
68
73
    """
69
74
 
70
75
    def look_up(self, name, url):
71
 
        branch = Branch.open_containing('.')[0]
 
76
        branch = _mod_branch.Branch.open_containing('.')[0]
72
77
        lookups = {
73
78
            'parent': branch.get_parent,
74
79
            'submit': branch.get_submit_branch,