Example #1
0
 def _on_diff3_clicked(self, widget):
     """ Launch external utility to resolve conflicts. """
     self._set_diff3(self._entry_diff3.get_text())
     selected = self._get_selected_file()
     if selected is None:
         error_dialog(_i18n('No file was selected'),
                      _i18n('Please select a file from the list.'))
         return
     elif self._get_selected_type() == 'text conflict':
         base = self.wt.abspath(selected) + '.BASE'
         this = self.wt.abspath(selected) + '.THIS'
         other = self.wt.abspath(selected) + '.OTHER'
         try:
             p = subprocess.Popen([ self._entry_diff3.get_text(), base, this, other ])
             p.wait()
         except OSError, e:
             warning_dialog(_i18n('Call to external utility failed'), str(e))
Example #2
0
 def _conflicts(self):
     warning_dialog(_i18n('Conflicts encountered'),
                    _i18n('Please resolve the conflicts manually'
                          ' before committing.'))
Example #3
0
        """ Return the type of the selected conflict. """
        treeselection = self._treeview.get_selection()
        (model, iter) = treeselection.get_selected()
        
        if iter is None:
            return None
        else:
            return model.get_value(iter, 2)
    
    def _on_diff3_clicked(self, widget):
        """ Launch external utility to resolve conflicts. """
        self._set_diff3(self._entry_diff3.get_text())
        selected = self._get_selected_file()
        if selected is None:
            error_dialog(_i18n('No file was selected'),
                         _i18n('Please select a file from the list.'))
            return
        elif self._get_selected_type() == 'text conflict':
            base = self.wt.abspath(selected) + '.BASE'
            this = self.wt.abspath(selected) + '.THIS'
            other = self.wt.abspath(selected) + '.OTHER'
            try:
                p = subprocess.Popen([ self._entry_diff3.get_text(), base, this, other ])
                p.wait()
            except OSError, e:
                warning_dialog(_i18n('Call to external utility failed'), str(e))
        else:
            warning_dialog(_i18n('Cannot resolve conflict'),
                           _i18n('Only conflicts on the text of files can be resolved with Olive at the moment. Content conflicts, on the structure of the tree, need to be resolved using the command line.'))
            return