~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/dirstate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-10 05:01:04 UTC
  • mfrom: (2331.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070310050104-4c59f87cee46be60
(robertc) Forward port of dirstate correctness committed to bzr 0.15.

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
        else:
421
421
            raise errors.BzrError('unknown kind %r' % kind)
422
422
        entry_index, present = self._find_entry_index(entry_key, block)
423
 
        assert not present, "basename %r already added" % basename
424
 
        block.insert(entry_index, entry_data)
 
423
        if not present:
 
424
            block.insert(entry_index, entry_data)
 
425
        else:
 
426
            assert block[entry_index][1][0][0] == 'a', " %r(%r) already added" % (basename, file_id)
 
427
            block[entry_index][1][0] = entry_data[1][0]
425
428
 
426
429
        if kind == 'directory':
427
430
           # insert a new dirblock