Commit 555418ab authored by Kai Willadsen's avatar Kai Willadsen

vc: Update other version control systems to new commit API

Apparently nothing except Git wants to support files arguments for the
commit command. This seems very wrong, but I'm not changing it here and
now.
parent b7683de8
......@@ -88,12 +88,14 @@ class Vc(_vc.Vc):
''.join(state_2_map.keys()),
''.join(state_3_map.keys()),)
def commit_command(self, message):
return [self.CMD] + self.CMDARGS + ["commit", "-m", message]
def add_command(self):
return [self.CMD] + self.CMDARGS + ["add"]
def commit(self, runner, files, message):
fullcmd = [self.CMD] + self.CMDARGS
command = [fullcmd, 'commit', '-m', message]
runner(command, [], refresh=True, working_dir=self.root)
def revert(self, runner, files):
runner(
[self.CMD] + self.CMDARGS + ["revert"] + files, [], refresh=True,
......
......@@ -47,8 +47,9 @@ class Vc(_vc.Vc):
"R": _vc.STATE_REMOVED,
}
def commit_command(self, message):
return [self.CMD, "commit", "-m", message]
def commit(self, runner, files, message):
command = [self.CMD, 'commit', '-m', message]
runner(command, [], refresh=True, working_dir=self.root)
def update_command(self):
return [self.CMD, "update"]
......
......@@ -52,8 +52,9 @@ class Vc(_vc.Vc):
"conflicted": _vc.STATE_CONFLICT,
}
def commit_command(self, message):
return [self.CMD,"commit","-m",message]
def commit(self, runner, files, message):
command = [self.CMD, 'commit', '-m', message]
runner(command, [], refresh=True, working_dir=self.root)
def update_command(self):
return [self.CMD,"update"]
......
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