Hi,
I think it will be useful to have svn --version display serf library
version information. Attached patch makes output of svn --version like
this:
[[[
C:\Ivan\SVN\trunk\Debug\subversion\svn>svn.exe --version
svn, version 1.9.0-dev (under development)
compiled Aug 7 2013, 15:48:17 on x86/x86_64-microsoft-windows6.1.7601
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol
using serf 1.2.99.
- handles 'http' scheme
- handles 'https' scheme
]]]
It will be very useful for diagnostic serf/ra_serf issues.
Log message:
[[[
Add serf library version to svn --version output.
* subversion/libsvn_ra_serf/serf.c
(RA_SERF_DESCRIPTION): Add version placeholders.
(ra_serf_get_description): Add serf library version information to RA layer
description.
]]]
Thoughts?
--
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com
Index: subversion/libsvn_ra_serf/serf.c
===================================================================
--- subversion/libsvn_ra_serf/serf.c (revision 1513462)
+++ subversion/libsvn_ra_serf/serf.c (working copy)
@@ -59,13 +59,25 @@
}
#define RA_SERF_DESCRIPTION \
- N_("Module for accessing a repository via WebDAV protocol using serf.")
+ N_("Module for accessing a repository via WebDAV protocol using serf
%d.%d.%d.")
/* Implements svn_ra__vtable_t.get_description(). */
static const char *
ra_serf_get_description(void)
{
- return _(RA_SERF_DESCRIPTION);
+ static char description_buf[256];
+ static char *description = NULL;
+
+ if (!description)
+ {
+ int major, minor, patch;
+ serf_lib_version(&major, &minor, &patch);
+ apr_snprintf(description_buf, sizeof(description_buf),
+ _(RA_SERF_DESCRIPTION), major, minor, patch);
+ description = description_buf;
+ }
+
+ return description;
}
/* Implements svn_ra__vtable_t.get_schemes(). */