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 2010/07/23 02:45:39 UTC
svn commit: r966917 - in /subversion/trunk/subversion/libsvn_wc: adm_ops.c
log.c merge.c props.c questions.c translate.c translate.h update_editor.c
workqueue.c
Author: rhuijben
Date: Fri Jul 23 00:45:38 2010
New Revision: 966917
URL: http://svn.apache.org/viewvc?rev=966917&view=rev
Log:
Consolidate the translation data read functions in libsvn_wc. Before
this path all properties were read to find if a file had svn:eol-style,
then all properties were read again to fetch svn:. And finally they
were read a third time to fetch svn:special.
So replace svn_wc__get_eol_style(), svn_wc__get_keywords() and
svn_wc__get_special() with one svn_wc__get_translate_info(), using
a helper svn_wc__expand_keywords().
The new code makes it an error to ask the translation information
on an unversioned node. Apply some update fixes to handle this
correctly.
(This patch reduces my total test time by about 8%)
* subversion/libsvn_wc/adm_ops.c
(svn_wc__get_translate_info): Update caller
* subversion/libsvn_wc/log.c
(log_do_file_cp_and_translate): Use one call instead of three.
* subversion/libsvn_wc/merge.c
(detranslate_wc_file): Use one call instead of three in two places.
Use defaults when merging to an unversioned target to keep old behavior.
(merge_text_file): Update caller.
* subversion/libsvn_wc/props.c
(svn_wc__internal_propset): Update caller to don't retrieve the actual
props at all.
* subversion/libsvn_wc/questions.c
(compare_and_verify): Use one call instead of three.
* subversion/libsvn_wc/translate.c
(svn_wc__internal_translated_stream): Use one call instead of three.
(svn_wc__internal_translated_file): Use one call instead of three.
(svn_wc__get_eol_style): Move into svn_wc__get_translate_info().
(svn_wc__get_keywords): Rename to ...
(svn_wc__get_translate_info): ... this and insert other property retrievals.
Extract the keyword expansion to svn_wc__expand_keywords().
(svn_wc__expand_keywords): New function.
(svn_wc__get_special): Move into svn_wc__get_translate_info().
* subversion/libsvn_wc/translate.h
(svn_wc__get_translate_info): New function. Integrate the help texts
from svn_wc__get_eol_style(), svn_wc__get_keywords() and
svn_wc__get_special().
(svn_wc__get_eol_style): Remove function.
(svn_wc__get_keywords): Rename function to ...
(svn_wc__expand_keywords): ... this.
(svn_wc__get_special): Remove function.
* subversion/libsvn_wc/update_editor.c
(merge_file): Don't compare local obstructions, as we don't
have valid properties for them. Update caller.
* subversion/libsvn_wc/workqueue.c
(install_committed_file): Update caller.
(run_file_install): Use one call instead of three.
Modified:
subversion/trunk/subversion/libsvn_wc/adm_ops.c
subversion/trunk/subversion/libsvn_wc/log.c
subversion/trunk/subversion/libsvn_wc/merge.c
subversion/trunk/subversion/libsvn_wc/props.c
subversion/trunk/subversion/libsvn_wc/questions.c
subversion/trunk/subversion/libsvn_wc/translate.c
subversion/trunk/subversion/libsvn_wc/translate.h
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/libsvn_wc/workqueue.c
Modified: subversion/trunk/subversion/libsvn_wc/adm_ops.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_ops.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/adm_ops.c (original)
+++ subversion/trunk/subversion/libsvn_wc/adm_ops.c Fri Jul 23 00:45:38 2010
@@ -1954,8 +1954,9 @@ svn_wc__internal_remove_from_revision_co
/* Only check if the file was modified when it wasn't overwritten with a
special file */
- SVN_ERR(svn_wc__get_special(&wc_special, db, local_abspath,
- scratch_pool));
+ SVN_ERR(svn_wc__get_translate_info(NULL, NULL, NULL,
+ &wc_special, db, local_abspath,
+ scratch_pool, scratch_pool));
SVN_ERR(svn_io_check_special_path(local_abspath, &on_disk,
&local_special, scratch_pool));
if (wc_special || ! local_special)
Modified: subversion/trunk/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.c (original)
+++ subversion/trunk/subversion/libsvn_wc/log.c Fri Jul 23 00:45:38 2010
@@ -148,14 +148,11 @@ log_do_file_cp_and_translate(svn_wc__db_
apr_hash_t *keywords;
svn_boolean_t special;
- err = svn_wc__get_eol_style(&style, &eol, db, versioned_abspath,
- scratch_pool, scratch_pool);
- if (! err)
- err = svn_wc__get_keywords(&keywords, db, versioned_abspath, NULL,
- scratch_pool, scratch_pool);
- if (! err)
- err = svn_wc__get_special(&special, db, versioned_abspath,
- scratch_pool);
+ err = svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special,
+ db, versioned_abspath,
+ scratch_pool, scratch_pool);
if (! err)
err = svn_subst_copy_and_translate4(from_abspath, dest_abspath,
Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Fri Jul 23 00:45:38 2010
@@ -134,10 +134,16 @@ detranslate_wc_file(const char **detrans
const char *eol;
apr_hash_t *keywords;
svn_boolean_t special;
+ svn_wc__db_kind_t kind;
+
+ SVN_ERR(svn_wc__db_read_kind(&kind, db, target_abspath, TRUE, scratch_pool));
/* Decide if the merge target currently is a text or binary file. */
- SVN_ERR(svn_wc__marked_as_binary(&is_binary, target_abspath, db,
- scratch_pool));
+ if (kind == svn_wc__db_kind_file)
+ SVN_ERR(svn_wc__marked_as_binary(&is_binary, target_abspath, db,
+ scratch_pool));
+ else
+ is_binary = FALSE;
/* See if we need to do a straight copy:
- old and new mime-types are binary, or
@@ -159,18 +165,38 @@ detranslate_wc_file(const char **detrans
{
/* Old props indicate texty, new props indicate binary:
detranslate keywords and old eol-style */
- SVN_ERR(svn_wc__get_keywords(&keywords, db, target_abspath, NULL,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_special(&special, db, target_abspath, scratch_pool));
- SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, target_abspath,
- scratch_pool, scratch_pool));
+ if (kind == svn_wc__db_kind_file)
+ SVN_ERR(svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special,
+ db, target_abspath,
+ scratch_pool, scratch_pool));
+ else
+ {
+ special = FALSE;
+ keywords = NULL;
+ eol = NULL;
+ style = svn_subst_eol_style_none;
+ }
}
else
{
/* New props indicate texty, regardless of old props */
/* In case the file used to be special, detranslate specially */
- SVN_ERR(svn_wc__get_special(&special, db, target_abspath, scratch_pool));
+ if (kind == svn_wc__db_kind_file)
+ SVN_ERR(svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special,
+ db, target_abspath,
+ scratch_pool, scratch_pool));
+ else
+ {
+ special = FALSE;
+ keywords = NULL;
+ eol = NULL;
+ style = svn_subst_eol_style_none;
+ }
if (special)
{
@@ -187,8 +213,9 @@ detranslate_wc_file(const char **detrans
svn_subst_eol_style_from_value(&style, &eol, prop->value->data);
}
else if (!is_binary)
- SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, target_abspath,
- scratch_pool, scratch_pool));
+ {
+ /* Already fetched */
+ }
else
{
eol = NULL;
@@ -197,10 +224,7 @@ detranslate_wc_file(const char **detrans
/* In case there were keywords, detranslate with keywords
(iff we were texty) */
- if (!is_binary)
- SVN_ERR(svn_wc__get_keywords(&keywords, db, target_abspath, NULL,
- scratch_pool, scratch_pool));
- else
+ if (is_binary)
keywords = NULL;
}
}
@@ -643,6 +667,7 @@ preserve_pre_merge_files(svn_skel_t **wo
const char *dir_abspath, *target_name;
const char *temp_dir;
svn_skel_t *work_item;
+ svn_error_t *err;
*work_items = NULL;
@@ -717,11 +742,23 @@ preserve_pre_merge_files(svn_skel_t **wo
/* Back up TARGET_ABSPATH through detranslation/retranslation:
the new translation properties may not match the current ones */
- SVN_ERR(svn_wc__internal_translated_file(
+ err = svn_wc__internal_translated_file(
&detranslated_target_copy, target_abspath, db, target_abspath,
SVN_WC_TRANSLATE_TO_NF | SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
cancel_func, cancel_baton,
- scratch_pool, scratch_pool));
+ scratch_pool, scratch_pool);
+
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+
+ /* We are merging to a not versioned file, so we have handle
+ this without translation */
+ detranslated_target_copy = target_abspath;
+ }
+ else
+ SVN_ERR(err);
+
SVN_ERR(svn_wc__loggy_translated_file(&work_item, db, dir_abspath,
*target_copy, detranslated_target_copy,
target_abspath, result_pool));
@@ -1011,7 +1048,9 @@ merge_text_file(svn_skel_t **work_items,
target file. This is so we don't try to follow symlinks,
but the same treatment is probably also appropriate for
whatever special file types we may invent in the future. */
- SVN_ERR(svn_wc__get_special(&special, db, target_abspath, pool));
+ SVN_ERR(svn_wc__get_translate_info(NULL, NULL, NULL,
+ &special, db, target_abspath,
+ pool, pool));
SVN_ERR(svn_io_files_contents_same_p(&same, result_target,
(special ?
detranslated_target_abspath :
Modified: subversion/trunk/subversion/libsvn_wc/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/props.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/props.c (original)
+++ subversion/trunk/subversion/libsvn_wc/props.c Fri Jul 23 00:45:38 2010
@@ -2510,12 +2510,19 @@ svn_wc__internal_propset(svn_wc__db_t *d
APR_HASH_KEY_STRING);
apr_hash_t *old_keywords, *new_keywords;
- SVN_ERR(svn_wc__get_keywords(&old_keywords, db, local_abspath,
- old_value ? old_value->data : "",
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_keywords(&new_keywords, db, local_abspath,
- value ? value->data : "",
- scratch_pool, scratch_pool));
+ if (old_value)
+ SVN_ERR(svn_wc__expand_keywords(&old_keywords,
+ db, local_abspath, old_value->data,
+ scratch_pool, scratch_pool));
+ else
+ old_keywords = apr_hash_make(scratch_pool);
+
+ if (value)
+ SVN_ERR(svn_wc__expand_keywords(&new_keywords,
+ db, local_abspath, value->data,
+ scratch_pool, scratch_pool));
+ else
+ new_keywords = apr_hash_make(scratch_pool);
if (svn_subst_keywords_differ2(old_keywords, new_keywords, FALSE,
scratch_pool))
Modified: subversion/trunk/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/questions.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/questions.c (original)
+++ subversion/trunk/subversion/libsvn_wc/questions.c Fri Jul 23 00:45:38 2010
@@ -114,13 +114,11 @@ compare_and_verify(svn_boolean_t *modifi
SVN_ERR_ASSERT(svn_dirent_is_absolute(versioned_file_abspath));
- SVN_ERR(svn_wc__get_eol_style(&eol_style, &eol_str, db,
- versioned_file_abspath, scratch_pool,
- scratch_pool));
- SVN_ERR(svn_wc__get_keywords(&keywords, db, versioned_file_abspath, NULL,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_special(&special, db, versioned_file_abspath,
- scratch_pool));
+ SVN_ERR(svn_wc__get_translate_info(&eol_style, &eol_str,
+ &keywords,
+ &special,
+ db, versioned_file_abspath,
+ scratch_pool, scratch_pool));
need_translation = svn_subst_translation_required(eol_style, eol_str,
keywords, special, TRUE);
Modified: subversion/trunk/subversion/libsvn_wc/translate.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/translate.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/translate.c (original)
+++ subversion/trunk/subversion/libsvn_wc/translate.c Fri Jul 23 00:45:38 2010
@@ -83,7 +83,11 @@ svn_wc__internal_translated_stream(svn_s
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
SVN_ERR_ASSERT(svn_dirent_is_absolute(versioned_abspath));
- SVN_ERR(svn_wc__get_special(&special, db, versioned_abspath, scratch_pool));
+ SVN_ERR(svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special,
+ db, versioned_abspath,
+ scratch_pool, scratch_pool));
if (special)
{
@@ -95,11 +99,6 @@ svn_wc__internal_translated_stream(svn_s
scratch_pool);
}
- SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, versioned_abspath,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_keywords(&keywords, db, versioned_abspath, NULL,
- scratch_pool, scratch_pool));
-
if (to_nf)
SVN_ERR(svn_stream_open_readonly(stream, local_abspath, result_pool,
scratch_pool));
@@ -170,11 +169,11 @@ svn_wc__internal_translated_file(const c
SVN_ERR_ASSERT(svn_dirent_is_absolute(versioned_abspath));
- SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, versioned_abspath,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_keywords(&keywords, db, versioned_abspath, NULL,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_special(&special, db, versioned_abspath, scratch_pool));
+ SVN_ERR(svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special,
+ db, versioned_abspath,
+ scratch_pool, scratch_pool));
if (! svn_subst_translation_required(style, eol, keywords, special, TRUE)
&& (! (flags & SVN_WC_TRANSLATE_FORCE_COPY)))
@@ -280,56 +279,82 @@ svn_wc__eol_value_from_string(const char
*value = NULL;
}
-
svn_error_t *
-svn_wc__get_keywords(apr_hash_t **keywords,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *force_list,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_wc__get_translate_info(svn_subst_eol_style_t *style,
+ const char **eol,
+ apr_hash_t **keywords,
+ svn_boolean_t *special,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
- const char *list;
- svn_revnum_t changed_rev;
- apr_time_t changed_date;
- const char *changed_author;
- const char *url;
-
+ apr_hash_t *props;
+ svn_string_t *propval;
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- /* Choose a property list to parse: either the one that came into
- this function, or the one attached to PATH. */
- if (force_list == NULL)
- {
- const svn_string_t *propval;
-
- SVN_ERR(svn_wc__internal_propget(&propval, db, local_abspath,
- SVN_PROP_KEYWORDS, scratch_pool,
- scratch_pool));
+ SVN_ERR(svn_wc__get_actual_props(&props, db, local_abspath,
+ scratch_pool, scratch_pool));
- /* The easy answer. */
- if (propval == NULL)
- {
- *keywords = NULL;
- return SVN_NO_ERROR;
- }
+ if (eol)
+ {
+ propval = props ? apr_hash_get(props, SVN_PROP_EOL_STYLE,
+ APR_HASH_KEY_STRING) : NULL;
- list = propval->data;
+ svn_subst_eol_style_from_value(style, eol, propval ? propval->data : NULL);
}
- else
- list = force_list;
+
+ if (keywords)
+ {
+ propval = props ? apr_hash_get(props, SVN_PROP_KEYWORDS,
+ APR_HASH_KEY_STRING) : NULL;
+
+ if (!propval || propval->len == 0)
+ *keywords = NULL;
+ else
+ SVN_ERR(svn_wc__expand_keywords(keywords,
+ db, local_abspath,
+ propval->data,
+ result_pool, scratch_pool));
+ }
+ if (special)
+ {
+ propval = props ? apr_hash_get(props, SVN_PROP_SPECIAL,
+ APR_HASH_KEY_STRING) : NULL;
+
+ *special = (propval != NULL);
+ }
+
+ return SVN_NO_ERROR;
+}
+
+svn_error_t *
+svn_wc__expand_keywords(apr_hash_t **keywords,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *keyword_list,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_revnum_t changed_rev;
+ apr_time_t changed_date;
+ const char *changed_author;
+ const char *url;
SVN_ERR(svn_wc__db_read_info(NULL, NULL, NULL, NULL,
NULL, NULL, &changed_rev,
- &changed_date, &changed_author, NULL, NULL,
+ &changed_date, &changed_author, NULL,
NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- db, local_abspath, scratch_pool, scratch_pool));
+ NULL,
+ db, local_abspath,
+ scratch_pool, scratch_pool));
+
SVN_ERR(svn_wc__internal_node_get_url(&url, db, local_abspath,
scratch_pool, scratch_pool));
SVN_ERR(svn_subst_build_keywords2(keywords,
- list,
+ keyword_list,
apr_psprintf(scratch_pool, "%ld",
changed_rev),
url,
@@ -343,26 +368,6 @@ svn_wc__get_keywords(apr_hash_t **keywor
return SVN_NO_ERROR;
}
-
-svn_error_t *
-svn_wc__get_special(svn_boolean_t *special,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool)
-{
- const svn_string_t *propval;
-
- /* Get the property value. */
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR(svn_wc__internal_propget(&propval, db, local_abspath,
- SVN_PROP_SPECIAL, scratch_pool,
- scratch_pool));
- *special = propval != NULL;
-
- return SVN_NO_ERROR;
-}
-
-
svn_error_t *
svn_wc__maybe_set_executable(svn_boolean_t *did_set,
svn_wc__db_t *db,
Modified: subversion/trunk/subversion/libsvn_wc/translate.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/translate.h?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/translate.h (original)
+++ subversion/trunk/subversion/libsvn_wc/translate.h Fri Jul 23 00:45:38 2010
@@ -36,8 +36,9 @@ extern "C" {
/* Newline and keyword translation properties */
-/* Query the SVN_PROP_EOL_STYLE property on file LOCAL_ABSPATH in DB. If
- STYLE is non-null, set *STYLE to LOCAL_ABSPATH's eol style. Set *EOL to
+/* If EOL is not-NULL query the SVN_PROP_EOL_STYLE property on file
+ LOCAL_ABSPATH in DB. If STYLE is non-null, set *STYLE to LOCAL_ABSPATH's
+ eol style. Set *EOL to
- NULL for svn_subst_eol_style_none, or
@@ -50,15 +51,32 @@ extern "C" {
If STYLE is null on entry, ignore it. If *EOL is non-null on exit,
it is a static string not allocated in POOL.
+ If KEYWORDS is not NULL Expand keywords for the file at LOCAL_ABSPATH
+ in DB, by parsing a whitespace-delimited list of keywords. If any keywords
+ are found in the list, allocate *KEYWORDS from RESULT_POOL and populate it
+ with mappings from (const char *) keywords to their (svn_string_t *)
+ values (also allocated in RESULT_POOL).
+
+ If a keyword is in the list, but no corresponding value is
+ available, do not create a hash entry for it. If no keywords are
+ found in the list, or if there is no list, set *KEYWORDS to NULL.
+
+ If SPECIAL is not NULL determine if the svn:special flag is set on LOCAL_ABSPATH
+ in DB. If so, set SPECIAL to TRUE, if not, set it to FALSE
+
Use SCRATCH_POOL for temporary allocation, RESULT_POOL for allocating
*STYLE and *EOL.
*/
-svn_error_t *svn_wc__get_eol_style(svn_subst_eol_style_t *style,
- const char **eol,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
+svn_error_t *
+svn_wc__get_translate_info(svn_subst_eol_style_t *style,
+ const char **eol,
+ apr_hash_t **keywords,
+ svn_boolean_t *special,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
/* Reverse parser. Given a real EOL string ("\n", "\r", or "\r\n"),
return an encoded *VALUE ("LF", "CR", "CRLF") that one might see in
@@ -67,37 +85,26 @@ void svn_wc__eol_value_from_string(const
const char *eol);
/* Expand keywords for the file at LOCAL_ABSPATH in DB, by parsing a
- whitespace-delimited list of keywords. If any keywords are found
- in the list, allocate *KEYWORDS from RESULT_POOL and populate it with
- mappings from (const char *) keywords to their (svn_string_t *)
+ whitespace-delimited list of keywords KEYWORD_LIST. If any keywords
+ are found in the list, allocate *KEYWORDS from RESULT_POOL and populate
+ it with mappings from (const char *) keywords to their (svn_string_t *)
values (also allocated in RESULT_POOL).
If a keyword is in the list, but no corresponding value is
available, do not create a hash entry for it. If no keywords are
found in the list, or if there is no list, set *KEYWORDS to NULL.
- If FORCE_LIST is non-null, use it as the list; else use the
- SVN_PROP_KEYWORDS property for PATH. In either case, use LOCAL_ABSPATH
- to expand keyword values.
+ Use LOCAL_ABSPATH to expand keyword values.
Use SCRATCH_POOL for any temporary allocations.
*/
-svn_error_t *svn_wc__get_keywords(apr_hash_t **keywords,
- svn_wc__db_t *db,
- const char *local_abspath,
- const char *force_list,
-
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
-
-
-/* Determine if the svn:special flag is set on LOCAL_ABSPATH in DB. If so,
- set SPECIAL to TRUE, if not, set it to FALSE. Perform any temporary
- allocations in SCRATCH_POOL. */
-svn_error_t *svn_wc__get_special(svn_boolean_t *special,
- svn_wc__db_t *db,
- const char *local_abspath,
- apr_pool_t *scratch_pool);
+svn_error_t *
+svn_wc__expand_keywords(apr_hash_t **keywords,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ const char *keyword_list,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* If the SVN_PROP_EXECUTABLE property is present at all, then set
LOCAL_ABSPATH in DB executable. If DID_SET is non-null, then set
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri Jul 23 00:45:38 2010
@@ -4687,7 +4687,7 @@ merge_file(svn_skel_t **work_items,
FALSE /* compare_textbases */,
pool));
}
- else if (new_text_base_sha1_checksum)
+ else if (new_text_base_sha1_checksum && !fb->obstruction_found)
{
svn_stream_t *pristine_stream;
@@ -4705,8 +4705,13 @@ merge_file(svn_skel_t **work_items,
}
else
{
- /* No other potential changes, so the working file is NOT modified. */
- is_locally_modified = FALSE;
+ /* No other potential changes, so the working file is NOT modified.
+ Except when we have a local obstruction! */
+
+ if (fb->obstruction_found)
+ is_locally_modified = TRUE;
+ else
+ is_locally_modified = FALSE;
}
if (have_base)
@@ -4924,8 +4929,11 @@ merge_file(svn_skel_t **work_items,
apr_hash_t *keywords;
- SVN_ERR(svn_wc__get_keywords(&keywords, eb->db, fb->local_abspath, NULL,
- pool, pool));
+ SVN_ERR(svn_wc__get_translate_info(NULL, NULL,
+ &keywords,
+ NULL,
+ eb->db, fb->local_abspath,
+ pool, pool));
if (magic_props_changed || keywords)
{
/* Special edge-case: it's possible that this file installation
Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=966917&r1=966916&r2=966917&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Fri Jul 23 00:45:38 2010
@@ -1066,7 +1066,11 @@ install_committed_file(svn_boolean_t *ov
* it has the right executable and read_write attributes set.
*/
- SVN_ERR(svn_wc__get_special(&special, db, file_abspath, scratch_pool));
+ SVN_ERR(svn_wc__get_translate_info(NULL, NULL,
+ NULL,
+ &special,
+ db, file_abspath,
+ scratch_pool, scratch_pool));
if (! special && tmp != tmp_wfile)
SVN_ERR(svn_io_files_contents_same_p(&same, tmp_wfile,
file_abspath, scratch_pool));
@@ -1804,7 +1808,11 @@ run_file_install(svn_wc__db_t *db,
scratch_pool, scratch_pool));
}
- SVN_ERR(svn_wc__get_special(&special, db, local_abspath, scratch_pool));
+ /* Fetch all the translation bits. */
+ SVN_ERR(svn_wc__get_translate_info(&style, &eol,
+ &keywords,
+ &special, db, local_abspath,
+ scratch_pool, scratch_pool));
if (special)
{
/* When this stream is closed, the resulting special file will
@@ -1822,12 +1830,6 @@ run_file_install(svn_wc__db_t *db,
return SVN_NO_ERROR;
}
- /* Fetch all the translation bits. */
- SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, local_abspath,
- scratch_pool, scratch_pool));
- SVN_ERR(svn_wc__get_keywords(&keywords, db, local_abspath, NULL,
- scratch_pool, scratch_pool));
-
if (svn_subst_translation_required(style, eol, keywords,
FALSE /* special */,
TRUE /* force_eol_check */))