Author: hwright
Date: Thu Jun 3 15:58:07 2010
New Revision: 951046
URL: http://svn.apache.org/viewvc?rev=951046&view=rev
Log:
Remove the redundant declaration of the current working copy format. This
introduces a new directive in our sqlite files, which allows us to recycle
the define from wc.h.
* build/transform_sql.py
(process_file): Process the new directive.
* subversion/libsvn_wc/wc-metadata.sql
(STMT_CREATE_SCHEMA): Use the new directive to pull in the version number
from the wc.h header file.
Modified:
subversion/trunk/build/transform_sql.py
subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
Modified: subversion/trunk/build/transform_sql.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/build/transform_sql.py?rev=951046&r1=951045&r2=951046&view=diff
==============================================================================
--- subversion/trunk/build/transform_sql.py (original)
+++ subversion/trunk/build/transform_sql.py Thu Jun 3 15:58:07 2010
@@ -51,6 +51,7 @@ class Processor(object):
re_format = re.compile('-- *format: *([0-9]+)')
re_statement = re.compile('-- *STMT_([A-Z_0-9]+)')
re_include = re.compile('-- *include: *([-a-z]+)')
+ re_define = re.compile('-- *define: *([A-Z_0-9]+)')
def __init__(self, dirpath, output, var_name):
self.dirpath = dirpath
@@ -104,6 +105,15 @@ class Processor(object):
# no need to put the directive into the file. skip this line.
continue
+ match = self.re_define.match(line)
+ if match:
+ define = match.group(1)
+
+ self.output.write(' APR_STRINGIFY(%s) \\\n' % define)
+
+ # no need to put the directive into the file. skip this line.
+ continue
+
if not self.var_printed:
self.output.write('#define %s \\\n' % self.var_name)
self.var_printed = True
Modified: subversion/trunk/subversion/libsvn_wc/wc-metadata.sql
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc-metadata.sql?rev=951046&r1=951045&r2=951046&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc-metadata.sql (original)
+++ subversion/trunk/subversion/libsvn_wc/wc-metadata.sql Thu Jun 3 15:58:07
2010
@@ -475,7 +475,9 @@ CREATE TABLE WC_LOCK (
);
-PRAGMA user_version = 16;
+PRAGMA user_version =
+-- define: SVN_WC__VERSION
+;
/* ------------------------------------------------------------------------- */