You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2011/05/07 08:26:54 UTC
svn commit: r1100460 -
/subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Author: gstein
Date: Sat May 7 06:26:54 2011
New Revision: 1100460
URL: http://svn.apache.org/viewvc?rev=1100460&view=rev
Log:
Simplify some tree conflict code by removing an (unused) error return.
* subversion/libsvn_wc/tree_conflicts.c:
(skel_prepend_enum): remove error return. never used.
(prepend_version_info, svn_wc_serialize_conflict): adjust calls to
skel_prepend_enum().
Modified:
subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Modified: subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/tree_conflicts.c?rev=1100460&r1=1100459&r2=1100460&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/tree_conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/tree_conflicts.c Sat May 7 06:26:54 2011
@@ -114,6 +114,7 @@ is_valid_conflict_skel(const svn_skel_t
&& is_valid_version_info_skel(skel->next));
}
+
/* Parse the enumeration value in VALUE into a plain
* 'int', using MAP to convert from strings to enumeration values.
* In MAP, a null .str field marks the end of the map.
@@ -131,9 +132,11 @@ read_enum_field(int *result,
"description"));
*result = value;
+
return SVN_NO_ERROR;
}
+
/* Parse the conflict info fields from SKEL into *VERSION_INFO. */
static svn_error_t *
read_node_version_info(const svn_wc_conflict_version_t **version_info,
@@ -182,6 +185,7 @@ read_node_version_info(const svn_wc_conf
return SVN_NO_ERROR;
}
+
svn_error_t *
svn_wc__deserialize_conflict(const svn_wc_conflict_description2_t **conflict,
const svn_skel_t *skel,
@@ -260,13 +264,14 @@ svn_wc__deserialize_conflict(const svn_w
new_conflict->reason = reason;
*conflict = new_conflict;
+
return SVN_NO_ERROR;
}
/* Prepend to SKEL the string corresponding to enumeration value N, as found
* in MAP. */
-static svn_error_t *
+static void
skel_prepend_enum(svn_skel_t *skel,
const svn_token_map_t *map,
int n,
@@ -274,9 +279,9 @@ skel_prepend_enum(svn_skel_t *skel,
{
svn_skel__prepend(svn_skel__str_atom(svn_token__to_word(map, n),
result_pool), skel);
- return SVN_NO_ERROR;
}
+
/* Prepend to PARENT_SKEL the several fields that represent VERSION_INFO, */
static svn_error_t *
prepend_version_info_skel(svn_skel_t *parent_skel,
@@ -286,8 +291,7 @@ prepend_version_info_skel(svn_skel_t *pa
svn_skel_t *skel = svn_skel__make_empty_list(pool);
/* node_kind */
- SVN_ERR(skel_prepend_enum(skel, node_kind_map, version_info->node_kind,
- pool));
+ skel_prepend_enum(skel, node_kind_map, version_info->node_kind, pool);
/* path_in_repos */
svn_skel__prepend(svn_skel__str_atom(version_info->path_in_repos
@@ -341,22 +345,21 @@ svn_wc__serialize_conflict(svn_skel_t **
SVN_ERR(prepend_version_info_skel(c_skel, &null_version, result_pool));
/* reason */
- SVN_ERR(skel_prepend_enum(c_skel, svn_wc__conflict_reason_map,
- conflict->reason, result_pool));
+ skel_prepend_enum(c_skel, svn_wc__conflict_reason_map, conflict->reason,
+ result_pool);
/* action */
- SVN_ERR(skel_prepend_enum(c_skel, svn_wc__conflict_action_map,
- conflict->action, result_pool));
+ skel_prepend_enum(c_skel, svn_wc__conflict_action_map, conflict->action,
+ result_pool);
/* operation */
- SVN_ERR(skel_prepend_enum(c_skel, svn_wc__operation_map,
- conflict->operation, result_pool));
+ skel_prepend_enum(c_skel, svn_wc__operation_map, conflict->operation,
+ result_pool);
/* node_kind */
SVN_ERR_ASSERT(conflict->node_kind == svn_node_dir
|| conflict->node_kind == svn_node_file);
- SVN_ERR(skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind,
- result_pool));
+ skel_prepend_enum(c_skel, node_kind_map, conflict->node_kind, result_pool);
/* Victim path (escaping separator chars). */
victim_basename = svn_dirent_basename(conflict->local_abspath, result_pool);
@@ -368,6 +371,7 @@ svn_wc__serialize_conflict(svn_skel_t **
SVN_ERR_ASSERT(is_valid_conflict_skel(c_skel));
*skel = c_skel;
+
return SVN_NO_ERROR;
}
@@ -382,8 +386,8 @@ svn_wc__del_tree_conflict(svn_wc_context
SVN_ERR(svn_wc__db_op_set_tree_conflict(wc_ctx->db, victim_abspath,
NULL, scratch_pool));
- return SVN_NO_ERROR;
-}
+ return SVN_NO_ERROR;
+ }
svn_error_t *
svn_wc__add_tree_conflict(svn_wc_context_t *wc_ctx,
Re: svn commit: r1100460 - /subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Posted by Greg Stein <gs...@gmail.com>.
On May 7, 2011 10:18 PM, "Hyrum K Wright" <hy...@hyrumwright.org> wrote:
>
> On Sat, May 7, 2011 at 1:26 AM, <gs...@apache.org> wrote:
> > Author: gstein
> > Date: Sat May 7 06:26:54 2011
> > New Revision: 1100460
> >
> > URL: http://svn.apache.org/viewvc?rev=1100460&view=rev
> > Log:
> > Simplify some tree conflict code by removing an (unused) error return.
>
> ...and add a bunch of vertical whitespace. :)
>
> (I thought you were the guy who advocated separating whitespace and
> functional changes into separate commits. :P )
... when those whitespace changes hide functional changes, yes. For example,
indents. You can't see functional changes within a 20-line block of indent
change.
I added some blank lines, but those did not affect the reviewability, nor
was it a significant change to the whitespace, column wrapping, or other
non-functional style.
And in this case, I didn't feel the blank lines reached a level of
significance to merit a mention.
In short: fully-considered :-)
Cheers,
-g
Re: svn commit: r1100460 - /subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Posted by Greg Stein <gs...@gmail.com>.
On May 7, 2011 10:18 PM, "Hyrum K Wright" <hy...@hyrumwright.org> wrote:
>
> On Sat, May 7, 2011 at 1:26 AM, <gs...@apache.org> wrote:
> > Author: gstein
> > Date: Sat May 7 06:26:54 2011
> > New Revision: 1100460
> >
> > URL: http://svn.apache.org/viewvc?rev=1100460&view=rev
> > Log:
> > Simplify some tree conflict code by removing an (unused) error return.
>
> ...and add a bunch of vertical whitespace. :)
>
> (I thought you were the guy who advocated separating whitespace and
> functional changes into separate commits. :P )
... when those whitespace changes hide functional changes, yes. For example,
indents. You can't see functional changes within a 20-line block of indent
change.
I added some blank lines, but those did not affect the reviewability, nor
was it a significant change to the whitespace, column wrapping, or other
non-functional style.
And in this case, I didn't feel the blank lines reached a level of
significance to merit a mention.
In short: fully-considered :-)
Cheers,
-g
Re: svn commit: r1100460 - /subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Posted by Hyrum K Wright <hy...@hyrumwright.org>.
On Sat, May 7, 2011 at 1:26 AM, <gs...@apache.org> wrote:
> Author: gstein
> Date: Sat May 7 06:26:54 2011
> New Revision: 1100460
>
> URL: http://svn.apache.org/viewvc?rev=1100460&view=rev
> Log:
> Simplify some tree conflict code by removing an (unused) error return.
...and add a bunch of vertical whitespace. :)
(I thought you were the guy who advocated separating whitespace and
functional changes into separate commits. :P )
> ...
-Hyrum
Re: svn commit: r1100460 - /subversion/trunk/subversion/libsvn_wc/tree_conflicts.c
Posted by Hyrum K Wright <hy...@hyrumwright.org>.
On Sat, May 7, 2011 at 1:26 AM, <gs...@apache.org> wrote:
> Author: gstein
> Date: Sat May 7 06:26:54 2011
> New Revision: 1100460
>
> URL: http://svn.apache.org/viewvc?rev=1100460&view=rev
> Log:
> Simplify some tree conflict code by removing an (unused) error return.
...and add a bunch of vertical whitespace. :)
(I thought you were the guy who advocated separating whitespace and
functional changes into separate commits. :P )
> ...
-Hyrum