[meld] Support unused remove and resolved new-style commands
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] Support unused remove and resolved new-style commands
- Date: Mon, 3 Jun 2013 20:03:22 +0000 (UTC)
commit 0ea42af07a6712b72d320d676119f8f2f94754d8
Author: Kai Willadsen <kai willadsen gmail com>
Date: Thu May 30 07:01:13 2013 +1000
Support unused remove and resolved new-style commands
meld/vc/_vc.py | 6 ++++++
meld/vcview.py | 10 ++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/meld/vc/_vc.py b/meld/vc/_vc.py
index dbe7f38..23effff 100644
--- a/meld/vc/_vc.py
+++ b/meld/vc/_vc.py
@@ -164,6 +164,12 @@ class Vc(object):
def revert(self, runner, files):
raise NotImplementedError()
+ def remove(self, runner, files):
+ raise NotImplementedError()
+
+ def resolve(self, runner, files):
+ raise NotImplementedError()
+
def get_path_for_repo_file(self, path, commit=None):
"""Returns a file path for the repository path at commit
diff --git a/meld/vcview.py b/meld/vcview.py
index dc7d3bd..a24cf63 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -794,10 +794,16 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
self._command_on_selected(self.vc.add_command())
def on_button_remove_clicked(self, obj):
- self._command_on_selected(self.vc.remove_command())
+ try:
+ self.vc.remove(self._command, self._get_selected_files())
+ except NotImplementedError:
+ self._command_on_selected(self.vc.remove_command())
def on_button_resolved_clicked(self, obj):
- self._command_on_selected(self.vc.resolved_command())
+ try:
+ self.vc.resolve(self._command, self._get_selected_files())
+ except NotImplementedError:
+ self._command_on_selected(self.vc.resolved_command())
def on_button_revert_clicked(self, obj):
try:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]