~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: NamNguyen
  • Date: 2007-08-27 08:38:37 UTC
  • mto: (2789.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2790.
  • Revision ID: namnguyen-20070827083837-t6a5oewzvdct6j8i
branch.py:

   * ``pre_commit`` hook's signature is changed to::

   hook(local, master, old_revno, old_revid, future_revno, future_revid,
        tree_delta, future_tree)

   * made it clear that pre_commit hooks must not modify neither
     the delta nor future_tree

commit.py:

   * replaced ``affected_ids`` with ``tree_delta``

   * only compute ``future_tree`` and ``tree_delta`` once

Show diffs side-by-side

added added

removed removed

Lines of Context:
1002
1002
        # invoked before a commit operation takes place.
1003
1003
        # the api signature is
1004
1004
        # (local, master, old_revno, old_revid, future_revno, future_revid,
1005
 
        #  affected_ids, future_revision_tree).
 
1005
        #  tree_delta, future_tree).
1006
1006
        # old_revid is NULL_REVISION for the first commit to a branch
1007
 
        # affected_ids is a dictionary of (change_type, ids) pairs where ids
1008
 
        # is a list of inventory entry ids and change_type is a string
1009
 
        # describing the change (added, deleted, renamed, etc.)
1010
 
        # future_revision_tree is an in-memory tree obtained from
1011
 
        # CommitBuilder.revision_tree()
 
1007
        # tree_delta is a TreeDelta object describing changes from the basis
 
1008
        # revision, hooks MUST NOT modify this delta
 
1009
        # future_tree is an in-memory tree obtained from
 
1010
        # CommitBuilder.revision_tree() and hooks MUST NOT modify this tree
1012
1011
        self['pre_commit'] = []
1013
1012
        # invoked after a commit operation completes.
1014
1013
        # the api signature is