Exemple #1
0
 def choose_commit(self):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits("Select Commit Message", revs, summaries, multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     cmds.do(cmds.LoadPreviousMessage, sha1)
Exemple #2
0
def export_patches():
    """Run 'git format-patch' on a list of commits."""
    revs, summaries = gitcmds.log_helper()
    to_export = select_commits(N_('Export Patches'), revs, summaries)
    if not to_export:
        return
    cmds.do(cmds.FormatPatch, reversed(to_export), reversed(revs))
Exemple #3
0
def cherry_pick():
    """Launch the 'Cherry-Pick' dialog."""
    revs, summaries = gitcmds.log_helper(all=True)
    commits = select_commits(N_("Cherry-Pick Commit"), revs, summaries, multiselect=False)
    if not commits:
        return
    cmds.do(cmds.CherryPick, commits)
Exemple #4
0
 def choose_commit(self, cmd):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits(N_("Select Commit"), revs, summaries, multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     cmds.do(cmd, sha1)
Exemple #5
0
 def choose_commit(self):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits('Select Commit Message', revs, summaries,
                            multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     self.load_previous_message(sha1)
Exemple #6
0
def cherry_pick():
    """Launch the 'Cherry-Pick' dialog."""
    revs, summaries = gitcmds.log_helper(all=True)
    commits = select_commits('Cherry-Pick Commit',
                             revs, summaries, multiselect=False)
    if not commits:
        return
    cola.notifier().broadcast(signals.cherry_pick, commits)
Exemple #7
0
def cherry_pick():
    """Launch the 'Cherry-Pick' dialog."""
    revs, summaries = gitcmds.log_helper(all=True)
    commits = select_commits(N_('Cherry-Pick Commit'),
                             revs, summaries, multiselect=False)
    if not commits:
        return
    cmds.do(cmds.CherryPick, commits)
Exemple #8
0
 def choose_commit(self, cmd):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits(N_('Select Commit'), revs, summaries,
                            multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     cmds.do(cmd, sha1)
Exemple #9
0
 def choose_commit(self):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits('Select Commit Message', revs, summaries,
                            multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     cmds.do(cmds.LoadPreviousMessage, sha1)
Exemple #10
0
def export_patches():
    """Run 'git format-patch' on a list of commits."""
    revs, summaries = gitcmds.log_helper()
    to_export = select_commits('Export Patches', revs, summaries)
    if not to_export:
        return
    to_export.reverse()
    revs.reverse()
    cola.notifier().broadcast(signals.format_patch, to_export, revs)
Exemple #11
0
def export_patches():
    """Run 'git format-patch' on a list of commits."""
    revs, summaries = gitcmds.log_helper()
    to_export = select_commits('Export Patches', revs, summaries)
    if not to_export:
        return
    to_export.reverse()
    revs.reverse()
    cola.notifier().broadcast(signals.format_patch, to_export, revs)
Exemple #12
0
 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]
     cola.difftool.launch([commit, "--"] + paths)
Exemple #13
0
def export_patches():
    """Run 'git format-patch' on a list of commits."""
    revs, summaries = gitcmds.log_helper()
    to_export = select_commits('Export Patches', revs, summaries)
    if not to_export:
        return
    to_export.reverse()
    revs.reverse()
    cmds.do(cmds.FormatPatch, to_export, revs)
Exemple #14
0
def export_patches():
    """Run 'git format-patch' on a list of commits."""
    revs, summaries = gitcmds.log_helper()
    to_export = select_commits(N_("Export Patches"), revs, summaries)
    if not to_export:
        return
    to_export.reverse()
    revs.reverse()
    cmds.do(cmds.FormatPatch, to_export, revs)
Exemple #15
0
 def choose_commit(self):
     revs, summaries = gitcmds.log_helper()
     sha1s = select_commits('Select Commit Message',
                            revs,
                            summaries,
                            multiselect=False)
     if not sha1s:
         return
     sha1 = sha1s[0]
     self.load_previous_message(sha1)
Exemple #16
0
 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)
Exemple #17
0
def cherry_pick():
    """Launch the 'Cherry-Pick' dialog."""
    revs, summaries = gitcmds.log_helper(all=True)
    commits = select_commits('Cherry-Pick Commit',
                             revs,
                             summaries,
                             multiselect=False)
    if not commits:
        return
    cola.notifier().broadcast(signals.cherry_pick, commits)