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

Add description of git-v1 mapping.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""An adapter between a Git index and a Bazaar Working Tree"""
18
18
 
 
19
from dulwich.index import (
 
20
    Index,
 
21
    )
19
22
import os
20
23
 
21
24
from bzrlib import (
50
53
 
51
54
        self._format = GitWorkingTreeFormat()
52
55
 
53
 
    def lock_read(self):
54
 
        pass
 
56
        self.index = Index(os.path.join(self.repository._git.controldir(), 
 
57
            "index"))
 
58
        self.views = self._make_views()
55
59
 
56
60
    def unlock(self):
57
 
        pass
 
61
        # non-implementation specific cleanup
 
62
        self._cleanup()
 
63
 
 
64
        # reverse order of locking.
 
65
        try:
 
66
            return self._control_files.unlock()
 
67
        finally:
 
68
            self.branch.unlock()
58
69
 
59
70
    def is_control_filename(self, path):
60
71
        return os.path.basename(path) == ".git"