/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 bzrlib/bzrdir.py

Changed ``pre_commit`` hook signature.

The hook's signature is now

  ::

    hook(local, master, old_revno, old_revid, new_revno, new_revid,
         affected_ids, future_revision_tree)

``affected_ids`` is a dictionary of (change_type, ids). change_type is
a string describing the change (e.g. 'added', 'deleted', 'modified'), and
ids is a list of inventory entry ids.

Hooks can get an added file easier than before:

  ::

    for id in affected_ids.get('added', []):
        if future_revision_tree.kind(id) == 'file':
            file = future_revision_tree.get_file(id)
            ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1950
1950
                ie.revision = previous_ie.revision
1951
1951
                return
1952
1952
        if ie.has_text():
1953
 
            text = self.branch.repository.text_store.get(ie.text_id)
 
1953
            text = self.branch.repository.weave_store.get(ie.text_id)
1954
1954
            file_lines = text.readlines()
1955
1955
            assert sha_strings(file_lines) == ie.text_sha1
1956
1956
            assert sum(map(len, file_lines)) == ie.text_size