You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/04/01 15:40:52 UTC
svn commit: r1670647 - in /subversion/branches/ra-git: BRANCH-README
autogen.sh subversion/libsvn_ra_git/ra_plugin.c
subversion/libsvn_ra_git/reporter.c
Author: julianfoad
Date: Wed Apr 1 13:40:52 2015
New Revision: 1670647
URL: http://svn.apache.org/r1670647
Log:
On the 'ra-git' branch: update to libgit2 v0.22
Patch by: Carlos MartÃn Nieto <cmn{_AT_}elego.de>
(tweaked by me: removed the quoting style change in autogen.sh)
* BRANCH-README:
Specify we build against libgit2 v0.22.
* autogen.sh:
Fix the LIBTOOL_CONFIG replacement when overriding the config file path.
* subversion/libsvn_ra_git/ra_plugin.c:
(do_libgit_init): the init function was renamed to git_libgit2_init().
(split_url): remotes which are not in the config are now called anonymous.
(do_git_fetch): pass NULL to git_remote_fetch() to get default reflog entries.
(svn_ra_git__open): git_remote_load() was renamed git_remote_lookup().
(remote_progress_cb, svn_ra_git__open): the progress callback has been
renamed to sideband_progress. Rename our callback function to
remote_sideband_progress_cb to match libgit2 naming.
(compare_git_tree_entries): git_tree_entry_byoid is now git_tree_entry_byid.
* subversion/libsvn_ra_git/reporter.c:
(blob_relatedness_cb): delta file field oid has been renamed to id.
Modified:
subversion/branches/ra-git/BRANCH-README
subversion/branches/ra-git/autogen.sh
subversion/branches/ra-git/subversion/libsvn_ra_git/ra_plugin.c
subversion/branches/ra-git/subversion/libsvn_ra_git/reporter.c
Modified: subversion/branches/ra-git/BRANCH-README
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/BRANCH-README?rev=1670647&r1=1670646&r2=1670647&view=diff
==============================================================================
--- subversion/branches/ra-git/BRANCH-README (original)
+++ subversion/branches/ra-git/BRANCH-README Wed Apr 1 13:40:52 2015
@@ -12,8 +12,8 @@ Git repository are accessed via the foll
git+http:// git protocol via http
git+https:// git protocol via https
-All git operations are performed with libgit2.
-See http://libgit2.github.com/
+All git operations are performed with libgit2. This code works with
+libgit2 v0.22.x. See http://libgit2.github.com/
A bare git repository is stored in .svn/git. The svn working copy
acts like the git working tree. For commands which don't use a
Modified: subversion/branches/ra-git/autogen.sh
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/autogen.sh?rev=1670647&r1=1670646&r2=1670647&view=diff
==============================================================================
--- subversion/branches/ra-git/autogen.sh (original)
+++ subversion/branches/ra-git/autogen.sh Wed Apr 1 13:40:52 2015
@@ -105,7 +105,7 @@ done
if [ $lt_major_version -ge 2 ]; then
for file in config.guess config.sub; do
- configfile=${LIBTOOL_CONFIG-`cd $ltpath/../share/libtool/config ; pwd`/$file}
+ configfile=${LIBTOOL_CONFIG-`cd $ltpath/../share/libtool/config ; pwd`}/$file
if [ ! -f $configfile ]; then
echo "$configfile not found (try setting the LIBTOOL_CONFIG environment variable)"
Modified: subversion/branches/ra-git/subversion/libsvn_ra_git/ra_plugin.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_ra_git/ra_plugin.c?rev=1670647&r1=1670646&r2=1670647&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_ra_git/ra_plugin.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_ra_git/ra_plugin.c Wed Apr 1 13:40:52 2015
@@ -144,9 +144,9 @@ split_url(const char **remote_url,
SVN_DBG(("trying remote url '%s'", remote_url_buf->data));
/* Create an in-memory remote... */
- git_err = git_remote_create_inmemory(&remote, repos,
- RA_GIT_DEFAULT_REFSPEC,
- remote_url_buf->data);
+ git_err = git_remote_create_anonymous(&remote, repos,
+ remote_url_buf->data,
+ RA_GIT_DEFAULT_REFSPEC);
if (git_err)
return svn_error_trace(svn_ra_git__wrap_git_error());
@@ -205,7 +205,7 @@ do_git_fetch(svn_ra_git__session_baton_t
SVN_DBG(("fetching from %s\n", git_remote_url(sess->remote)));
- git_err = git_remote_fetch(sess->remote);
+ git_err = git_remote_fetch(sess->remote, NULL, NULL, NULL);
if (git_err)
return svn_error_trace(svn_ra_git__wrap_git_error());
@@ -609,7 +609,7 @@ check_cancel_stop_remote(svn_ra_git__ses
}
}
-static int remote_progress_cb(const char *str, int len, void *data)
+static int remote_sideband_progress_cb(const char *str, int len, void *data)
{
svn_ra_git__session_baton_t *sess = data;
svn_string_t *s;
@@ -660,7 +660,7 @@ static int remote_update_tips_cb(const c
static svn_error_t *
do_libgit_init(void *baton, apr_pool_t *pool)
{
- git_threads_init();
+ git_libgit2_init();
return SVN_NO_ERROR;
}
@@ -957,7 +957,7 @@ svn_ra_git__open(svn_ra_session_t *sessi
sess->session_url, session->pool, sess->scratch_pool));
/* Check if our remote already exists. */
- git_err = git_remote_load(&sess->remote, sess->repos,
+ git_err = git_remote_lookup(&sess->remote, sess->repos,
RA_GIT_DEFAULT_REMOTE_NAME);
if (git_err)
{
@@ -981,7 +981,7 @@ svn_ra_git__open(svn_ra_session_t *sessi
remote_callbacks = apr_pcalloc(session->pool, sizeof(*remote_callbacks));
remote_callbacks->version = GIT_REMOTE_CALLBACKS_VERSION;
- remote_callbacks->progress = remote_progress_cb;
+ remote_callbacks->sideband_progress = remote_sideband_progress_cb;
remote_callbacks->transfer_progress = remote_transfer_progress_cb;
remote_callbacks->update_tips = remote_update_tips_cb;
remote_callbacks->payload = sess;
@@ -1475,7 +1475,7 @@ compare_git_tree_entries(apr_hash_t *cha
const char *entry_relpath;
changed_path = svn_log_changed_path2_create(pool);
- other_entry = git_tree_entry_byoid(other_tree, other_oid);
+ other_entry = git_tree_entry_byid(other_tree, other_oid);
if (git_tree_entry_type(other_entry) == GIT_OBJ_BLOB)
changed_path->action = 'M';
else
@@ -1526,7 +1526,7 @@ compare_git_tree_entries(apr_hash_t *cha
other_entry_name, pool),
svn_hash_sets(changed_paths, other_entry_relpath, changed_path);
- other_entry = git_tree_entry_byoid(other_tree, other_entry_id);
+ other_entry = git_tree_entry_byid(other_tree, other_entry_id);
if (git_tree_entry_type(other_entry) == GIT_OBJ_TREE)
{
git_tree *added_tree;
Modified: subversion/branches/ra-git/subversion/libsvn_ra_git/reporter.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/libsvn_ra_git/reporter.c?rev=1670647&r1=1670646&r2=1670647&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/libsvn_ra_git/reporter.c (original)
+++ subversion/branches/ra-git/subversion/libsvn_ra_git/reporter.c Wed Apr 1 13:40:52 2015
@@ -780,12 +780,12 @@ blob_relatedness_cb(const git_diff_delta
/* At least one of the oids should match, else we're not looking
* at the right blob. */
- if (!git_oid_equal(&delta->old_file.oid, git_blob_id(b->blob)) &&
- !git_oid_equal(&delta->new_file.oid, git_blob_id(b->other_blob)))
+ if (!git_oid_equal(&delta->old_file.id, git_blob_id(b->blob)) &&
+ !git_oid_equal(&delta->new_file.id, git_blob_id(b->other_blob)))
return 0;
- if (git_oid_iszero(&delta->old_file.oid) ||
- git_oid_iszero(&delta->new_file.oid))
+ if (git_oid_iszero(&delta->old_file.id) ||
+ git_oid_iszero(&delta->new_file.id))
{
/* A zero oid means the blob doesn't actually exist on one side. */
b->distance = -1;