2007-01-24 22:24:01 +08:00
|
|
|
import py
|
2008-09-21 23:15:28 +08:00
|
|
|
from py.__.path.svn.testing.svntestbase import make_test_repo, getsvnbin
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
|
|
|
|
class TestMakeRepo(object):
|
|
|
|
def setup_class(cls):
|
2008-09-21 23:15:28 +08:00
|
|
|
getsvnbin()
|
2007-01-24 22:24:01 +08:00
|
|
|
cls.repo = make_test_repo()
|
|
|
|
cls.wc = py.path.svnwc(py.test.ensuretemp("test-wc").join("wc"))
|
|
|
|
|
|
|
|
def test_empty_checkout(self):
|
|
|
|
self.wc.checkout(self.repo)
|
|
|
|
assert len(self.wc.listdir()) == 0
|
|
|
|
|
|
|
|
def test_commit(self):
|
2007-02-08 03:52:14 +08:00
|
|
|
self.wc.checkout(self.repo)
|
2007-01-24 22:24:01 +08:00
|
|
|
p = self.wc.join("a_file")
|
|
|
|
p.write("test file")
|
|
|
|
p.add()
|
|
|
|
rev = self.wc.commit("some test")
|
|
|
|
assert p.info().rev == 1
|
|
|
|
assert rev == 1
|
|
|
|
rev = self.wc.commit()
|
|
|
|
assert rev is None
|
|
|
|
|