Example #1
0
    def panel_followup(self, picked_status, picked_file, picked_index):
        # split out solely so I can override it for laughs

        s = sublime.load_settings("Svn.sublime-settings")
        root = svn_root(self.get_working_dir())
        if picked_status == '??' or s.get('status_opens_file') or self.force_open:
            if(os.path.isfile(os.path.join(root, picked_file))):
                self.window.open_file(os.path.join(root, picked_file))
        else:
            self.run_command(['svn', 'diff', '--no-color', '--', picked_file.strip('"')],
                self.diff_done, working_dir=root)
Example #2
0
 def run(self, view):
     # If the annotations are already running, we dont have to create a new
     # tmpfile
     if hasattr(self, "tmp"):
         self.compare_tmp(None)
         return
     self.tmp = tempfile.NamedTemporaryFile()
     self.active_view().settings().set('live_svn_annotations', True)
     root = svn_root(self.get_working_dir())
     repo_file = os.path.relpath(self.view.file_name(), root)
     self.run_command(['svn', 'show', 'HEAD:{0}'.format(repo_file)], show_status=False, no_save=True, callback=self.compare_tmp, stdout=self.tmp)
Example #3
0
    def panel_followup(self, picked_status, picked_file, picked_index):
        working_dir = svn_root(self.get_working_dir())

        if picked_index == 0:
            command = ['svn', 'add', '*', '--force']
        elif picked_index == 1:
            command = ['svn', 'add', '*', '--force']
        else:
            command = ['svn']
            picked_file = picked_file.strip('"')
            if os.path.isfile(working_dir + "/" + picked_file):
                command += ['add']
            else:
                command += ['rm']
            command += ['--', picked_file]

        self.run_command(command, self.rerun,
            working_dir=working_dir)