Commit 6472fc49 authored by Kai Willadsen's avatar Kai Willadsen

vc: Update svn and hg for new-style add() command, remove old one

parent b5f0a34d
......@@ -121,9 +121,6 @@ class Vc(object):
self._tree_cache = {}
self._tree_meta_cache = {}
def remove_command(self, force=0):
raise NotImplementedError()
def revert_command(self):
raise NotImplementedError()
......
......@@ -59,8 +59,9 @@ class Vc(_vc.Vc):
command = [self.CMD, 'add']
runner(command, files, refresh=True, working_dir=self.root)
def remove_command(self, force=0):
return [self.CMD, "rm"]
def remove(self, runner, files):
command = [self.CMD, 'rm']
runner(command, files, refresh=True, working_dir=self.root)
def revert_command(self):
return [self.CMD, "revert"]
......
......@@ -60,8 +60,10 @@ class Vc(_vc.Vc):
command = [self.CMD, 'update']
runner(command, [], refresh=True, working_dir=self.root)
def remove_command(self, force=0):
return [self.CMD,"rm","--force"]
def remove(self, runner, files):
command = [self.CMD, 'rm', '--force']
runner(command, files, refresh=True, working_dir=self.root)
def revert_command(self):
return [self.CMD,"revert"]
......
......@@ -159,8 +159,8 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
"VcUpdate": ("update", (lambda *args, **kwargs: None, )),
"VcPush": ("push", (lambda *args, **kwargs: None, )),
"VcAdd": ("add", (lambda *args, **kwargs: None, [])),
"VcRemove": ("remove", (lambda *args, **kwargs: None, [])),
"VcResolved": ("resolve", (lambda *args, **kwargs: None, [])),
"VcRemove": ("remove_command", ()),
"VcRevert": ("revert_command", ()),
}
......@@ -725,10 +725,7 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
if response != Gtk.ResponseType.OK:
return
try:
self.vc.remove(self._command, selected)
except NotImplementedError:
self._command_on_selected(self.vc.remove_command())
self.vc.remove(self._command, selected)
def on_button_resolved_clicked(self, obj):
self.vc.resolve(self._command, self._get_selected_files())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment