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

Re: Extracting files without keyword expansion

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 9 Sep 2010 13:09:18 +0200

On Thu, Sep 09, 2010 at 11:41:25AM +0100, Neil Bird wrote:
>
> Is there any way possible (aside from write a script to generate
> modified files) to update, checkout or otherwise fetch files from
> svn *without* having it honour the svn:keywords property (and
> without permanently removing said property)?
>
> This is for the purposes of doing some out-of-repo difference
> checking. I have one set of files with unexpanded headers (as if
> they were about to freshly be added), and another from a repo. with
> expanded headers, and of course they all show up as different.

To support this exact use case, I've added an --ignore-keywords option
to svn export some time ago:
http://svn.apache.org/viewvc?view=revision&revision=892471

This will be released in 1.7. Before then, there's no way to do this with
stock svn. You'll have to unexpand keywords from the exported data manually.

In the mean time, if you're comfortable with patching your Subversion 1.6.x
build, try the patch below which should unconditionally disable keyword
expansion upon export. No warranty though :)

Stefan

Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c (revision 992007)
+++ subversion/libsvn_client/export.c (working copy)
@@ -700,8 +700,10 @@ change_file_prop(void *file_baton,
   if (strcmp(name, SVN_PROP_EOL_STYLE) == 0)
     fb->eol_style_val = svn_string_dup(value, fb->pool);
 
+#if 0
   else if (strcmp(name, SVN_PROP_KEYWORDS) == 0)
     fb->keywords_val = svn_string_dup(value, fb->pool);
+#endif
 
   else if (strcmp(name, SVN_PROP_EXECUTABLE) == 0)
     fb->executable_val = svn_string_dup(value, fb->pool);
Received on 2010-09-09 13:10:02 CEST

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

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