[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RA existence check?

From: <cmpilato_at_collab.net>
Date: 2001-11-19 19:07:08 CET

Looking at this basic plan for performing copies:

   if (not exist src_path)
     return ERR_BAD_SRC error
   if (exist dst_path)
     {
       if (dst_path is directory)
         copy src_path into dst_path as basename (src_path)
       else
         return ERR_OBSTRUCTION error
     }
   else
     {
       if (not exist parent_of_dst_path)
         return ERR_BAD_DST error
       else
         copy src_path into parent_of_dst_path as basename (dst_path)
     }
   if (this is a move)
     delete src_path

An RA-layer existence/node-kind check of some sort is necessary.
You know, maybe something like:

   ra->get_node_kind (enum svn_node_kind *kind,
                      svn_string_t *url,
                      svn_revnum_t revision,
                      apr_pool_t *pool);

Where a node kind of svn_node_none would indicate non-existence.
GregS, is there an efficient way to do this in RA_DAV, or are we
talking about a custom REPORT/response couplet here?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:49 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.