~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Robert Collins
  • Date: 2007-03-06 10:29:01 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070306102901-y25mgksdvocjmib8
Make the nested tree commit smoke test be more rigourous.

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
                    # add this entry to the parent map.
354
354
                    parent_ies[(dirname + '/' + name).strip('/')] = inv_entry
355
355
                elif kind == 'tree-reference':
356
 
                    inv_entry.reference_revision = link_or_sha1
 
356
                    inv_entry.reference_revision = link_or_sha1 or None
357
357
                else:
358
358
                    assert 'unknown kind'
359
359
                # These checks cost us around 40ms on a 55k entry tree
1357
1357
                    inv_entry.text_size = size
1358
1358
                    inv_entry.symlink_target = utf8_decode(fingerprint)[0]
1359
1359
                elif kind == 'tree-reference':
1360
 
                    inv_entry.reference_revision = fingerprint
 
1360
                    inv_entry.reference_revision = fingerprint or None
1361
1361
                else:
1362
1362
                    raise AssertionError("cannot convert entry %r into an InventoryEntry"
1363
1363
                            % entry)
1403
1403
    def get_file_text(self, file_id):
1404
1404
        return ''.join(self.get_file_lines(file_id))
1405
1405
 
 
1406
    def get_reference_revision(self, entry, path=None):
 
1407
        return entry.reference_revision
 
1408
 
1406
1409
    def get_symlink_target(self, file_id):
1407
1410
        entry = self._get_entry(file_id=file_id)
1408
1411
        parent_index = self._get_parent_index()