Author: stsp
Date: Thu Oct 13 15:25:16 2011
New Revision: 1182904
URL: http://svn.apache.org/viewvc?rev=1182904&view=rev
Log:
* subversion/libsvn_wc/entries.c
(write_entry): If a bad base MD5 checksum is found, return a proper error
message instead of asserting. Since 1.7.0 was released an overwhelming
amount of TortoiseSVN users keep reporting this assertion on users@.
TortoiseSVN asks users to send reports about assertions, but doesn't do
so for normal errors.
Modified:
subversion/trunk/subversion/libsvn_wc/entries.c
Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1182904&r1=1182903&r2=1182904&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Thu Oct 13 15:25:16 2011
@@ -1934,9 +1934,20 @@ write_entry(struct write_baton **entry_n
found_md5_checksum = text_base_info->normal_base.md5_checksum;
else
found_md5_checksum = NULL;
- if (entry_md5_checksum && found_md5_checksum)
- SVN_ERR_ASSERT(svn_checksum_match(entry_md5_checksum,
- found_md5_checksum));
+ if (entry_md5_checksum && found_md5_checksum &&
+ !svn_checksum_match(entry_md5_checksum, found_md5_checksum))
+ return svn_error_createf(SVN_ERR_WC_CORRUPT, NULL,
+ _("Bad base MD5 checksum for '%s'; "
+ "expected: '%s'; found '%s'; "),
+ svn_dirent_local_style(
+ svn_dirent_join(root_abspath,
+ local_relpath,
+ scratch_pool),
+ scratch_pool),
+ svn_checksum_to_cstring_display(
+ entry_md5_checksum, scratch_pool),
+ svn_checksum_to_cstring_display(
+ found_md5_checksum, scratch_pool));
else
{
/* ### Not sure what conditions this should cover. */