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

Re: Fwd: Subversion AppleDouble patch updated to 1.5.0

From: Peter Samuelson <peter_at_p12n.org>
Date: Sat, 9 Aug 2008 11:28:19 -0500

> --- subversion-1.5.0/subversion/include/applefile.h 1969-12-31 19:00:00.000000000 -0500
> +++ subversion-appledouble-1.5.0/subversion/include/applefile.h 2008-06-19 15:25:57.000000000 -0400
> @@ -0,0 +1,348 @@
> +/* applefile.h - Data structures used by AppleSingle/AppleDouble
> +* file format
> +*
> +* Written by Lee Jones, 22-Oct-1993

With no license. Ummm. Lee Jones, you have a call on line 1. Lee
Jones, line 1, please.

> +#if DARWIN

Feature macros, not platform macros! Should be SVN_HAVE_APPLEDOUBLE.

> +#if DARWIN
> +/** Contains any HFS metadata in AppleDouble format. */
> +#define SVN_PROP_APPLEDOUBLE "file:appledouble"
> +#endif /* DARWIN */

And don't conditionalize this one at all. Because then you have to
conditionalize any code that uses it.

> +#if DARWIN
> +/* Apply the cached AppleDouble data to file SVN_WC__LOG_ATTR_NAME . */
> +#define SVN_WC__LOG_MAYBE_APPLEDOUBLE "maybe-appledouble"
> +#endif /* DARWIN */

And again, no point using a conditional.

> +#if DARWIN
> + SVN_ERR(svn_wc__maybe_set_appledouble(NULL, full_dest_path,
> + adm_access, pool));
> +#endif /* DARWIN */

In fact, the code would look cleaner without the conditional - move the
conditional to the header file:

  #else
  #define svn_wc__maybe_set_appledouble(a,b,c,d) SVN_NO_ERROR
  #endif

(It's ok, it already has "maybe" in the name!)

> + if (entry->kind == svn_node_file && strcmp(name, SVN_PROP_APPLEDOUBLE) == 0)
> + {
> + /* If the svn:appledouble property exists, apply the HFS metadata.
> + If the svn:appledouble property was deleted, clear the metadata. */
> + SVN_ERR (svn_io_set_appledouble_data (path, value, TRUE, pool));
> + }

Comment should say "file:appledouble".

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/

Received on 2008-08-09 18:28:48 CEST

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.