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)
예제 #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)
예제 #3
0
파일: repository.py 프로젝트: vocho/openqnx
 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)
예제 #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)
예제 #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)
예제 #6
0
파일: utils.py 프로젝트: sleepingwit/jal123
 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)
예제 #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)