/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

Merge thin-pack work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    workingtree,
28
28
    )
29
29
 
 
30
from dulwich.index import Index
 
31
 
30
32
class GitWorkingTree(workingtree.WorkingTree):
31
33
    """A Git working tree."""
32
34
 
50
52
 
51
53
        self._format = GitWorkingTreeFormat()
52
54
 
53
 
    def lock_read(self):
54
 
        pass
 
55
        self.index = Index(os.path.join(self.repository._git.controldir(), 
 
56
            "index"))
55
57
 
56
58
    def unlock(self):
57
 
        pass
 
59
        # non-implementation specific cleanup
 
60
        self._cleanup()
 
61
 
 
62
        # reverse order of locking.
 
63
        try:
 
64
            return self._control_files.unlock()
 
65
        finally:
 
66
            self.branch.unlock()
58
67
 
59
68
    def is_control_filename(self, path):
60
69
        return os.path.basename(path) == ".git"