Author: hwright
Date: Mon Nov 21 22:02:17 2011
New Revision: 1204725
URL: http://svn.apache.org/viewvc?rev=1204725&view=rev
Log:
Ev2 shims: handle the adding of absent nodes in the delta editor shim.
* subversion/libsvn_delta/compat.c
(action_code_t): Add ACTION_ADD_ABSENT.
(process_actions): Handle the new action.
(ev2_absent_directory, ev2_absent_file): Add an appropriate action.
Modified:
subversion/trunk/subversion/libsvn_delta/compat.c
Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1204725&r1=1204724&r2=1204725&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Mon Nov 21 22:02:17 2011
@@ -145,7 +145,8 @@ enum action_code_t
ACTION_PROPSET,
ACTION_PUT,
ACTION_ADD,
- ACTION_DELETE
+ ACTION_DELETE,
+ ACTION_ADD_ABSENT
};
struct path_action
@@ -281,6 +282,14 @@ process_actions(void *edit_baton,
break;
}
+ case ACTION_ADD_ABSENT:
+ {
+ kind = *((svn_kind_t *) action->args);
+ SVN_ERR(svn_editor_add_absent(eb->editor, path, kind,
+ SVN_INVALID_REVNUM));
+ break;
+ }
+
default:
SVN_ERR_MALFUNCTION();
}
@@ -478,6 +487,11 @@ ev2_absent_directory(const char *path,
apr_pool_t *scratch_pool)
{
struct ev2_dir_baton *pb = parent_baton;
+ svn_kind_t *kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
+
+ *kind = svn_kind_dir;
+ SVN_ERR(add_action(pb->eb, path, ACTION_ADD_ABSENT, kind));
+
return SVN_NO_ERROR;
}
@@ -580,6 +594,11 @@ ev2_absent_file(const char *path,
apr_pool_t *scratch_pool)
{
struct ev2_dir_baton *pb = parent_baton;
+ svn_kind_t *kind = apr_palloc(pb->eb->edit_pool, sizeof(*kind));
+
+ *kind = svn_kind_file;
+ SVN_ERR(add_action(pb->eb, path, ACTION_ADD_ABSENT, kind));
+
return SVN_NO_ERROR;
}