/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/fastimport/bzr_commit_handler.py

  • Committer: Jelmer Vernooij
  • Date: 2018-03-24 17:48:04 UTC
  • mfrom: (6921 work)
  • mto: This revision was merged to the branch mainline in revision 6923.
  • Revision ID: jelmer@jelmer.uk-20180324174804-xf22o05byoj12x1q
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
374
374
                % (kind, path))
375
375
            return
376
376
        # Record it
377
 
        if inv.has_id(file_id):
 
377
        try:
378
378
            old_ie = inv[file_id]
379
 
            if old_ie.kind == 'directory':
380
 
                self.record_delete(path, old_ie)
381
 
            self.record_changed(path, ie, parent_id)
382
 
        else:
 
379
        except errors.NoSuchId:
383
380
            try:
384
381
                self.record_new(path, ie)
385
382
            except:
387
384
                    % (path, ie, self.command.id)
388
385
                print "parent's children are:\n%r\n" % (ie.parent_id.children,)
389
386
                raise
 
387
        else:
 
388
            if old_ie.kind == 'directory':
 
389
                self.record_delete(path, old_ie)
 
390
            self.record_changed(path, ie, parent_id)
390
391
 
391
392
    def _ensure_directory(self, path, inv):
392
393
        """Ensure that the containing directory exists for 'path'"""