~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/store/weave.py

  • Committer: Robert Collins
  • Date: 2005-10-11 02:52:47 UTC
  • mfrom: (1417.1.13)
  • Revision ID: robertc@robertcollins.net-20051011025247-4b95466bb6509385
merge in revision-history caching, and tuning of fetch to not retrieve more data than needed when nothing needs to be pulled

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    """
40
40
    FILE_SUFFIX = '.weave'
41
41
 
42
 
    def __init__(self, transport, prefixed=False):
 
42
    def __init__(self, transport, prefixed=False, precious=False):
43
43
        self._transport = transport
44
44
        self._prefixed = prefixed
 
45
        self._precious = precious
45
46
 
46
47
    def filename(self, file_id):
47
48
        """Return the path relative to the transport root."""
78
79
            return weave
79
80
        w = read_weave(self._get(file_id))
80
81
        transaction.map.add_weave(file_id, w)
81
 
        transaction.register_clean(w)
 
82
        transaction.register_clean(w, precious=self._precious)
82
83
        return w
83
84
 
84
85
    def get_lines(self, file_id, rev_id, transaction):
95
96
        except NoSuchFile:
96
97
            weave = Weave(weave_name=file_id)
97
98
            transaction.map.add_weave(file_id, weave)
98
 
            transaction.register_clean(weave)
 
99
            transaction.register_clean(weave, precious=self._precious)
99
100
            return weave
100
101
 
101
102
    def put_weave(self, file_id, weave, transaction):