예제 #1
0
파일: cmds.py 프로젝트: kbielefe/git-cola
 def do(self):
     if self.model.mode == self.model.mode_branch:
         # We're applying changes from a different branch!
         parser = DiffParser(self.model,
                             filename=self.model.filename,
                             cached=False,
                             branch=self.model.head)
         status, output = \
         parser.process_diff_selection(self.selected,
                                       self.offset,
                                       self.selection,
                                       apply_to_worktree=True)
     else:
         # The normal worktree vs index scenario
         parser = DiffParser(self.model,
                             filename=self.model.filename,
                             cached=self.staged,
                             reverse=self.apply_to_worktree)
         status, output = \
         parser.process_diff_selection(self.selected,
                                       self.offset,
                                       self.selection,
                                       apply_to_worktree=
                                           self.apply_to_worktree)
     _notifier.broadcast(signals.log_cmd, status, output)
     # Redo the diff to show changes
     if self.staged:
         diffcmd = DiffStaged([self.model.filename])
     else:
         diffcmd = Diff([self.model.filename])
     diffcmd.do()
     self.model.update_file_status()
예제 #2
0
파일: cmds.py 프로젝트: fluffynuts/git-cola
 def do(self):
     # The normal worktree vs index scenario
     parser = DiffParser(self.model,
                         filename=self.model.filename,
                         cached=self.staged,
                         reverse=self.apply_to_worktree)
     status, out, err = \
     parser.process_diff_selection(self.offset,
                                   self.selection_text,
                                   apply_to_worktree=self.apply_to_worktree)
     Interaction.log_status(status, out, err)
     self.model.update_file_status(update_index=True)
예제 #3
0
 def do(self):
     # The normal worktree vs index scenario
     parser = DiffParser(self.model,
                         filename=self.model.filename,
                         cached=self.staged,
                         reverse=self.apply_to_worktree)
     status, out, err = \
     parser.process_diff_selection(self.offset,
                                   self.selection_text,
                                   apply_to_worktree=self.apply_to_worktree)
     Interaction.log_status(status, out, err)
     self.model.update_file_status(update_index=True)
예제 #4
0
파일: cmds.py 프로젝트: rakoo/git-cola
 def do(self):
     # The normal worktree vs index scenario
     parser = DiffParser(
         self.model, filename=self.model.filename, cached=self.staged, reverse=self.apply_to_worktree
     )
     status, output = parser.process_diff_selection(
         self.selected, self.offset, self.selection, apply_to_worktree=self.apply_to_worktree
     )
     _notifier.broadcast(signals.log_cmd, status, output)
     # Redo the diff to show changes
     if self.staged:
         diffcmd = DiffStaged([self.model.filename])
     else:
         diffcmd = Diff([self.model.filename])
     diffcmd.do()
     self.model.update_file_status()
예제 #5
0
파일: cmds.py 프로젝트: moreati/git-cola
 def do(self):
     # The normal worktree vs index scenario
     parser = DiffParser(self.model,
                         filename=self.model.filename,
                         cached=self.staged,
                         reverse=self.apply_to_worktree)
     status, output = \
     parser.process_diff_selection(self.selected,
                                   self.offset,
                                   self.selection,
                                   apply_to_worktree=self.apply_to_worktree)
     _notifier.broadcast(signals.log_cmd, status, output)
     # Redo the diff to show changes
     if self.staged:
         diffcmd = DiffStaged([self.model.filename])
     else:
         diffcmd = Diff([self.model.filename])
     diffcmd.do()
     self.model.update_file_status()