Verified Commit c6ff85c9 authored by Loïc Dachary's avatar Loïc Dachary
Browse files

dvcs: commit all changed files

parent bb5d5e10
......@@ -95,6 +95,6 @@ class Git(DVCS):
self.g.checkout(branch)
self.g.push("--force", "origin", branch)
def commit(self, message, *pathnames):
self.g.add(*pathnames)
def commit(self, message):
self.g.add("--all")
self.g.commit("-m", message)
......@@ -76,8 +76,8 @@ class Hg(DVCS):
def push(self, branch):
self.h.push("--branch", branch)
def commit(self, message, *pathnames):
self.h.add(*pathnames)
def commit(self, message):
self.h.add(".")
self.h.commit("-m", message)
def _branch_exists(self, branch):
......
......@@ -37,7 +37,7 @@ def test_dvcs_commit(dvcs, tmpdir):
assert dvcs.clone("master") is True
content = "C"
open(f"{dvcs.directory}/README.md", "w").write(content)
dvcs.commit("message", "README.md")
dvcs.commit("message")
dvcs.push("master")
DVCS = type(dvcs)
......@@ -51,7 +51,7 @@ def test_dvcs_log(dvcs, tmpdir):
hash1 = dvcs.hash
content = "C"
open(f"{dvcs.directory}/README.md", "w").write(content)
dvcs.commit("message", "README.md")
dvcs.commit("message")
dvcs.push("master")
hash0 = dvcs.hash
log = dvcs.log()
......@@ -67,7 +67,7 @@ def test_dvcs_push_pull(dvcs, tmpdir):
assert other_dvcs.clone("master") is True
content = "C"
open(f"{other_dvcs.directory}/README.md", "w").write(content)
other_dvcs.commit("message", "README.md")
other_dvcs.commit("message")
other_dvcs.push("master")
dvcs.pull("master")
......
......@@ -78,7 +78,7 @@ class Fedeproxy(object):
d.clone(branch)
p.save(d.directory)
issues_path = f"{namespace}/{project}/issues.json"
d.commit("exported project", issues_path)
d.commit("exported project")
d.push(branch)
return f"{d.directory}/{issues_path}"
......
......@@ -50,5 +50,5 @@ class DVCS(abc.ABC):
...
@abc.abstractmethod
def commit(self, message, *pathnames):
def commit(self, message):
...
......@@ -155,7 +155,7 @@ class HookCommitTests(HookTestsBase):
d.clone("master")
filename = f"{directory}/README"
open(filename, "w").write("SOME")
d.commit("add README", "README")
d.commit("add README")
d.push("master")
def predicate(payload):
......
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