[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] fix comment for svn_wc_conflicted_p()

From: Neels Hofmeyr <neels_at_elego.de>
Date: Sat, 23 Aug 2008 02:09:54 +0200

Hi dev,

The comment for

 subversion/include/svn_wc.h (svn_wc_conflicted_p)

is both misleading and incomplete.

Quoting the comment:
"
/** Given a @a dir_path under version control, decide if one of its
 * entries (@a entry) is in state of conflict; return the answers in
 * @a text_conflicted_p and @a prop_conflicted_p.
 *
 * (If the entry mentions that a .rej or .prej exist, but they are
 * both removed, assume the conflict has been resolved by the user.)
 */
"

1) It does not mention that .rej and .prej refer to file suffixes.

2) It says that a conflict is assumed resolved when *both* mentioned
conflict files have been removed.

- In fact, this function returns conflict states independently. Each
conflict is assumed resolved when its respective file can't be found.

- It would be clearer to say "cannot be found" instead of "have been removed".

3) The comment fails to mention that the entry is not updated, as might be
expected by the reader.

There is some discussion on whether this function should actually rather not
assume anything from missing conflicts files. However, even in its current
implementation, the comment is insufficient.

I suggest committing this patch, followed by a discussion on the assumptions
made by the function. (btw, I vaguely favour changing this function to only
reflect the information in ENTRY, no files involved.)

[[[
* subversion/include/svn_wc.h (svn_wc_conflicted_p): Fix and clarify the
    function's descriptive comment. Say that .rej and .prej refer to
    conflict files, that returned states are independent from each other
    and that ENTRY is not updated.
]]]

-- 
Neels Hofmeyr -- elego Software Solutions GmbH
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23458696  mobile: +49 177 2345869  fax: +49 30 23458695
http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelsreg: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194

Received on 2008-08-23 02:13:53 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.