changeset 33282:d1db7af81548

vfs: add explanation about cost of checkambig=True in corner case
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Tue, 04 Jul 2017 23:13:47 +0900
parents 6af0f023d014
children 634b259079c5
files mercurial/vfs.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/vfs.py	Tue Jul 04 23:13:47 2017 +0900
+++ b/mercurial/vfs.py	Tue Jul 04 23:13:47 2017 +0900
@@ -190,6 +190,11 @@
         checkambig argument is used with util.filestat, and is useful
         only if destination file is guarded by any lock
         (e.g. repo.lock or repo.wlock).
+
+        To avoid file stat ambiguity forcibly, checkambig=True involves
+        copying ``src`` file, if it is owned by another. Therefore, use
+        checkambig=True only in limited cases (see also issue5418 and
+        issue5584 for detail).
         """
         srcpath = self.join(src)
         dstpath = self.join(dst)
@@ -343,6 +348,12 @@
         ``checkambig`` argument is passed to atomictemplfile (valid
         only for writing), and is useful only if target file is
         guarded by any lock (e.g. repo.lock or repo.wlock).
+
+        To avoid file stat ambiguity forcibly, checkambig=True involves
+        copying ``path`` file opened in "append" mode (e.g. for
+        truncation), if it is owned by another. Therefore, use
+        combination of append mode and checkambig=True only in limited
+        cases (see also issue5418 and issue5584 for detail).
         '''
         if auditpath:
             if self._audit: