def test_create(self):
   """Make sure that repos.create doesn't segfault when we set fs-type
      using a config hash"""
   fs_config = { "fs-type": "fsfs" }
   for i in range(5):
     path = self.temper.alloc_empty_dir(suffix='-repository-create%d' % i)
     repos.create(path, "", "", None, fs_config)
Exemplo n.º 2
0
 def test_create(self):
     """Make sure that repos.create doesn't segfault when we set fs-type
    using a config hash"""
     fs_config = {"fs-type": "fsfs"}
     for i in range(5):
         path = self.temper.alloc_empty_dir(suffix='-repository-create%d' %
                                            i)
         repos.create(path, "", "", None, fs_config)
Exemplo n.º 3
0
 def test_create(self):
   """Make sure that repos.create doesn't segfault when we set fs-type
      using a config hash"""
   fs_config = { "fs-type": "fsfs" }
   for i in range(5):
     path = tempfile.mkdtemp("-test" + str(i))
     repos.create(path, "", "", None, fs_config)
     repos.delete(path)
Exemplo n.º 4
0
 def test_create(self):
     """Make sure that repos.create doesn't segfault when we set fs-type
    using a config hash"""
     fs_config = {"fs-type": "fsfs"}
     for i in range(5):
         path = tempfile.mkdtemp("-test" + str(i))
         repos.create(path, "", "", None, fs_config)
         repos.delete(path)
Exemplo n.º 5
0
    def create(self, repos_name):
        repos_name = repos_name.strip()
        assert repos_name != ""

        repos_path = "%(root)s/%(entry)s" % { "root": self.repos_root, "entry": repos_name}
        if os.path.exists(repos_path):
            raise Exception, _("Repos %s already exists.") % repos_name
        from svn import repos as _repos
        if isinstance(repos_path, unicode):
            repos_path = repos_path.encode('utf-8')
        _repos.create(repos_path, "", "", None, { "fs-type": "fsfs" })
        self.hooks_init(repos_name)
Exemplo n.º 6
0
 def alloc_empty_repo(self, suffix=""):
     """Create an empty repository. Returns a tuple of its handle, path and
    file: URI in canonical internal form."""
     temp_path = tempfile.mkdtemp(suffix)
     repo_path = core.svn_dirent_internal_style(temp_path)
     repo_uri = core.svn_uri_canonicalize(file_uri_for_path(temp_path))
     handle = repos.create(repo_path, None, None, None, None)
     self._cleanup_list.append((repo_path, repos.svn_repos_delete))
     return (handle, repo_path, repo_uri)
Exemplo n.º 7
0
 def alloc_empty_repo(self, suffix = ""):
   """Create an empty repository. Returns a tuple of its handle, path and
      file: URI in canonical internal form."""
   temp_path = tempfile.mkdtemp(suffix)
   repo_path = core.svn_dirent_internal_style(temp_path)
   repo_uri = core.svn_uri_canonicalize(file_uri_for_path(temp_path))
   handle = repos.create(repo_path, None, None, None, None)
   self._cleanup_list.append((repo_path, repos.svn_repos_delete))
   return (handle, repo_path, repo_uri)