Author: julianfoad Date: Fri Aug 26 09:25:19 2011 New Revision: 1162040 URL: http://svn.apache.org/viewvc?rev=1162040&view=rev Log: In 'diff --summarize', stop downloading full texts for deleted files, because that takes time and we don't need them. A follow-up to r1159880.
* subversion/libsvn_client/repos_diff.c (diff_deleted_dir, delete_entry): Don't fetch the old file if we don't need it. (apply_textdelta): If we're not expecting to receive text deltas, use the 'noop' window handler and indicate that there was a text change even though we don't have the text. Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c Modified: subversion/trunk/subversion/libsvn_client/repos_diff.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/repos_diff.c?rev=1162040&r1=1162039&r2=1162040&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_client/repos_diff.c (original) +++ subversion/trunk/subversion/libsvn_client/repos_diff.c Fri Aug 26 09:25:19 2011 @@ -545,7 +545,10 @@ diff_deleted_dir(const char *dir, /* Compare a file being deleted against an empty file */ b = make_file_baton(path, FALSE, eb, iterpool); - SVN_ERR(get_file_from_ra(b, FALSE, iterpool)); + if (eb->text_deltas) + SVN_ERR(get_file_from_ra(b, FALSE, iterpool)); + else + SVN_ERR(get_empty_file(eb, &b->path_start_revision)); SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision))); @@ -617,7 +620,11 @@ delete_entry(const char *path, /* Compare a file being deleted against an empty file */ b = make_file_baton(path, FALSE, eb, scratch_pool); - SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool)); + if (eb->text_deltas) + SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool)); + else + SVN_ERR(get_empty_file(eb, &b->path_start_revision)); + SVN_ERR(get_empty_file(b->edit_baton, &(b->path_end_revision))); get_file_mime_types(&mimetype1, &mimetype2, b); @@ -908,6 +915,19 @@ apply_textdelta(void *file_baton, return SVN_NO_ERROR; } + /* If we're not sending file text, then ignore any that we receive. */ + if (! b->edit_baton->text_deltas) + { + /* Supply valid paths to indicate there is a text change. */ + SVN_ERR(get_empty_file(b->edit_baton, &b->path_start_revision)); + SVN_ERR(get_empty_file(b->edit_baton, &b->path_end_revision)); + + *handler = svn_delta_noop_window_handler; + *handler_baton = NULL; + + return SVN_NO_ERROR; + } + /* We need the expected pristine file, so go get it */ if (!b->added) SVN_ERR(get_file_from_ra(b, FALSE, scratch_pool));