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

Re: svn commit: r1081892 - in /subversion/trunk/subversion: include/private/svn_io_private.h libsvn_subr/io.c libsvn_wc/adm_ops.c libsvn_wc/questions.c libsvn_wc/wc.h tests/cmdline/revert_tests.py

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Tue, 15 Mar 2011 18:46:29 +0000

philip_at_apache.org writes:

> Author: philip
> Date: Tue Mar 15 18:33:52 2011
> New Revision: 1081892
>
> URL: http://svn.apache.org/viewvc?rev=1081892&view=rev
> Log:
> Make revert change file permissions on the basis of the current magic
> properties and the current permissions, rather than on any change in
> the magic permissions. This means file permissions follow the same
> rules as file content, and that permissions-only reverts occur.
>
> * subversion/include/private/svn_private_io.h: New.
>
> * subversion/libsvn_subr/io.c
> (): Include svn_private_io.h.
> (svn_io__is_finfo_read_only, svn_io__is_executable): New.
> (svn_io_is_file_executable): Call svn_io__is_executable.
>
> * subversion/libsvn_wc/wc.h
> (svn_wc__internal_file_modified_p): New.
>
> * subversion/libsvn_wc/questions.c
> (): Include svn_private_io.h.
> (svn_wc__internal_file_modified_p): New.
> (svn_wc__internal_text_modified_p): Call svn_wc__internal_file_modified_p.
>
> * subversion/libsvn_wc/adm_ops.c
> (new_revert_internal): Use svn_wc__internal_file_modified_p to
> determine whether to reset contents or permissions.
>
> * subversion/tests/cmdline/revert_tests.py
> (revert_permissions_only): New, marked XFail but passes with new revert.
> (test_list): Add revert_permissions_only.

The implementation is a little ugly, a private svn_io API.

In the past a file with text and permission changes would have its
permissions reset by revert, and a file with magic property changes
would have its permissions reset by revert. However a file with just
permission changes would not have its permission reset by revert.

The new code I'm working on will now revert permissions in that last
case. This could be viewed as fixing a bug, but I suppose some people
might not like it. Permission-only changes don't show up in status.

Thoughts?

-- 
Philip
Received on 2011-03-15 19:47:14 CET

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.