tests/test-gendoc-zh_TW.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sun, 13 Nov 2016 06:06:23 +0900
branchstable
changeset 30319 b496a464399c
parent 28809 7a1ad08b9ff5
permissions -rw-r--r--
util: add utility function to skip avoiding file stat ambiguity if EPERM Now, advancing stat.st_mtime by os.utime() is used to avoid file stat ambiguity. But according to POSIX specification, utime(2) with an explicit time information is permitted only for a process with: - the effective user ID equal to the user ID of the file, or - appropriate privileges http://pubs.opengroup.org/onlinepubs/9699919799/functions/utime.html Therefore, just having group write access to a file causes EPERM at applying os.utime() on it (e.g. working on the repository shared by group access permission). This patch adds class filestat utility function avoidamgig() to avoid file stat ambiguity but skip it if EPERM. It is reasonable to always ignore EPERM, because utime(2) causes EPERM only in the case described above (EACCES is used only for utime(2) with NULL).

#require docutils gettext

  $ $TESTDIR/check-gendoc zh_TW
  checking for parse errors