~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branchbuilder.py

  • Committer: Robert Collins
  • Date: 2007-04-27 03:39:09 UTC
  • mto: (2495.3.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2498.
  • Revision ID: robertc@robertcollins.net-20070427033909-bsuz8ogd7r75dbfl
Return the commited revision id from BranchBuilder.build_commit to save later instrospection.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        """Build a commit on the branch."""
51
51
        tree = memorytree.MemoryTree.create_on_branch(self._branch)
52
52
        tree.lock_write()
53
 
        tree.add('')
54
 
        tree.commit('commit %d' % (self._branch.revno() + 1))
55
 
        tree.unlock()
 
53
        try:
 
54
            tree.add('')
 
55
            return tree.commit('commit %d' % (self._branch.revno() + 1))
 
56
        finally:
 
57
            tree.unlock()
56
58
 
57
59
    def get_branch(self):
58
60
        """Return the branch created by the builder."""