You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/04/15 22:42:30 UTC
svn commit: r934588 - in /subversion/trunk/subversion: include/svn_client.h
include/svn_diff.h libsvn_client/patch.c libsvn_diff/parse-diff.c
Author: dannas
Date: Thu Apr 15 20:42:30 2010
New Revision: 934588
URL: http://svn.apache.org/viewvc?rev=934588&view=rev
Log:
Follow-up to r934569. Add missing doc comments.
* subversion/include/svn_diff.h
(svn_diff_parse_next_patch): Add missing doc comment for IGNORE_WHITESPACES
parameter.
* subversion/include/svn_client.h
(svn_client_patch): Add missing doc comment for IGNORE_WHITESPACES parameter.
* subversion/libsvn_client/patch.c
(match_hunk,
scan_for_match,
get_hunk_info,
apply_one_patch): Add missing doc comment for IGNORE_WHITESPACES parameter.
* subversion/libsvn_diff/parse-diff.c
(parse_next_hunk): Add missing doc comment for IGNORE_WHITESPACES parameter.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/include/svn_diff.h
subversion/trunk/subversion/libsvn_client/patch.c
subversion/trunk/subversion/libsvn_diff/parse-diff.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=934588&r1=934587&r2=934588&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Thu Apr 15 20:42:30 2010
@@ -4886,6 +4886,9 @@ svn_client_info(const char *path_or_url,
* of the patching process, e.g. for display purposes, without actually
* modifying the working copy.
*
+ * If @a ignore_whitespaces is TRUE, allow patches to be applied if they
+ * only differ from the target by whitespaces.
+ *
* If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
* @a ctx->notify_baton2 as patching progresses.
*
Modified: subversion/trunk/subversion/include/svn_diff.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_diff.h?rev=934588&r1=934587&r2=934588&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_diff.h (original)
+++ subversion/trunk/subversion/include/svn_diff.h Thu Apr 15 20:42:30 2010
@@ -858,6 +858,8 @@ typedef struct svn_patch_t {
* Return the next @a *patch in @a patch_file.
* If no patch can be found, set @a *patch to NULL.
* If @a reverse is TRUE, invert the patch while parsing it.
+ * If @a ignore_whitespaces is TRUE, allow patches with no leading
+ * whitespaces to be parsed.
* Allocate results in @a result_pool.
* Use @a scratch_pool for all other allocations.
*
Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=934588&r1=934587&r2=934588&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Thu Apr 15 20:42:30 2010
@@ -617,7 +617,8 @@ seek_to_line(patch_target_t *target, svn
/* Indicate in *MATCHED whether the original text of HUNK matches the patch
* TARGET at its current line. Lines within FUZZ lines of the start or end
- * of HUNK will always match. When this function returns, neither
+ * of HUNK will always match. If IGNORE_WHiTESPACES is set, we ignore
+ * whitespaces when doing the matching. When this function returns, neither
* TARGET->CURRENT_LINE nor the file offset in the target file will have
* changed. HUNK->ORIGINAL_TEXT will be reset. Do temporary allocations in
* POOL. */
@@ -718,6 +719,7 @@ match_hunk(svn_boolean_t *matched, patch
* return the line number at which the first match occured in *MATCHED_LINE.
* If the hunk matched multiple times, and MATCH_FIRST is FALSE,
* return the line number at which the last match occured in *MATCHED_LINE.
+ * If IGNORE_WHiTESPACES is set, ignore whitespaces during the matching.
* Do all allocations in POOL. */
static svn_error_t *
scan_for_match(svn_linenum_t *matched_line, patch_target_t *target,
@@ -778,8 +780,9 @@ scan_for_match(svn_linenum_t *matched_li
* and return an appropriate hunk_info object in *HI, allocated from
* RESULT_POOL. Use fuzz factor FUZZ. Set HI->FUZZ to FUZZ. If no correct
* line can be determined, set HI->REJECTED to TRUE.
- * When this function returns, neither TARGET->CURRENT_LINE nor the file
- * offset in the target file will have changed.
+ * IGNORE_WHiTESPACES tells whether whitespaces should be considered when
+ * matching. When this function returns, neither TARGET->CURRENT_LINE nor
+ * the file offset in the target file will have changed.
* Do temporary allocations in POOL. */
static svn_error_t *
get_hunk_info(hunk_info_t **hi, patch_target_t *target,
@@ -1124,6 +1127,8 @@ send_patch_notification(const patch_targ
* If PATCHED_TEMPFILES or REJECT_TEMPFILES are not NULL, add the path
* to temporary patched/reject files to them, keyed by the target's path
* as parsed from the patch file (after canonicalization).
+ * IGNORE_WHiTESPACES tells whether whitespaces should be considered when
+ * doing the matching.
* Do temporary allocations in SCRATCH_POOL. */
static svn_error_t *
apply_one_patch(patch_target_t **patch_target, svn_patch_t *patch,
Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=934588&r1=934587&r2=934588&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Thu Apr 15 20:42:30 2010
@@ -260,9 +260,10 @@ reverse_diff_transformer(svn_stringbuf_t
/* Return the next *HUNK from a PATCH, using STREAM to read data
* from the patch file. If no hunk can be found, set *HUNK to NULL.
- * If REVERSE is TRUE, invert the hunk while parsing it.
- * Allocate results in RESULT_POOL.
- * Use SCRATCH_POOL for all other allocations. */
+ * If REVERSE is TRUE, invert the hunk while parsing it. If
+ * IGNORE_WHiTESPACES is TRUE, let lines without leading spaces be
+ * recognized as context lines. Allocate results in RESULT_POOL. Use
+ * SCRATCH_POOL for all other allocations. */
static svn_error_t *
parse_next_hunk(svn_hunk_t **hunk,
svn_patch_t *patch,