Author: stefan2
Date: Wed Aug 7 15:39:53 2013
New Revision: 1511364
URL: http://svn.apache.org/r1511364
Log:
On the log-addressing branch: More fixes to svn_fs__compatible_version.
The version comparison was broken and version->tag was not well-defined.
* subversion/include/private/svn_fs_util.h
(svn_fs__append_to_merged_froms): update docstring
* subversion/libsvn_fs_util/fs-util.c
(add_compatility): fix version comparison
(svn_fs__compatible_version): give tag member a defined value
Found by: danielsh
Modified:
subversion/branches/log-addressing/subversion/include/private/svn_fs_util.h
subversion/branches/log-addressing/subversion/libsvn_fs_util/fs-util.c
Modified:
subversion/branches/log-addressing/subversion/include/private/svn_fs_util.h
URL:
http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/include/private/svn_fs_util.h?rev=1511364&r1=1511363&r2=1511364&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/include/private/svn_fs_util.h
(original)
+++ subversion/branches/log-addressing/subversion/include/private/svn_fs_util.h
Wed Aug 7 15:39:53 2013
@@ -212,7 +212,7 @@ svn_fs__append_to_merged_froms(svn_merge
/* Given the FS creation options in CONFIG, return the oldest version that
we shall be compatible with in *COMPATIBLE_VERSION. The patch level
- is always set to 0. Allocate the result in POOL.
+ is always set to 0 and the tag to "". Allocate the result in POOL.
Note that the result will always be compatible to the current tool
version, i.e. will be a version number not more recent than this tool. */
Modified: subversion/branches/log-addressing/subversion/libsvn_fs_util/fs-util.c
URL:
http://svn.apache.org/viewvc/subversion/branches/log-addressing/subversion/libsvn_fs_util/fs-util.c?rev=1511364&r1=1511363&r2=1511364&view=diff
==============================================================================
--- subversion/branches/log-addressing/subversion/libsvn_fs_util/fs-util.c
(original)
+++ subversion/branches/log-addressing/subversion/libsvn_fs_util/fs-util.c Wed
Aug 7 15:39:53 2013
@@ -233,7 +233,7 @@ add_compatility(svn_version_t *version,
int compat_minor)
{
if ( version->major > compat_major
- || (version->major == compat_major || version->major > compat_minor) )
+ || (version->major == compat_major && version->minor > compat_minor))
{
version->major = compat_major;
version->minor = compat_minor;
@@ -276,8 +276,10 @@ svn_fs__compatible_version(svn_version_t
else if (svn_hash_gets(config, SVN_FS_CONFIG_PRE_1_8_COMPATIBLE))
add_compatility(version, 1, 7);
- /* we ignored the patch level so far. Give it a defined value. */
+ /* we ignored the patch level and tag so far.
+ * Give them a defined value. */
version->patch = 0;
+ version->tag = "";
/* done here */
*compatible_version = version;