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

[PATCH] Move up declaration of svn_wc_adm_access_t?

From: Justin Erenkrantz <jerenkrantz_at_apache.org>
Date: 2002-07-11 19:58:54 CEST

Would anyone have a problem if I move the svn_wc_adm_access_t
declaration and functions to the top of svn_wc.h? In order to use
the baton in svn_wc calls, it has to be declared first. -- justin

Index: ./subversion/include/svn_wc.h
===================================================================
--- ./subversion/include/svn_wc.h
+++ ./subversion/include/svn_wc.h 2002-07-11 10:55:48.000000000 -0700
@@ -50,6 +50,84 @@
 #endif /* __cplusplus */
 
 
+/*** Locking/Opening/Closing ***/
+
+/* ### Should this type be opaque in the public interface? */
+typedef struct svn_wc_adm_access_t
+{
+ /* PATH to directory which contains the administrative area */
+ const char *path;
+
+ enum svn_wc_adm_access_type {
+
+ /* SVN_WC_ADM_ACCESS_UNLOCKED indicates no lock is held allowing
+ read-only access without cacheing. */
+ svn_wc_adm_access_unlocked,
+
+#if 0
+ /* ### If read-only operations are allowed sufficient write access to
+ ### create read locks (did you follow that?) then entries cacheing
+ ### could apply to read-only operations as well. This would
+ ### probably want to fall back to unlocked access if the
+ ### filesystem permissions prohibit writing to the administrative
+ ### area (consider running svn_wc_status on some other user's
+ ### working copy). */
+
+ /* SVN_WC_ADM_ACCESS_READ_LOCK indicates that read-only access and
+ cacheing are allowed. */
+ svn_wc_adm_access_read_lock,
+#endif
+
+ /* SVN_WC_ADM_ACCESS_WRITE_LOCK indicates that read-write access and
+ cacheing are allowed. */
+ svn_wc_adm_access_write_lock
+
+ } type;
+
+ /* LOCK_EXISTS is set TRUE when the write lock exists */
+ svn_boolean_t lock_exists;
+
+#if 0
+ /* ENTRIES_MODIFED is set TRUE when the entries cached in ENTRIES have
+ been modified from the original values read from the file. */
+ svn_boolean_t entries_modified;
+
+ /* Once the 'entries' file has been read, ENTRIES will cache the
+ contents if this access baton has an appropriate lock. Otherwise
+ ENTRIES will be NULL. */
+ apr_hash_t *entries;
+#endif
+
+ /* POOL is used to allocate cached items, they need to persist for the
+ lifetime of this access baton */
+ apr_pool_t *pool;
+
+} svn_wc_adm_access_t;
+
+/* Return an access baton in ADM_ACCESS for the working copy administrative
+ area associated with the directory PATH. If WRITE_LOCK is set the baton
+ will include a write lock, otherwise the baton can only be used for read
+ access. POOL will be used to allocate the baton and any subsequently
+ cached items. */
+svn_error_t *svn_wc_adm_open (svn_wc_adm_access_t **adm_access,
+ const char *path,
+ svn_boolean_t write_lock,
+ apr_pool_t *pool);
+
+/* Give up the access baton ADM_ACCESS, and its lock if any */
+svn_error_t *svn_wc_adm_close (svn_wc_adm_access_t *adm_access);
+
+/* Ensure ADM_ACCESS has a write lock, and that the lock file still
+ exists. Returns SVN_ERR_WC_NOT_LOCKED if this is not the case. */
+svn_error_t *svn_wc_adm_write_check (svn_wc_adm_access_t *adm_access);
+
+/* Set *LOCKED to non-zero if PATH is locked, else set it to zero. */
+svn_error_t *svn_wc_locked (svn_boolean_t *locked,
+ const char *path,
+ apr_pool_t *pool);
+
+
+
 /*** Notification/callback handling. ***/
 
 /* In many cases, the WC library will scan a working copy and making
@@ -1470,84 +1548,6 @@
 
 
 
-/*** Locking/Opening/Closing ***/
-
-/* ### Should this type be opaque in the public interface? */
-typedef struct svn_wc_adm_access_t
-{
- /* PATH to directory which contains the administrative area */
- const char *path;
-
- enum svn_wc_adm_access_type {
-
- /* SVN_WC_ADM_ACCESS_UNLOCKED indicates no lock is held allowing
- read-only access without cacheing. */
- svn_wc_adm_access_unlocked,
-
-#if 0
- /* ### If read-only operations are allowed sufficient write access to
- ### create read locks (did you follow that?) then entries cacheing
- ### could apply to read-only operations as well. This would
- ### probably want to fall back to unlocked access if the
- ### filesystem permissions prohibit writing to the administrative
- ### area (consider running svn_wc_status on some other user's
- ### working copy). */
-
- /* SVN_WC_ADM_ACCESS_READ_LOCK indicates that read-only access and
- cacheing are allowed. */
- svn_wc_adm_access_read_lock,
-#endif
-
- /* SVN_WC_ADM_ACCESS_WRITE_LOCK indicates that read-write access and
- cacheing are allowed. */
- svn_wc_adm_access_write_lock
-
- } type;
-
- /* LOCK_EXISTS is set TRUE when the write lock exists */
- svn_boolean_t lock_exists;
-
-#if 0
- /* ENTRIES_MODIFED is set TRUE when the entries cached in ENTRIES have
- been modified from the original values read from the file. */
- svn_boolean_t entries_modified;
-
- /* Once the 'entries' file has been read, ENTRIES will cache the
- contents if this access baton has an appropriate lock. Otherwise
- ENTRIES will be NULL. */
- apr_hash_t *entries;
-#endif
-
- /* POOL is used to allocate cached items, they need to persist for the
- lifetime of this access baton */
- apr_pool_t *pool;
-
-} svn_wc_adm_access_t;
-
-/* Return an access baton in ADM_ACCESS for the working copy administrative
- area associated with the directory PATH. If WRITE_LOCK is set the baton
- will include a write lock, otherwise the baton can only be used for read
- access. POOL will be used to allocate the baton and any subsequently
- cached items. */
-svn_error_t *svn_wc_adm_open (svn_wc_adm_access_t **adm_access,
- const char *path,
- svn_boolean_t write_lock,
- apr_pool_t *pool);
-
-/* Give up the access baton ADM_ACCESS, and its lock if any */
-svn_error_t *svn_wc_adm_close (svn_wc_adm_access_t *adm_access);
-
-/* Ensure ADM_ACCESS has a write lock, and that the lock file still
- exists. Returns SVN_ERR_WC_NOT_LOCKED if this is not the case. */
-svn_error_t *svn_wc_adm_write_check (svn_wc_adm_access_t *adm_access);
-
-/* Set *LOCKED to non-zero if PATH is locked, else set it to zero. */
-svn_error_t *svn_wc_locked (svn_boolean_t *locked,
- const char *path,
- apr_pool_t *pool);
-
-
-
 /*** Text/Prop Deltas Using an Editor ***/
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 11 19:59:23 2002

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.