You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/12/07 17:01:33 UTC
svn commit: r1718417 - in /subversion/branches/ra-git/subversion:
libsvn_ra_git/fetch.c libsvn_ra_git/ra_git.h libsvn_ra_git/session.c
tests/cmdline/getopt_tests.py
Author: rhuijben
Date: Mon Dec 7 16:01:33 2015
New Revision: 1718417
URL: http://svn.apache.org/viewvc?rev=1718417&view=rev
Log:
On the ra-git branch: Make the module description report the backing library
version, like we do for serf. This resolves two test errors.
* subversion/libsvn_ra_git/fetch.c
(svn_ra_git__libgit2_version): New function.
* subversion/libsvn_ra_git/ra_git.h
(svn_ra_git__libgit2_version): New function.
* subversion/libsvn_ra_git/session.c
(RA_GIT_DESCRIPTION): Extend.
(RA_GIT_DESCRIPTION_VER): New define.
(ra_git_get_description): Extend following ra_serf patter.
(ra_git_get_schemes): Just provide 'git'. The others are handled
automatically as the '+' is magic.
* subversion/tests/cmdline/getopt_tests.py
(del_lines_res): Remove neon. Add git.
Modified:
subversion/branches/ra-git/subversion/libsvn_ra_git/fetch.c
subversion/branches/ra-git/subversion/libsvn_ra_git/ra_git.h
subversion/branches/ra-git/subversion/libsvn_ra_git/session.c
subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py
Modified: subversion/branches/ra-git/subversion/libsvn_ra_git/fetch.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_ra_git/fetch.c?rev=1718417&r1=1718416&r2=1718417&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_ra_git/fetch.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_ra_git/fetch.c Mon Dec 7 16:01:33 2015
@@ -724,3 +724,12 @@ open_git_repos(git_repository **repos,
return SVN_NO_ERROR;
}
+void
+svn_ra_git__libgit2_version(int *major,
+ int *minor,
+ int *rev,
+ const char **compiled)
+{
+ git_libgit2_version(major, minor, rev);
+ *compiled = LIBGIT2_VERSION;
+}
Modified: subversion/branches/ra-git/subversion/libsvn_ra_git/ra_git.h
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_ra_git/ra_git.h?rev=1718417&r1=1718416&r2=1718417&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_ra_git/ra_git.h (original)
+++ subversion/branches/ra-git/subversion/libsvn_ra_git/ra_git.h Mon Dec 7 16:01:33 2015
@@ -112,4 +112,11 @@ svn_ra_git__git_fetch(svn_ra_session_t *
svn_boolean_t refresh,
apr_pool_t *scratch_pool);
+void
+svn_ra_git__libgit2_version(int *major,
+ int *minor,
+ int *rev,
+ const char **compiled);
+
+
#endif /* SVN_LIBSVN_RA_GIT_H */
Modified: subversion/branches/ra-git/subversion/libsvn_ra_git/session.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_ra_git/session.c?rev=1718417&r1=1718416&r2=1718417&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_ra_git/session.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_ra_git/session.c Mon Dec 7 16:01:33 2015
@@ -171,19 +171,29 @@ ra_git_wrap_reporter(const svn_ra_report
/*** The RA vtable routines ***/
#define RA_GIT_DESCRIPTION \
- N_("Module for accessing a git repository.")
+ N_("Module for accessing a git repository using libgit2.")
+#define RA_GIT_DESCRIPTION_VER \
+ N_("Module for accessing a git repository using libgit2.\n" \
+ " - using libgit2 %d.%d.%d (compiled with %s)")
+
+/* Implements svn_ra__vtable_t.get_description(). */
static const char *
ra_git_get_description(apr_pool_t *pool)
{
- return _(RA_GIT_DESCRIPTION);
+ int major, minor, rev;
+ const char *compiled;
+
+ svn_ra_git__libgit2_version(&major, &minor, &rev, &compiled);
+
+ return apr_psprintf(pool, _(RA_GIT_DESCRIPTION_VER),
+ major, minor, rev, compiled);
}
static const char * const *
ra_git_get_schemes(apr_pool_t *pool)
{
- /* TODO: git+ssh requires optional libssh dependency -- do we want that as well? */
- static const char *schemes[] = { "git", "git+file", "git+http", "git+https", NULL };
+ static const char *schemes[] = { "git", NULL };
return schemes;
}
Modified: subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py?rev=1718417&r1=1718416&r2=1718417&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/getopt_tests.py Mon Dec 7 16:01:33 2015
@@ -69,10 +69,11 @@ del_lines_res = [
re.compile(r'\s+compiled\s+'),
# Also for 'svn --version':
- re.compile(r"\* ra_(neon|local|svn|serf) :"),
- re.compile(r" - handles '(https?|file|svn)' scheme"),
+ re.compile(r"\* ra_(local|svn|serf|git) :"),
+ re.compile(r" - handles '(https?|file|svn|git)' scheme"),
re.compile(r" - with Cyrus SASL authentication"),
re.compile(r" - using serf \d+\.\d+\.\d+"),
+ re.compile(r" - using libgit2 \d+\.\d+\.\d+"),
re.compile(r"\* fs_(base|fs) :"),
# Remove 'svn --version' list of platform-specific