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/01/21 10:40:06 UTC
svn commit: r1653465 - in /subversion/trunk/subversion: libsvn_repos/dump.c
svnrdump/dump_editor.c
Author: julianfoad
Date: Wed Jan 21 09:40:06 2015
New Revision: 1653465
URL: http://svn.apache.org/r1653465
Log:
Removed unused structure fields.
* subversion/libsvn_repos/dump.c
(dir_baton): Remove 'parent_dir_baton' and 'added' fields.
(make_dir_baton): Remove initializations.
Adjust callers.
* subversion/svnrdump/dump_editor.c
(dir_baton): Remove 'parent_dir_baton' and 'added' fields.
(file_baton): Remove 'parent_dir_baton' field.
(make_dir_baton,
make_file_baton): Remove initializations.
Adjust callers.
Modified:
subversion/trunk/subversion/libsvn_repos/dump.c
subversion/trunk/subversion/svnrdump/dump_editor.c
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1653465&r1=1653464&r2=1653465&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Wed Jan 21 09:40:06 2015
@@ -617,10 +617,6 @@ struct edit_baton
struct dir_baton
{
struct edit_baton *edit_baton;
- struct dir_baton *parent_dir_baton;
-
- /* is this directory a new addition to this revision? */
- svn_boolean_t added;
/* has this directory been written to the output stream? */
svn_boolean_t written_out;
@@ -660,21 +656,19 @@ struct dir_baton
path, SVN_INVALID_REVNUM for the rev), just compare this directory
PATH against itself in the previous revision.
- PARENT_DIR_BATON is the directory baton of this directory's parent,
- or NULL if this is the top-level directory of the edit. ADDED
- indicated if this directory is newly added in this revision.
+ PB is the directory baton of this directory's parent,
+ or NULL if this is the top-level directory of the edit.
+
Perform all allocations in POOL. */
static struct dir_baton *
make_dir_baton(const char *path,
const char *cmp_path,
svn_revnum_t cmp_rev,
void *edit_baton,
- void *parent_dir_baton,
- svn_boolean_t added,
+ struct dir_baton *pb,
apr_pool_t *pool)
{
struct edit_baton *eb = edit_baton;
- struct dir_baton *pb = parent_dir_baton;
struct dir_baton *new_db = apr_pcalloc(pool, sizeof(*new_db));
const char *full_path;
@@ -692,11 +686,9 @@ make_dir_baton(const char *path,
cmp_path = svn_relpath_canonicalize(cmp_path, pool);
new_db->edit_baton = eb;
- new_db->parent_dir_baton = pb;
new_db->path = full_path;
new_db->cmp_path = cmp_path;
new_db->cmp_rev = cmp_rev;
- new_db->added = added;
new_db->written_out = FALSE;
new_db->deleted_entries = apr_hash_make(pool);
new_db->check_name_collision = FALSE;
@@ -1472,7 +1464,7 @@ open_root(void *edit_baton,
void **root_baton)
{
*root_baton = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
- edit_baton, NULL, FALSE, pool);
+ edit_baton, NULL, pool);
return SVN_NO_ERROR;
}
@@ -1506,7 +1498,7 @@ add_directory(const char *path,
void *val;
svn_boolean_t is_copy = FALSE;
struct dir_baton *new_db
- = make_dir_baton(path, copyfrom_path, copyfrom_rev, eb, pb, TRUE, pool);
+ = make_dir_baton(path, copyfrom_path, copyfrom_rev, eb, pb, pool);
/* This might be a replacement -- is the path already deleted? */
val = svn_hash_gets(pb->deleted_entries, path);
@@ -1563,7 +1555,7 @@ open_directory(const char *path,
cmp_rev = pb->cmp_rev;
}
- new_db = make_dir_baton(path, cmp_path, cmp_rev, eb, pb, FALSE, pool);
+ new_db = make_dir_baton(path, cmp_path, cmp_rev, eb, pb, pool);
*child_baton = new_db;
return SVN_NO_ERROR;
}
Modified: subversion/trunk/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/dump_editor.c?rev=1653465&r1=1653464&r2=1653465&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/dump_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/dump_editor.c Wed Jan 21 09:40:06 2015
@@ -51,14 +51,10 @@
struct dir_baton
{
struct dump_edit_baton *eb;
- struct dir_baton *parent_dir_baton;
/* Pool for per-directory allocations */
apr_pool_t *pool;
- /* is this directory a new addition to this revision? */
- svn_boolean_t added;
-
/* the path to this directory */
const char *repos_relpath; /* a relpath */
@@ -88,7 +84,6 @@ struct dir_baton
struct file_baton
{
struct dump_edit_baton *eb;
- struct dir_baton *parent_dir_baton;
/* Pool for per-file allocations */
apr_pool_t *pool;
@@ -162,16 +157,15 @@ struct dump_edit_baton {
* copy source.
*
* PB is the directory baton of this directory's parent, or NULL if
- * this is the top-level directory of the edit. ADDED indicates if
- * this directory is newly added in this revision. Perform all
- * allocations in POOL. */
+ * this is the top-level directory of the edit.
+ *
+ * Perform all allocations in POOL. */
static struct dir_baton *
make_dir_baton(const char *path,
const char *copyfrom_path,
svn_revnum_t copyfrom_rev,
void *edit_baton,
struct dir_baton *pb,
- svn_boolean_t added,
apr_pool_t *pool)
{
struct dump_edit_baton *eb = edit_baton;
@@ -190,14 +184,12 @@ make_dir_baton(const char *path,
copyfrom_path = svn_relpath_canonicalize(copyfrom_path, pool);
new_db->eb = eb;
- new_db->parent_dir_baton = pb;
new_db->pool = pool;
new_db->repos_relpath = repos_relpath;
new_db->copyfrom_path = copyfrom_path
? svn_relpath_canonicalize(copyfrom_path, pool)
: NULL;
new_db->copyfrom_rev = copyfrom_rev;
- new_db->added = added;
new_db->props = apr_hash_make(pool);
new_db->deleted_props = apr_hash_make(pool);
new_db->deleted_entries = apr_hash_make(pool);
@@ -217,7 +209,6 @@ make_file_baton(const char *path,
struct file_baton *new_fb = apr_pcalloc(pool, sizeof(*new_fb));
new_fb->eb = pb->eb;
- new_fb->parent_dir_baton = pb;
new_fb->pool = pool;
new_fb->repos_relpath = svn_relpath_canonicalize(path, pool);
new_fb->props = apr_hash_make(pool);
@@ -616,7 +607,7 @@ open_root(void *edit_baton,
/* ... but for the source directory itself, we'll defer
to letting the typical plumbing handle this task. */
new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
- edit_baton, NULL, TRUE, pool);
+ edit_baton, NULL, pool);
SVN_ERR(dump_node(eb, new_db->repos_relpath, new_db,
NULL, svn_node_action_add, FALSE,
NULL, SVN_INVALID_REVNUM, pool));
@@ -633,7 +624,7 @@ open_root(void *edit_baton,
if (! new_db)
{
new_db = make_dir_baton(NULL, NULL, SVN_INVALID_REVNUM,
- edit_baton, NULL, FALSE, pool);
+ edit_baton, NULL, pool);
}
*root_baton = new_db;
@@ -679,7 +670,7 @@ add_directory(const char *path,
SVN_ERR(dump_pending(pb->eb, pool));
new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb,
- pb, TRUE, pb->pool);
+ pb, pb->pool);
/* This might be a replacement -- is the path already deleted? */
val = svn_hash_gets(pb->deleted_entries, path);
@@ -735,7 +726,7 @@ open_directory(const char *path,
}
new_db = make_dir_baton(path, copyfrom_path, copyfrom_rev, pb->eb, pb,
- FALSE, pb->pool);
+ pb->pool);
*child_baton = new_db;
return SVN_NO_ERROR;