Exemplo n.º 1
0
    def diff_done(self, result):
        settings = sublime.load_settings("Svn.sublime-settings")
        historySize = settings.get('history_size')

        def format(line):
            return '# ' + line.replace("\n", " ")

        if not len(self.lines):
            self.lines = ["", ""]

        self.lines.extend(map(format, history[:historySize]))
        self.lines.extend([
            "# --------------",
            "# Please enter the commit message for your changes. Everything below",
            "# this paragraph is ignored, and an empty message aborts the commit.",
            "# Just close the window to accept your message.",
            result.strip()
        ])
        template = "\n".join(self.lines)
        msg = self.window.new_file()
        msg.set_scratch(True)
        msg.set_name("COMMIT_EDITMSG")
        self._output_to_view(msg, template, syntax=plugin_file("syntax/Svn Commit Message.tmLanguage"))
        msg.sel().clear()
        msg.sel().add(sublime.Region(0, 0))
        SvnCommitCommand.active_message = self
Exemplo n.º 2
0
 def blame_done(self, result, position=None):
     self.scratch(result, title="Svn Blame", position=position,
             syntax=plugin_file("syntax/Svn Blame.tmLanguage"))
Exemplo n.º 3
0
 def details_done(self, result):
     self.scratch(result, title="Svn Commit Details", syntax=plugin_file("syntax/Svn Commit Message.tmLanguage"))
Exemplo n.º 4
0
 def log_done(self, result):
     self.scratch(result, title="Svn Log Graph", syntax=plugin_file("syntax/Svn Graph.tmLanguage"))