/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 FOSDEM roundtripping notes.

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
 
    )
22
19
import os
23
20
 
24
21
from bzrlib import (
30
27
    workingtree,
31
28
    )
32
29
 
 
30
from dulwich.index import Index
 
31
 
33
32
class GitWorkingTree(workingtree.WorkingTree):
34
33
    """A Git working tree."""
35
34
 
55
54
 
56
55
        self.index = Index(os.path.join(self.repository._git.controldir(), 
57
56
            "index"))
58
 
        self.views = self._make_views()
 
57
 
 
58
    def lock_read(self):
 
59
        pass
59
60
 
60
61
    def unlock(self):
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()
 
62
        pass
69
63
 
70
64
    def is_control_filename(self, path):
71
65
        return os.path.basename(path) == ".git"