Issue #1509: Work around the fact that a user can't set executable permissions on files they do not own by moving and copying the file around to make it such that the current user does own the file.
Issue #1509: Work around the fact that a user can't set executable
permissions on files they do not own by moving and copying the file
around to make it such that the current user does own the file.

* subversion/libsvn_subr/io.c
  (APR_IS_STATUS_EPERM): Work around APR's missing support for the
    EPERM error.
  (reown_file): New, moves a file to a temporary location, then copies
    it back so as to create a new version that is owned by the current
    user.
  (svn_io_set_file_executable): If the original permissions set fails
    in the stat-available path, try again after having re-owned the
    file.


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@850182 13f79535-47bb-0310-9956-ffa450edef68

wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion