Author: stsp
Date: Thu Dec 6 23:18:00 2012
New Revision: 1418124
URL: http://svn.apache.org/viewvc?rev=1418124&view=rev
Log:
Expose helper function in libsvn_wc/upgrade.c, which maps a WC format number
to Subversion release number, to other files in libsvn_wc (to be used in a
later commit), and make it handle the format number used by Subversion 1.7.
* subversion/libsvn_wc/upgrade.c
(version_string_from_format): Rename to ...
(svn_wc__version_string_from_format): ... this. Add wc-ng version number.
(svn_wc__upgrade_sdb): Update caller.
* subversion/libsvn_wc/wc.h
(svn_wc__version_string_from_format): Declare.
Modified:
subversion/trunk/subversion/libsvn_wc/upgrade.c
subversion/trunk/subversion/libsvn_wc/wc.h
Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1418124&r1=1418123&r2=1418124&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Thu Dec 6 23:18:00 2012
@@ -1753,16 +1753,8 @@ upgrade_to_wcng(void **dir_baton,
return SVN_NO_ERROR;
}
-
-/* Return a string indicating the released version (or versions) of
- * Subversion that used WC format number WC_FORMAT, or some other
- * suitable string if no released version used WC_FORMAT.
- *
- * ### It's not ideal to encode this sort of knowledge in this low-level
- * library. On the other hand, it doesn't need to be updated often and
- * should be easily found when it does need to be updated. */
-static const char *
-version_string_from_format(int wc_format)
+const char *
+svn_wc__version_string_from_format(int wc_format)
{
switch (wc_format)
{
@@ -1770,6 +1762,7 @@ version_string_from_format(int wc_format
case 8: return "1.4";
case 9: return "1.5";
case 10: return "1.6";
+ case SVN_WC__WC_NG_VERSION: return "1.7";
}
return _("(unreleased development version)");
}
@@ -1792,7 +1785,7 @@ svn_wc__upgrade_sdb(int *result_format,
svn_dirent_local_style(wcroot_abspath,
scratch_pool),
start_format,
- version_string_from_format(start_format));
+ svn_wc__version_string_from_format(start_format));
/* Early WCNG formats no longer supported. */
if (start_format < 19)
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1418124&r1=1418123&r2=1418124&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Thu Dec 6 23:18:00 2012
@@ -188,6 +188,16 @@ extern "C" {
/* A version < this has no work queue (see workqueue.h). */
#define SVN_WC__HAS_WORK_QUEUE 13
+/* Return a string indicating the released version (or versions) of
+ * Subversion that used WC format number WC_FORMAT, or some other
+ * suitable string if no released version used WC_FORMAT.
+ *
+ * ### It's not ideal to encode this sort of knowledge in this low-level
+ * library. On the other hand, it doesn't need to be updated often and
+ * should be easily found when it does need to be updated. */
+const char *
+svn_wc__version_string_from_format(int wc_format);
+
/* Return true iff error E indicates an "is not a working copy" type
of error, either because something wasn't a working copy at all, or
because it's a working copy from a previous version (in need of