def get_location(self, path, rev, old_rev):
   try:
     results = ra.get_locations(self.ra_session, path, rev, [old_rev])
   except core.SubversionException, e:
     _fix_subversion_exception(e)
     if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
       raise vclib.ItemNotFound(path)
     raise
Exemple #2
0
def get_location(svnrepos, path, rev, old_rev):
    try:
        results = ra.get_locations(svnrepos.ra_session, path, rev, [old_rev],
                                   svnrepos.pool)
    except core.SubversionException, e:
        if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
            raise vclib.ItemNotFound(path)
        raise
Exemple #3
0
 def get_location(self, path, rev, old_rev):
     try:
         results = ra.get_locations(self.ra_session, path, rev, [old_rev])
     except core.SubversionException, e:
         _fix_subversion_exception(e)
         if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
             raise vclib.ItemNotFound(path)
         raise
Exemple #4
0
 def test_get_locations(self):
     locations = ra.get_locations(self.ra_ctx, "trunk/README.txt", 2,
                                  list(range(1, 5)))
     self.assertEqual(locations, {
         2: '/trunk/README.txt',
         3: '/trunk/README.txt',
         4: '/trunk/README.txt'
     })
Exemple #5
0
def get_location(svnrepos, path, rev, old_rev):
  try:
    results = ra.get_locations(svnrepos.ra_session, path, rev,
                               [old_rev], svnrepos.pool)
  except core.SubversionException, e:
    if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
      raise vclib.ItemNotFound(path)
    raise
Exemple #6
0
 def get_location(self, path, rev, old_rev):
   try:
     results = ra.get_locations(self.ra_session, path, rev, [old_rev])
   except core.SubversionException as e:
     if e.apr_err == core.SVN_ERR_FS_NOT_FOUND:
       raise vclib.ItemNotFound(path)
     raise
   try:
     old_path = results[old_rev]
   except KeyError:
     raise vclib.ItemNotFound(path)
   old_path = _cleanup_path(_to_str(old_path))
   old_path_parts = _path_parts(old_path)
   # Check access (lying about path types)
   if not vclib.check_path_access(self, old_path_parts, vclib.FILE, old_rev):
     raise vclib.ItemNotFound(path)
   return old_path
Exemple #7
0
 def test_get_locations(self):
   locations = ra.get_locations(self.ra_ctx, "trunk/README.txt", 2, range(1,5))
   self.assertEqual(locations, {
       2: '/trunk/README.txt',
       3: '/trunk/README.txt',
       4: '/trunk/README.txt'})
Exemple #8
0
 def test_get_locations(self):
     locations = ra.get_locations(self.ra_ctx, "trunk/README.txt", 2, list(range(1, 5)))
     self.assertEqual(locations, {2: "/trunk/README.txt", 3: "/trunk/README.txt", 4: "/trunk/README.txt"})