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 2012/06/03 20:22:26 UTC
svn commit: r1345733 - /subversion/trunk/subversion/libsvn_wc/status.c
Author: rhuijben
Date: Sun Jun 3 18:22:26 2012
New Revision: 1345733
URL: http://svn.apache.org/viewvc?rev=1345733&view=rev
Log:
Avoid a wc_db query in the status -u processing, used to retrieve the local
node kind. We already have this value cached in the status struct, so we can
just use that instead.
* subversion/libsvn_wc/status.c
(tweak_statushash): Remove unneeded argument and just copy the local kind.
(delete_entry,
close_directory,
close_file): Update caller.
Modified:
subversion/trunk/subversion/libsvn_wc/status.c
Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1345733&r1=1345732&r2=1345733&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Sun Jun 3 18:22:26 2012
@@ -1583,7 +1583,6 @@ tweak_statushash(void *baton,
svn_boolean_t is_dir_baton,
svn_wc__db_t *db,
const char *local_abspath,
- svn_boolean_t is_dir,
enum svn_wc_status_kind repos_node_status,
enum svn_wc_status_kind repos_text_status,
enum svn_wc_status_kind repos_prop_status,
@@ -1672,7 +1671,7 @@ tweak_statushash(void *baton,
isn't available. */
if (statstruct->repos_node_status == svn_wc_status_deleted)
{
- statstruct->ood_kind = is_dir ? svn_node_dir : svn_node_file;
+ statstruct->ood_kind = statstruct->kind;
/* Pre 1.5 servers don't provide the revision a path was deleted.
So we punt and use the last committed revision of the path's
@@ -2068,16 +2067,13 @@ delete_entry(const char *path,
struct dir_baton *db = parent_baton;
struct edit_baton *eb = db->edit_baton;
const char *local_abspath = svn_dirent_join(eb->anchor_abspath, path, pool);
- svn_kind_t kind;
/* Note: when something is deleted, it's okay to tweak the
statushash immediately. No need to wait until close_file or
close_dir, because there's no risk of having to honor the 'added'
flag. We already know this item exists in the working copy. */
-
- SVN_ERR(svn_wc__db_read_kind(&kind, eb->db, local_abspath, FALSE, pool));
SVN_ERR(tweak_statushash(db, db, TRUE, eb->db,
- local_abspath, kind == svn_kind_dir,
+ local_abspath,
svn_wc_status_deleted, 0, 0, revision, NULL, pool));
/* Mark the parent dir -- it lost an entry (unless that parent dir
@@ -2086,7 +2082,6 @@ delete_entry(const char *path,
if (db->parent_baton && (! *eb->target_basename))
SVN_ERR(tweak_statushash(db->parent_baton, db, TRUE,eb->db,
db->local_abspath,
- kind == svn_kind_dir,
svn_wc_status_modified, svn_wc_status_modified,
0, SVN_INVALID_REVNUM, NULL, pool));
@@ -2209,7 +2204,7 @@ close_directory(void *dir_baton,
/* ### When we add directory locking, we need to find a
### directory lock here. */
SVN_ERR(tweak_statushash(pb, db, TRUE, eb->db, db->local_abspath,
- TRUE, repos_node_status, repos_text_status,
+ repos_node_status, repos_text_status,
repos_prop_status, SVN_INVALID_REVNUM, NULL,
pool));
}
@@ -2454,7 +2449,7 @@ close_file(void *file_baton,
}
return tweak_statushash(fb, NULL, FALSE, fb->edit_baton->db,
- fb->local_abspath, FALSE, repos_node_status,
+ fb->local_abspath, repos_node_status,
repos_text_status, repos_prop_status,
SVN_INVALID_REVNUM, repos_lock, pool);
}