Beispiel #1
0
def getrepowc(reponame="basetestrepo", wcname="wc"):
    repo = py.test.ensuretemp(reponame)
    wcdir = py.test.ensuretemp(wcname)
    if not repo.listdir():
        # assert not wcdir.check()
        repo.ensure(dir=1)
        py.process.cmdexec('svnadmin create "%s"' % svncommon._escape_helper(repo))
        py.process.cmdexec('svnadmin load -q "%s" <"%s"' % (svncommon._escape_helper(repo), repodump))
        print "created svn repository", repo
        wcdir.ensure(dir=1)
        wc = py.path.svnwc(wcdir)
        if py.std.sys.platform == "win32":
            repo = "/" + str(repo).replace("\\", "/")
        wc.checkout(url="file://%s" % repo)
        print "checked out new repo into", wc
    else:
        print "using repository at", repo
        wc = py.path.svnwc(wcdir)
    return ("file://%s" % repo, wc)
Beispiel #2
0
def getrepowc(reponame='basetestrepo', wcname='wc'):
    repo = py.test.ensuretemp(reponame)
    wcdir = py.test.ensuretemp(wcname)
    if not repo.listdir():
        #assert not wcdir.check()
        repo.ensure(dir=1)
        py.process.cmdexec('svnadmin create "%s"' %
                           svncommon._escape_helper(repo))
        py.process.cmdexec('svnadmin load -q "%s" <"%s"' %
                           (svncommon._escape_helper(repo), repodump))
        print "created svn repository", repo
        wcdir.ensure(dir=1)
        wc = py.path.svnwc(wcdir)
        if py.std.sys.platform == 'win32':
            repo = '/' + str(repo).replace('\\', '/')
        wc.checkout(url='file://%s' % repo)
        print "checked out new repo into", wc
    else:
        print "using repository at", repo
        wc = py.path.svnwc(wcdir)
    return ("file://%s" % repo, wc)
Beispiel #3
0
 def setup_class(cls):
     repo = py.test.ensuretemp("emptyrepo")
     wcdir = py.test.ensuretemp("emptywc")
     py.process.cmdexec('svnadmin create "%s"' %
             svncommon._escape_helper(repo))
     wc = py.path.svnwc(wcdir)
     repopath = repo.strpath
     if py.std.sys.platform.startswith('win32'):
         # strange win problem, paths become something like file:///c:\\foo
         repourl = 'file:///%s' % (repopath.replace('\\', '/'),)
     else:
         repourl = 'file://%s' % (repopath,)
     wc.checkout(url=repourl)
     cls.wc = wc
Beispiel #4
0
 def setup_class(cls):
     repo = py.test.ensuretemp("emptyrepo")
     wcdir = py.test.ensuretemp("emptywc")
     py.process.cmdexec('svnadmin create "%s"' %
             svncommon._escape_helper(repo))
     wc = py.path.svnwc(wcdir)
     repopath = repo.strpath
     if py.std.sys.platform.startswith('win32'):
         # strange win problem, paths become something like file:///c:\\foo
         repourl = 'file:///%s' % (repopath.replace('\\', '/'),)
     else:
         repourl = 'file://%s' % (repopath,)
     wc.checkout(url=repourl)
     cls.wc = wc
 def _escape(self, cmd):
     return svncommon._escape_helper(cmd)
Beispiel #6
0
 def _escape(self, cmd):
     return svncommon._escape_helper(cmd)