def finish(self):
        self.log.info("No verification checks enabled")
        self.git.checkout(self.branch)
        current_sha = self.git.rev_parse("HEAD")

        try:
            self.log.info(
                """
                Merging by inverting the 'ours' strategy discard all changes
                and replace existing branch contents with the new import.
                """)
            self.log.info(
                """
                Merging import branch to HEAD and ignoring changes:
                    git merge -s ours --no-commit %s
                """, self.import_branch)
            self.git.merge('-s', 'ours', self.import_branch, no_commit=True)
            self.log.info(
                """
                Replacing tree contents with those from the import branch:
                    git read-tree -u --reset %s
                """, self.import_branch)
            self.git.read_tree(self.import_branch, u=True, reset=True)
            self.log.info(
                """
                Committing merge commit:
                    git commit --no-edit
                """)
            self.git.commit(no_edit=True)
            # finally test that everything worked correctly by comparing if
            # the tree object id's match
            if self.git.rev_parse("HEAD^{tree}") != \
                    self.git.rev_parse("%s^{tree}" % self.import_branch):
                raise ImportUpstreamError(
                    "Resulting tree does not match import")
        except (GitCommandError, ImportUpstreamError):
            self.log.error(
                """
                Failed to finish import by merging branch:
                    '%s'
                into and replacing the contents of:
                    '%s'
                """, self.import_branch, self.branch)
            self._set_branch(self.branch, current_sha, force=True)
            return False
        except Exception:
            self.log.exception("Unknown exception during finish")
            self._set_branch(self.branch, current_sha, force=True)
            raise
        return True
Apply the transformation to audio and annotations.
dataset/ETHPy150Open openstack/git-upstream/git_upstream/lib/importupstream.py/ImportUpstream.finish--crossover with--dataset/ETHPy150Open bmcfee/muda/muda/base.py/BaseTransformer._transform