~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Aaron Bentley
  • Date: 2008-06-26 19:36:41 UTC
  • mto: (3363.8.1 stored_kind)
  • mto: This revision was merged to the branch mainline in revision 3517.
  • Revision ID: aaron@aaronbentley.com-20080626193641-lle6e4f6hnsuvoxh
Update to get tests passing

Show diffs side-by-side

added added

removed removed

Lines of Context:
1634
1634
    def annotate_iter(self, file_id,
1635
1635
                      default_revision=_mod_revision.CURRENT_REVISION):
1636
1636
        changes = self._changes(file_id)
1637
 
        changed_content, versioned, kind = changes[2], changes[3], changes[6]
1638
 
        if kind[1] is None:
1639
 
            return None
1640
 
        if kind[0] is None or not versioned[0]:
1641
 
            old_annotation = []
 
1637
        if changes is None:
 
1638
            get_old = True
1642
1639
        else:
 
1640
            changed_content, versioned, kind = (changes[2], changes[3],
 
1641
                                                changes[6])
 
1642
            if kind[1] is None:
 
1643
                return None
 
1644
            get_old = (kind[0] == 'file' and versioned[0])
 
1645
        if get_old:
1643
1646
            old_annotation = self._transform._tree.annotate_iter(file_id,
1644
1647
                default_revision=default_revision)
 
1648
        else:
 
1649
            old_annotation = []
 
1650
        if changes is None:
 
1651
            return old_annotation
1645
1652
        if not changed_content:
1646
1653
            return old_annotation
1647
1654
        return annotate.reannotate([old_annotation],