Esempio n. 1
0
 def patch_sources(self, sources):
     # Patch sources
     patch = Patcher('git')
     self.rebase_spec_file.update_changelog(self.rebase_spec_file.get_new_log())
     try:
         self.rebased_patches = patch.patch(sources[0],
                                            sources[1],
                                            self.old_rest_sources,
                                            self.spec_file.get_applied_patches(),
                                            **self.kwargs)
     except RuntimeError:
         raise RebaseHelperError('Patching failed')
     self.rebase_spec_file.write_updated_patches(self.rebased_patches,
                                                 self.conf.disable_inapplicable_patches)
     results_store.set_patches_results(self.rebased_patches)
Esempio n. 2
0
 def patch_sources(self, sources):
     # Patch sources
     git_helper = GitHelper(sources[0])
     if not self.conf.non_interactive:
         git_helper.check_git_config()
     patch = Patcher(GitHelper.GIT)
     self.rebase_spec_file.update_changelog(
         self.rebase_spec_file.get_new_log(git_helper))
     try:
         self.rebased_patches = patch.patch(
             sources[0], sources[1], self.old_rest_sources, git_helper,
             self.spec_file.get_applied_patches(),
             self.spec_file.get_prep_section(), **self.kwargs)
     except RuntimeError:
         raise RebaseHelperError('Patching failed')
     self.rebase_spec_file.write_updated_patches(self.rebased_patches)
     results_store.set_patches_results(self.rebased_patches)
Esempio n. 3
0
 def patch_sources(self, sources):
     # Patch sources
     git_helper = GitHelper(sources[0])
     if not self.conf.non_interactive:
         git_helper.check_git_config()
     patch = Patcher(GitHelper.GIT)
     self.rebase_spec_file.update_changelog(self.rebase_spec_file.get_new_log(git_helper))
     try:
         self.rebased_patches = patch.patch(sources[0],
                                            sources[1],
                                            self.old_rest_sources,
                                            git_helper,
                                            self.spec_file.get_applied_patches(),
                                            self.spec_file.get_prep_section(),
                                            **self.kwargs)
     except RuntimeError:
         raise RebaseHelperError('Patching failed')
     self.rebase_spec_file.write_updated_patches(self.rebased_patches)
     results_store.set_patches_results(self.rebased_patches)
Esempio n. 4
0
 def patch_sources(self, sources):
     # Patch sources
     git_helper = GitHelper(sources[0])
     git_helper.check_git_config()
     patch = Patcher(self.conf.patchtool)
     self.rebase_spec_file.update_changelog(self.rebase_spec_file.get_new_log(git_helper))
     try:
         self.rebased_patches = patch.patch(sources[0],
                                            sources[1],
                                            self.rest_sources,
                                            git_helper,
                                            self.spec_file.get_applied_patches(),
                                            self.spec_file.get_prep_section(),
                                            **self.kwargs)
     except RuntimeError as run_e:
         raise RebaseHelperError('Patching failed')
     self.rebase_spec_file.write_updated_patches(self.rebased_patches)
     if self.conf.non_interactive:
         OutputLogger.set_patch_output('Unapplied patches:', self.rebased_patches['unapplied'])
     OutputLogger.set_patch_output('Patches:', self.rebased_patches)