In FSFS, check to see if a transaction is out of date after acquiring the write lock.  In addition, remove a small possible race condition when writing the new 'current' file by using a rename instead of just overwriting it.
In FSFS, check to see if a transaction is out of date after acquiring
the write lock.  In addition, remove a small possible race condition
when writing the new 'current' file by using a rename instead of just
overwriting it.

* subversion/libsvn_fs_fs/fs_fs.c
  (move_into_place): Re-ordered so that it can be used when writing
    the new 'current' file.
  (write_final_current): Write the new current file to a temporary
    location, then move it into place using the atomic
    move_into_place.
  (svn_fs_fs__commit): Return the appropriate error when it is
    discovered that a transaction is out of date.


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

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