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

APR Changes to apr_stat and apr_getfileinfo

From: Kevin Pilch-Bisson <kevin_at_pilch-bisson.net>
Date: 2001-01-22 17:41:05 CET

Hi All,

I did a CVS update today, and noticed that the APR interface has changed
for apr_stat and apr_getfileinfo to accept an argument for what info
should be returned. I changed the three files to retrieve the normal
information you would expect from a unix stat call. Here is the diff:

Index: libsvn_subr/io.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_subr/io.c,v
retrieving revision 1.26
diff -u -p -r1.26 io.c
--- libsvn_subr/io.c 2000/12/24 12:52:59 1.26
+++ libsvn_subr/io.c 2001/01/22 16:42:03
@@ -44,7 +44,7 @@ svn_io_check_path (const svn_string_t *p
   apr_finfo_t finfo;
   apr_status_t apr_err;
 
- apr_err = apr_stat (&finfo, path->data, pool);
+ apr_err = apr_stat (&finfo, path->data, APR_FINFO_NORM, pool);
 
   if (apr_err && !APR_STATUS_IS_ENOENT(apr_err))
     return svn_error_createf (apr_err, 0, NULL, pool,
@@ -198,7 +198,7 @@ apr_transfer_file_contents (const char *
     return apr_err;
   
   /* Get its size. */
- apr_err = apr_getfileinfo (&finfo, s);
+ apr_err = apr_getfileinfo (&finfo, APR_FINFO_NORM, s);
   if (apr_err)
     {
       apr_close (s); /* toss any error */
@@ -354,7 +354,7 @@ svn_io_file_affected_time (apr_time_t *a
   apr_finfo_t finfo;
   apr_status_t apr_err;
 
- apr_err = apr_stat (&finfo, path->data, pool);
+ apr_err = apr_stat (&finfo, path->data, APR_FINFO_NORM, pool);
   if (apr_err)
     return svn_error_createf
       (apr_err, 0, NULL, pool,
Index: libsvn_wc/log.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_wc/log.c,v
retrieving revision 1.80
diff -u -p -r1.80 log.c
--- libsvn_wc/log.c 2001/01/08 23:06:34 1.80
+++ libsvn_wc/log.c 2001/01/22 16:42:04
@@ -474,7 +474,7 @@ log_do_detect_conflict (struct log_runne
   full_path = svn_string_dup (loggy->path, loggy->pool);
   svn_path_add_component_nts (full_path, rejfile, svn_path_local_style);
 
- apr_err = apr_stat (&finfo, full_path->data, loggy->pool);
+ apr_err = apr_stat (&finfo, full_path->data, APR_FINFO_NORM, loggy->pool);
   if (apr_err)
     return svn_error_createf (apr_err, 0, NULL, loggy->pool,
                               "log_do_detect_conflict: couldn't stat %s",
@@ -737,7 +737,7 @@ conflict_if_rejfile (svn_string_t *paren
     {
       apr_status_t apr_err;
       apr_finfo_t finfo;
- apr_err = apr_stat (&finfo, rejfile_full_path->data, pool);
+ apr_err = apr_stat (&finfo, rejfile_full_path->data, APR_FINFO_NORM, pool);
       
       if (! APR_STATUS_IS_SUCCESS (apr_err))
         return svn_error_createf
Index: libsvn_wc/questions.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_wc/questions.c,v
retrieving revision 1.45
diff -u -p -r1.45 questions.c
--- libsvn_wc/questions.c 2001/01/11 21:29:24 1.45
+++ libsvn_wc/questions.c 2001/01/22 16:42:04
@@ -201,7 +201,7 @@ filesizes_definitely_different_p (svn_bo
   apr_status_t status;
 
   /* Stat both files */
- status = apr_stat (&finfo1, filename1->data, pool);
+ status = apr_stat (&finfo1, filename1->data, APR_FINFO_NORM, pool);
   if (status)
     {
       /* If we got an error stat'ing a file, it could be because the
@@ -212,7 +212,7 @@ filesizes_definitely_different_p (svn_bo
       return SVN_NO_ERROR;
     }
 
- status = apr_stat (&finfo2, filename2->data, pool);
+ status = apr_stat (&finfo2, filename2->data, APR_FINFO_NORM, pool);
   if (status)
     {
       /* See previous comment. */

-- 
>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson
kevin@pilch-bisson.net
http://www.pilch-bisson.net

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:19 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.