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

Merging r18254 (BDB macro fix) into 1.3.x.

From: <kfogel_at_collab.net>
Date: 2006-02-01 14:03:47 CET

I was just about to merge r18254 from trunk into the 1.3.x branch,
when a closer investigation raised some questions.

r18254 is a parenthetization fix to the SVN_BDB_VERSION_AT_LEAST
macro. That macro was first introduced in r17484, whose summary is
"Working on issue #2449. Begin refactoring the BDB FS back-end in
preparation for implementing a cache of open BDB environment handles."

Now, r17484 was committed on trunk after 1.3.x branched, and has never
been merged into 1.3.x, according to the logs. It is also not listed
as a proposed backport in 1.3.x/STATUS. That seems odd -- I would
think 1.3.x would need it, presumably in the group of proposed
backports related to issue #2449 (the group beginning with r18144).

r18254 was approved for backport by four people, despite the fact that
the macro which it fixes does not even exist in 1.3.x without r17484.
This is not a criticism of those four people, I'm just trying to
understand what's going on here. Out of curiosity, I merged r18144
and friends into my 1.3.x working copy just to see what would happen,
and everything applied without conflict. That was very surprising!
Just looking over the log message of r17484, it's hard to believe that
change isn't a prerequisite for all of the later BDB work.

What am I missing here?

Below is the r18254 backport I would have committed to 1.3.x if I were
confident it was appropriate (yes, it builds without error):

[[[
Merge r18254 from trunk.

This has the effect of causing the SVN_BDB_VERSION_AT_LEAST macro to
exist in 1.3.x, although on trunk that macro already existed (since
r17484) and r18254 merely fixed a parenthetisation problem in it.

Approved by: brane, lundblad, malcolm, dlr
]]]

Index: STATUS
===================================================================
--- STATUS (revision 18313)
+++ STATUS (working copy)
@@ -72,12 +72,4 @@
 
 Approved changes:
 
- * r18254
- Fix parenthetisation in the SVN_BDB_VERSION_AT_LEAST macro.
- Justification:
- Avoids precedence bugs when used in boolean expressions.
- Note:
- r18144 et al. depend on this.
- Votes:
- +1: brane, lundblad, malcolm, dlr
-
+ None pending.
Index: subversion/libsvn_fs_base/bdb/bdb_compat.h
===================================================================
--- subversion/libsvn_fs_base/bdb/bdb_compat.h (revision 18313)
+++ subversion/libsvn_fs_base/bdb/bdb_compat.h (working copy)
@@ -1,7 +1,7 @@
 /* svn_bdb_compat.h --- Compatibility wrapper for different BDB versions.
  *
  * ====================================================================
- * Copyright (c) 2000-2004 CollabNet. All rights reserved.
+ * Copyright (c) 2000-2006 CollabNet. All rights reserved.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -59,6 +59,11 @@
 #define SVN_BDB_AUTO_RECOVER (0)
 #endif
 
+/* Explicit BDB version check. */
+#define SVN_BDB_VERSION_AT_LEAST(major,minor) \
+ (DB_VERSION_MAJOR > (major) \
+ || (DB_VERSION_MAJOR == (major) && DB_VERSION_MINOR >= (minor)))
+
 /* Parameter lists */
 
 /* In BDB 4.1, DB->open takes a transaction parameter. We'll ignore it

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 1 16:03:22 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.