~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Robert Collins
  • Date: 2006-09-05 08:14:23 UTC
  • mto: (1852.16.2 Tree.walkdirs)
  • mto: This revision was merged to the branch mainline in revision 1993.
  • Revision ID: robertc@robertcollins.net-20060905081423-b1bc9b092a9f8597
DeprecateĀ WorkingTree.last_revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
            self._check_bound_branch()
246
246
 
247
247
            # check for out of date working trees
248
 
            # if we are bound, then self.branch is the master branch and this
249
 
            # test is thus all we need.
 
248
            try:
 
249
                first_tree_parent = self.work_tree.get_parent_ids()[0]
 
250
            except IndexError:
 
251
                # if there are no parents, treat our parent as 'None'
 
252
                # this is so that we still consier the master branch
 
253
                # - in a checkout scenario the tree may have no
 
254
                # parents but the branch may do.
 
255
                first_tree_parent = None
250
256
            master_last = self.master_branch.last_revision()
251
 
            if (master_last is not None and 
252
 
                master_last != self.work_tree.last_revision()):
 
257
            if (master_last is not None and
 
258
                master_last != first_tree_parent):
253
259
                raise errors.OutOfDateTree(self.work_tree)
254
260
    
255
261
            if strict: