/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-03-24 00:53:02 UTC
  • mfrom: (6883.7.16 cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20180324005302-z0eh8ftsz57804cg
Avoid using file ids in a couple more places.

Merged from https://code.launchpad.net/~jelmer/brz/cleanups/+merge/341360

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'"""