Exemple #1
0
def created_rev(svnrepos, full_name, rev):
    kind = ra.svn_ra_check_path(svnrepos.ra_session, full_name, rev,
                                svnrepos.pool)
    if kind == core.svn_node_dir:
        props = ra.svn_ra_get_dir(svnrepos.ra_session, full_name, rev,
                                  svnrepos.pool)
        return int(props[core.SVN_PROP_ENTRY_COMMITTED_REV])
    return core.SVN_INVALID_REVNUM
Exemple #2
0
def created_rev(svnrepos, full_name, rev):
  kind = ra.svn_ra_check_path(svnrepos.ra_session, full_name, rev,
                              svnrepos.pool)
  if kind == core.svn_node_dir:
    props = ra.svn_ra_get_dir(svnrepos.ra_session, full_name,
                              rev, svnrepos.pool)
    return int(props[core.SVN_PROP_ENTRY_COMMITTED_REV])
  return core.SVN_INVALID_REVNUM
 def created_rev(self, path, rev):
   # NOTE: We can't use svn_client_propget here because the
   # interfaces in that layer strip out the properties not meant for
   # human consumption (such as svn:entry:committed-rev, which we are
   # using here to get the created revision of PATH@REV).
   kind = ra.svn_ra_check_path(self.ra_session, path, rev)
   if kind == core.svn_node_none:
     raise vclib.ItemNotFound(_path_parts(path))
   elif kind == core.svn_node_dir:
     props = get_directory_props(self.ra_session, path, rev)
   elif kind == core.svn_node_file:
     fetched_rev, props = ra.svn_ra_get_file(self.ra_session, path, rev, None)
   return int(props.get(core.SVN_PROP_ENTRY_COMMITTED_REV,
                        SVN_INVALID_REVNUM))
Exemple #4
0
 def created_rev(self, path, rev):
     # NOTE: We can't use svn_client_propget here because the
     # interfaces in that layer strip out the properties not meant for
     # human consumption (such as svn:entry:committed-rev, which we are
     # using here to get the created revision of PATH@REV).
     kind = ra.svn_ra_check_path(self.ra_session, path, rev)
     if kind == core.svn_node_none:
         raise vclib.ItemNotFound(_path_parts(path))
     elif kind == core.svn_node_dir:
         props = get_directory_props(self.ra_session, path, rev)
     elif kind == core.svn_node_file:
         fetched_rev, props = ra.svn_ra_get_file(self.ra_session, path, rev,
                                                 None)
     return int(
         props.get(core.SVN_PROP_ENTRY_COMMITTED_REV, SVN_INVALID_REVNUM))
Exemple #5
0
 def itemtype(self, path_parts, rev):
     pathtype = None
     if not len(path_parts):
         pathtype = vclib.DIR
     else:
         path = self._getpath(path_parts)
         rev = self._getrev(rev)
         try:
             kind = ra.svn_ra_check_path(self.ra_session, path, rev)
             pathtype = _kind2type(kind)
         except Exception:
             pass
     if pathtype is None:
         raise vclib.ItemNotFound(path_parts)
     if not vclib.check_path_access(self, path_parts, pathtype, rev):
         raise vclib.ItemNotFound(path_parts)
     return pathtype
 def itemtype(self, path_parts, rev):
   pathtype = None
   if not len(path_parts):
     pathtype = vclib.DIR
   else:
     path = self._getpath(path_parts)
     rev = self._getrev(rev)
     try:
       kind = ra.svn_ra_check_path(self.ra_session, path, rev)
       if kind == core.svn_node_file:
         pathtype = vclib.FILE
       elif kind == core.svn_node_dir:
         pathtype = vclib.DIR
     except:
       pass
   if pathtype is None:
     raise vclib.ItemNotFound(path_parts)
   if not vclib.check_path_access(self, path_parts, pathtype, rev):
     raise vclib.ItemNotFound(path_parts)
   return pathtype
Exemple #7
0
 def itemtype(self, path_parts, rev):
     pathtype = None
     if not len(path_parts):
         pathtype = vclib.DIR
     else:
         path = self._getpath(path_parts)
         rev = self._getrev(rev)
         try:
             kind = ra.svn_ra_check_path(self.ra_session, path, rev)
             if kind == core.svn_node_file:
                 pathtype = vclib.FILE
             elif kind == core.svn_node_dir:
                 pathtype = vclib.DIR
         except:
             pass
     if pathtype is None:
         raise vclib.ItemNotFound(path_parts)
     if not vclib.check_path_access(self, path_parts, pathtype, rev):
         raise vclib.ItemNotFound(path_parts)
     return pathtype