You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2013/02/05 12:55:17 UTC
svn commit: r1442555 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Author: ivan
Date: Tue Feb 5 11:55:17 2013
New Revision: 1442555
URL: http://svn.apache.org/viewvc?rev=1442555&view=rev
Log:
Do not send empty text-delta for equal files in update reporter.
* subversion/libsvn_repos/reporter.c
(delta_files): Always use svn_repos__compare_files() function to check
that file content is changed regardless of IGNORE_ANCESTRY flag.
IGNORE_ANCESTRY flag is already handled on caller side in update_entry()
function.
Modified:
subversion/trunk/subversion/libsvn_repos/reporter.c
Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1442555&r1=1442554&r2=1442555&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb 5 11:55:17 2013
@@ -687,18 +687,15 @@ delta_files(report_baton_t *b, void *fil
{
SVN_ERR(get_source_root(b, &s_root, s_rev));
- /* Is this delta calculation worth our time? If we are ignoring
- ancestry, then our editor implementor isn't concerned by the
- theoretical differences between "has contents which have not
- changed with respect to" and "has the same actual contents
- as". We'll do everything we can to avoid transmitting even
- an empty text-delta in that case. */
- if (b->ignore_ancestry)
- SVN_ERR(svn_repos__compare_files(&changed, b->t_root, t_path,
- s_root, s_path, pool));
- else
- SVN_ERR(svn_fs_contents_changed(&changed, b->t_root, t_path, s_root,
- s_path, pool));
+ /* Is this delta calculation worth our time? We'll do everything we can
+ to avoid transmitting even an empty text-delta in that case.
+ It doesn't matter if we are ignoring ancestry or not: we're not
+ interested in theoretical differences between "has contents which
+ have not changed with respect to" and "has the same actual contents
+ as" when sending text-delta. */
+ SVN_ERR(svn_repos__compare_files(&changed, b->t_root, t_path,
+ s_root, s_path, pool));
+
if (!changed)
return SVN_NO_ERROR;
Re: svn commit: r1442555 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Tue, Feb 5, 2013 at 7:20 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 02/05/2013 06:55 AM, ivan@apache.org wrote:
>> Author: ivan
>> Date: Tue Feb 5 11:55:17 2013
>> New Revision: 1442555
>
> [...]
>
>> +++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb 5 11:55:17 2013
>
> [...]
>
>> + /* Is this delta calculation worth our time? We'll do everything we can
>> + to avoid transmitting even an empty text-delta in that case.
>> + It doesn't matter if we are ignoring ancestry or not: we're not
>> + interested in theoretical differences between "has contents which
>> + have not changed with respect to" and "has the same actual contents
>> + as" when sending text-delta. */
>
> You've left this comment somewhat crippled. Suggest simplifying:
>
> /* We're not interested in the theoretical difference between "has
> contents which have not changed with respect to" and "has the same
> actual contents as" when sending text-deltas. If we know the
> delta is an empty one, we avoiding sending it in either case. */
>
>
Fixed in r1442867. Thanks!
--
Ivan Zhakov
Re: svn commit: r1442555 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Tue, Feb 5, 2013 at 7:20 PM, C. Michael Pilato <cm...@collab.net> wrote:
> On 02/05/2013 06:55 AM, ivan@apache.org wrote:
>> Author: ivan
>> Date: Tue Feb 5 11:55:17 2013
>> New Revision: 1442555
>
> [...]
>
>> +++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb 5 11:55:17 2013
>
> [...]
>
>> + /* Is this delta calculation worth our time? We'll do everything we can
>> + to avoid transmitting even an empty text-delta in that case.
>> + It doesn't matter if we are ignoring ancestry or not: we're not
>> + interested in theoretical differences between "has contents which
>> + have not changed with respect to" and "has the same actual contents
>> + as" when sending text-delta. */
>
> You've left this comment somewhat crippled. Suggest simplifying:
>
> /* We're not interested in the theoretical difference between "has
> contents which have not changed with respect to" and "has the same
> actual contents as" when sending text-deltas. If we know the
> delta is an empty one, we avoiding sending it in either case. */
>
>
Fixed in r1442867. Thanks!
--
Ivan Zhakov
Re: svn commit: r1442555 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/05/2013 06:55 AM, ivan@apache.org wrote:
> Author: ivan
> Date: Tue Feb 5 11:55:17 2013
> New Revision: 1442555
[...]
> +++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb 5 11:55:17 2013
[...]
> + /* Is this delta calculation worth our time? We'll do everything we can
> + to avoid transmitting even an empty text-delta in that case.
> + It doesn't matter if we are ignoring ancestry or not: we're not
> + interested in theoretical differences between "has contents which
> + have not changed with respect to" and "has the same actual contents
> + as" when sending text-delta. */
You've left this comment somewhat crippled. Suggest simplifying:
/* We're not interested in the theoretical difference between "has
contents which have not changed with respect to" and "has the same
actual contents as" when sending text-deltas. If we know the
delta is an empty one, we avoiding sending it in either case. */
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development
Re: svn commit: r1442555 - /subversion/trunk/subversion/libsvn_repos/reporter.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 02/05/2013 06:55 AM, ivan@apache.org wrote:
> Author: ivan
> Date: Tue Feb 5 11:55:17 2013
> New Revision: 1442555
[...]
> +++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Feb 5 11:55:17 2013
[...]
> + /* Is this delta calculation worth our time? We'll do everything we can
> + to avoid transmitting even an empty text-delta in that case.
> + It doesn't matter if we are ignoring ancestry or not: we're not
> + interested in theoretical differences between "has contents which
> + have not changed with respect to" and "has the same actual contents
> + as" when sending text-delta. */
You've left this comment somewhat crippled. Suggest simplifying:
/* We're not interested in the theoretical difference between "has
contents which have not changed with respect to" and "has the same
actual contents as" when sending text-deltas. If we know the
delta is an empty one, we avoiding sending it in either case. */
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Enterprise Cloud Development