diff mercurial/scmutil.py @ 29367:4e6e280e238f

doc: describe detail about checkambig optional argument This is followup for patches below, which add checkambig argument to existing function. - 731ced087a4b - 76f1ea360c7e - ce2d81aafbae - a109bf7e0dc2
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 13 Jun 2016 05:11:56 +0900
parents 0d83ad967bf8
children 36fbd72c2f39
line wrap: on
line diff
--- a/mercurial/scmutil.py	Sun Jun 12 14:07:26 2016 +0900
+++ b/mercurial/scmutil.py	Mon Jun 13 05:11:56 2016 +0900
@@ -379,6 +379,12 @@
         return util.readlock(self.join(path))
 
     def rename(self, src, dst, checkambig=False):
+        """Rename from src to dst
+
+        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).
+        """
         dstpath = self.join(dst)
         oldstat = checkambig and util.filestat(dstpath)
         if oldstat and oldstat.stat:
@@ -533,7 +539,9 @@
            file were opened multiple times, there could be unflushed data
            because the original file handle hasn't been flushed/closed yet.)
 
-        ``checkambig`` is passed to atomictempfile (valid only for writing).
+        ``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).
         '''
         if self._audit:
             r = util.checkosfilename(path)