def compare_file(self, filename): """Initiates the difftool session""" if self.use_sandbox: arg = self.diff_arg else: arg = (self.start, self.end) difftool.launch(arg + ('--', filename))
def difftool_selected(self, files): bottom, top = self.treewidget.selected_commit_range() if not top: return difftool.launch(left=bottom, left_take_parent=True, right=top, paths=files)
def difftool_predecessor(self, paths): """Prompt for an older commit and launch difftool against it.""" args = ['--'] + paths revs, summaries = gitcmds.log_helper(all=False, extra_args=args) commits = select_commits(N_('Select Previous Version'), revs, summaries, multiselect=False) if not commits: return commit = commits[0] difftool.launch([commit, '--'] + paths)
def compare_file(self, filename): """Initiates the difftool session""" if self.use_sandbox: left = self.diff_arg[0] if len(self.diff_arg) > 1: right = self.diff_arg[1] else: right = None else: left, right = self.start, self.end difftool.launch(left=left, right=right, paths=[filename])
def do(self): if not self.filenames: return args = [] if self.staged: args.append('--cached') if self.model.head != 'HEAD': args.append(self.model.head) args.append('--') args.extend(self.filenames) difftool.launch(args)
def diff_commits(self, a, b): paths = self.dag.paths() if paths: difftool.launch([a, b, '--'] + paths) else: difftool.diff_commits(self, a, b)
def diff_commits(self, a, b): paths = self.ctx.paths() if paths: difftool.launch(left=a, right=b, paths=paths) else: difftool.diff_commits(self, a, b)