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

  • Committer: Jelmer Vernooij
  • Date: 2009-03-16 13:56:04 UTC
  • mto: (0.200.259 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090316135604-9nkd7d2ztiygybiy
Strip ref directory name from tag names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    )
28
28
 
29
29
lazy_import(globals(), """
30
 
from bzrlib.lockable_files import TransportLock
 
30
from bzrlib.lockable_files import (
 
31
    TransportLock,
 
32
    )
31
33
from bzrlib.plugins.git import (
32
34
    errors,
33
35
    branch,
 
36
    get_rich_root_format,
34
37
    repository,
35
38
    workingtree,
36
39
    )
66
69
        self._lock = lock
67
70
        self._transaction = None
68
71
        self._lock_mode = None
 
72
        self._transport = transport
69
73
        self._lock_count = 0
70
 
        self._transport = transport
71
74
 
72
75
 
73
76
class GitDir(bzrdir.BzrDir):
77
80
        return True
78
81
 
79
82
    def cloning_metadir(self, stacked=False):
80
 
        return bzrlib.bzrdir.format_registry.make_bzrdir("1.9-rich-root")
 
83
        return get_rich_root_format()
81
84
 
82
85
 
83
86
class LocalGitDir(GitDir):
115
118
        return self._gitrepository_class(self, self._lockfiles)
116
119
 
117
120
    def open_workingtree(self, recommend_upgrade=True):
 
121
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
 
122
        raise errors.bzr_errors.NoWorkingTree(loc)
118
123
        if (not self._git.bare and 
119
124
            os.path.exists(os.path.join(self._git.controldir(), "index"))):
120
125
            return workingtree.GitWorkingTree(self, self.open_repository(), 
121
126
                                                  self.open_branch())
122
 
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
123
 
        raise errors.bzr_errors.NoWorkingTree(loc)
124
127
 
125
128
    def create_repository(self, shared=False):
126
129
        return self.open_repository()