~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2006-06-17 19:01:15 UTC
  • mfrom: (1786 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1787.
  • Revision ID: abentley@panoramicfeedback.com-20060617190115-81ab9bbc7aebcf8a
MergeĀ fromĀ dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
    def get_file_byname(self, filename):
456
456
        return file(self.abspath(filename), 'rb')
457
457
 
 
458
    def get_parent_ids(self):
 
459
        """See Tree.get_parent_ids.
 
460
        
 
461
        This implementation reads the pending merges list and last_revision
 
462
        value and uses that to decide what the parents list should be.
 
463
        """
 
464
        last_rev = self.last_revision()
 
465
        if last_rev is None:
 
466
            parents = []
 
467
        else:
 
468
            parents = [last_rev]
 
469
        other_parents = self.pending_merges()
 
470
        return parents + other_parents
 
471
 
458
472
    def get_root_id(self):
459
473
        """Return the id of this trees root"""
460
474
        inv = self.read_working_inventory()
509
523
        # but with branch a kwarg now, passing in args as is results in the
510
524
        #message being used for the branch
511
525
        args = (DEPRECATED_PARAMETER, message, ) + args
512
 
        Commit().commit(working_tree=self, revprops=revprops, *args, **kwargs)
 
526
        committed_id = Commit().commit( working_tree=self, revprops=revprops,
 
527
            *args, **kwargs)
513
528
        self._set_inventory(self.read_working_inventory())
 
529
        return committed_id
514
530
 
515
531
    def id2abspath(self, file_id):
516
532
        return self.abspath(self.id2path(file_id))