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/06/11 11:32:07 UTC
svn commit: r953622 - in /subversion/trunk/subversion/libsvn_wc: entries.h
log.c log.h old-and-busted.c
Author: rhuijben
Date: Fri Jun 11 09:32:06 2010
New Revision: 953622
URL: http://svn.apache.org/viewvc?rev=953622&view=rev
Log:
Remove the loggy entry modification system as it is no longer being used.
since r953617.
* subversion/libsvn_wc/entries.h
(svn_wc__atts_to_entry): Remove function from public view.
* subversion/libsvn_wc/log.c
(SVN_WC__LOG_MODIFY_ENTRY): Remove define.
(log_do_modify_entry): Remove function.
(start_handler): Remove modify entry support.
(svn_wc__loggy_entry_modify): Remove function.
* subversion/libsvn_wc/log.h
(svn_wc__loggy_entry_modify): Remove function.
* subversion/libsvn_wc/old-and-busted.c
(svn_wc__atts_to_entry): Rename function to ...
(atts_to_entry): ... this and make static.
(handle_start_tag): Update caller.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.h
subversion/trunk/subversion/libsvn_wc/log.c
subversion/trunk/subversion/libsvn_wc/log.h
subversion/trunk/subversion/libsvn_wc/old-and-busted.c
Modified: subversion/trunk/subversion/libsvn_wc/entries.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.h?rev=953622&r1=953621&r2=953622&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.h (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.h Fri Jun 11 09:32:06 2010
@@ -49,18 +49,6 @@ extern "C" {
#define SVN_WC__ENTRY_ATTR_CONFLICT_WRK "conflict-wrk" /* saved wrk file */
#define SVN_WC__ENTRY_ATTR_PREJFILE "prop-reject-file"
-
-/* Set *NEW_ENTRY to a new entry, taking attributes from ATTS, whose
- keys and values are both char *. Allocate the entry and copy
- attributes into POOL as needed.
-
- Set MODIFY_FLAGS to reflect the fields that were present in ATTS. */
-svn_error_t *svn_wc__atts_to_entry(svn_wc_entry_t **new_entry,
- int *modify_flags,
- apr_hash_t *atts,
- apr_pool_t *pool);
-
-
/* The MODIFY_FLAGS that tell svn_wc__entry_modify which parameters to
pay attention to. ### These should track the changes made to the
SVN_WC__ENTRY_ATTR_* #defines! */
Modified: subversion/trunk/subversion/libsvn_wc/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.c?rev=953622&r1=953621&r2=953622&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.c (original)
+++ subversion/trunk/subversion/libsvn_wc/log.c Fri Jun 11 09:32:06 2010
@@ -70,10 +70,6 @@
/** Log actions. **/
-/* Set some attributes on SVN_WC__LOG_ATTR_NAME's entry. Unmentioned
- attributes are unaffected. */
-#define SVN_WC__LOG_MODIFY_ENTRY "modify-entry"
-
/* Delete lock related fields from the entry SVN_WC__LOG_ATTR_NAME. */
#define SVN_WC__LOG_DELETE_LOCK "delete-lock"
@@ -246,31 +242,6 @@ log_do_file_timestamp(struct log_runner
return SVN_NO_ERROR;
}
-
-/* */
-static svn_error_t *
-log_do_modify_entry(struct log_runner *loggy,
- const char *name,
- const char **atts)
-{
- apr_hash_t *ah = svn_xml_make_att_hash(atts, loggy->pool);
- const char *local_abspath;
- svn_wc_entry_t *entry;
- int modify_flags;
-
- local_abspath = svn_dirent_join(loggy->adm_abspath, name, loggy->pool);
-
- /* Convert the attributes into an entry structure. */
- SVN_ERR(svn_wc__atts_to_entry(&entry, &modify_flags, ah, loggy->pool));
-
- /* ### this function never needs to modify a parent stub.
- ### NOTE: this call to entry_modify MAY create a new node. */
- return svn_error_return(svn_wc__entry_modify(loggy->db, local_abspath,
- svn_node_unknown,
- entry, modify_flags,
- loggy->pool));
-}
-
/* */
static svn_error_t *
log_do_delete_lock(struct log_runner *loggy,
@@ -465,10 +436,7 @@ start_handler(void *userData, const char
#endif
/* Dispatch. */
- if (strcmp(eltname, SVN_WC__LOG_MODIFY_ENTRY) == 0) {
- err = log_do_modify_entry(loggy, name, atts);
- }
- else if (strcmp(eltname, SVN_WC__LOG_DELETE_LOCK) == 0) {
+ if (strcmp(eltname, SVN_WC__LOG_DELETE_LOCK) == 0) {
err = log_do_delete_lock(loggy, name);
}
else if (strcmp(eltname, SVN_WC__LOG_DELETE_ENTRY) == 0) {
@@ -694,76 +662,6 @@ svn_wc__loggy_delete_lock(svn_skel_t **w
svn_error_t *
-svn_wc__loggy_entry_modify(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *adm_abspath,
- const char *local_abspath,
- const svn_wc_entry_t *entry,
- apr_uint64_t modify_flags,
- apr_pool_t *result_pool)
-{
- svn_stringbuf_t *log_accum = NULL;
- const char *loggy_path1;
- apr_hash_t *prop_hash = apr_hash_make(result_pool);
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
- SVN_ERR_ASSERT(modify_flags != 0);
-
- /* ### this code has a limited set of modifications. enforce it. */
- SVN_ERR_ASSERT((modify_flags & ~(0
- /* from props.c */
- | SVN_WC__ENTRY_MODIFY_PREJFILE
-
- /* from merge.c */
- | SVN_WC__ENTRY_MODIFY_CONFLICT_OLD
- | SVN_WC__ENTRY_MODIFY_CONFLICT_NEW
- | SVN_WC__ENTRY_MODIFY_CONFLICT_WRK)) == 0);
-
-#define ADD_ENTRY_ATTR(attr_flag, attr_name, value) \
- if (modify_flags & (attr_flag)) \
- apr_hash_set(prop_hash, (attr_name), APR_HASH_KEY_STRING, value)
-
- if (modify_flags & SVN_WC__ENTRY_MODIFY_CONFLICT_OLD)
- SVN_ERR_ASSERT(entry->conflict_old != NULL);
- ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CONFLICT_OLD,
- SVN_WC__ENTRY_ATTR_CONFLICT_OLD,
- entry->conflict_old);
-
- if (modify_flags & SVN_WC__ENTRY_MODIFY_CONFLICT_NEW)
- SVN_ERR_ASSERT(entry->conflict_new != NULL);
- ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CONFLICT_NEW,
- SVN_WC__ENTRY_ATTR_CONFLICT_NEW,
- entry->conflict_new);
-
- ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_CONFLICT_WRK,
- SVN_WC__ENTRY_ATTR_CONFLICT_WRK,
- entry->conflict_wrk ? entry->conflict_wrk : "");
-
- if (modify_flags & SVN_WC__ENTRY_MODIFY_PREJFILE)
- SVN_ERR_ASSERT(entry->prejfile != NULL);
- ADD_ENTRY_ATTR(SVN_WC__ENTRY_MODIFY_PREJFILE,
- SVN_WC__ENTRY_ATTR_PREJFILE,
- entry->prejfile);
-
-#undef ADD_ENTRY_ATTR
-
- SVN_ERR_ASSERT(apr_hash_count(prop_hash) != 0);
-
- SVN_ERR(loggy_path(&loggy_path1, local_abspath, adm_abspath, result_pool));
- apr_hash_set(prop_hash, SVN_WC__LOG_ATTR_NAME,
- APR_HASH_KEY_STRING, loggy_path1);
-
- svn_xml_make_open_tag_hash(&log_accum, result_pool,
- svn_xml_self_closing,
- SVN_WC__LOG_MODIFY_ENTRY,
- prop_hash);
- return svn_error_return(svn_wc__wq_build_loggy(work_item,
- db, adm_abspath, log_accum,
- result_pool));
-}
-
-
-svn_error_t *
svn_wc__loggy_move(svn_skel_t **work_item,
svn_wc__db_t *db,
const char *adm_abspath,
Modified: subversion/trunk/subversion/libsvn_wc/log.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/log.h?rev=953622&r1=953621&r2=953622&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/log.h (original)
+++ subversion/trunk/subversion/libsvn_wc/log.h Fri Jun 11 09:32:06 2010
@@ -88,28 +88,6 @@ svn_wc__loggy_delete_lock(svn_skel_t **w
const char *local_abspath,
apr_pool_t *result_pool);
-
-/* Queue operations to modify the entry associated with PATH
- in ADM_ABSPATH according to the flags specified in MODIFY_FLAGS, based on
- the values supplied in *ENTRY.
-
- ADM_ABSPATH is the absolute path for the admin directory for PATH.
-
- The flags in MODIFY_FLAGS are to be taken from the svn_wc__entry_modify()
- parameter by the same name.
-
- Use SCRATCH_POOL for temporary allocations.
-*/
-svn_error_t *
-svn_wc__loggy_entry_modify(svn_skel_t **work_item,
- svn_wc__db_t *db,
- const char *adm_abspath,
- const char *local_abspath,
- const svn_wc_entry_t *entry,
- apr_uint64_t modify_flags,
- apr_pool_t *result_pool);
-
-
/* Queue instructions to move the file SRC_PATH to DST_PATH.
The test for existence is made now, not at log run time.
Modified: subversion/trunk/subversion/libsvn_wc/old-and-busted.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/old-and-busted.c?rev=953622&r1=953621&r2=953622&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/old-and-busted.c (original)
+++ subversion/trunk/subversion/libsvn_wc/old-and-busted.c Fri Jun 11 09:32:06 2010
@@ -769,8 +769,8 @@ extract_string_normalize(int *modify_fla
}
-/* NOTE: this is used for running old logs, and for upgrading old XML-based
- entries file. Be wary of removing items.
+/* NOTE: this is used for upgrading old XML-based entries file. Be wary of
+ removing items.
### many attributes are no longer used within the old-style log files.
### These attrs need to be recognized for old entries, however. For these
@@ -778,12 +778,17 @@ extract_string_normalize(int *modify_fla
### for that particular field. MODIFY_FLAGS is *only* used by the
### log-based entry modification system, and will go way once we
### completely move away from loggy.
-*/
-svn_error_t *
-svn_wc__atts_to_entry(svn_wc_entry_t **new_entry,
- int *modify_flags,
- apr_hash_t *atts,
- apr_pool_t *pool)
+
+ Set *NEW_ENTRY to a new entry, taking attributes from ATTS, whose
+ keys and values are both char *. Allocate the entry and copy
+ attributes into POOL as needed.
+
+ Set MODIFY_FLAGS to reflect the fields that were present in ATTS. */
+static svn_error_t *
+atts_to_entry(svn_wc_entry_t **new_entry,
+ int *modify_flags,
+ apr_hash_t *atts,
+ apr_pool_t *pool)
{
svn_wc_entry_t *entry = alloc_entry(pool);
const char *name;
@@ -1045,7 +1050,7 @@ handle_start_tag(void *userData, const c
svn_pool_clear(accum->scratch_pool);
/* Make an entry from the attributes. */
attributes = svn_xml_make_att_hash(atts, accum->scratch_pool);
- err = svn_wc__atts_to_entry(&entry, &modify_flags, attributes, accum->pool);
+ err = atts_to_entry(&entry, &modify_flags, attributes, accum->pool);
if (err)
{
svn_xml_signal_bailout(err, accum->parser);
Re: svn commit: r953622 - in /subversion/trunk/subversion/libsvn_wc:
entries.h log.c log.h old-and-busted.c
Posted by Greg Stein <gs...@gmail.com>.
On Fri, Jun 11, 2010 at 05:32, <rh...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/log.c Fri Jun 11 09:32:06 2010
>...
> - /* ### this code has a limited set of modifications. enforce it. */
> - SVN_ERR_ASSERT((modify_flags & ~(0
> - /* from props.c */
> - | SVN_WC__ENTRY_MODIFY_PREJFILE
> -
> - /* from merge.c */
> - | SVN_WC__ENTRY_MODIFY_CONFLICT_OLD
> - | SVN_WC__ENTRY_MODIFY_CONFLICT_NEW
> - | SVN_WC__ENTRY_MODIFY_CONFLICT_WRK)) == 0);
Can these defines be removed from entries.h ?
>...
> +++ subversion/trunk/subversion/libsvn_wc/old-and-busted.c Fri Jun 11 09:32:06 2010
>...
> @@ -778,12 +778,17 @@ extract_string_normalize(int *modify_fla
> ### for that particular field. MODIFY_FLAGS is *only* used by the
> ### log-based entry modification system, and will go way once we
> ### completely move away from loggy.
> -*/
> -svn_error_t *
> -svn_wc__atts_to_entry(svn_wc_entry_t **new_entry,
> - int *modify_flags,
> - apr_hash_t *atts,
> - apr_pool_t *pool)
> +
> + Set *NEW_ENTRY to a new entry, taking attributes from ATTS, whose
> + keys and values are both char *. Allocate the entry and copy
> + attributes into POOL as needed.
> +
> + Set MODIFY_FLAGS to reflect the fields that were present in ATTS. */
> +static svn_error_t *
> +atts_to_entry(svn_wc_entry_t **new_entry,
> + int *modify_flags,
> + apr_hash_t *atts,
> + apr_pool_t *pool)
handle_start_tag() does not require MODIFY_FLAGS.
>...
Cheers,
-g