D4098: narrow: drop checkambig=True when restoring backup

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Fri Aug 3 21:24:28 UTC 2018


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  IIUC, checkambig is about updating timestamps of the file while
  renaming. That's important for the dirstate, but we never check the
  timestamp of the narrowspec file. We can therefore avoid checking
  passing checkambig=True.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4098

AFFECTED FILES
  mercurial/narrowspec.py

CHANGE DETAILS

diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py
--- a/mercurial/narrowspec.py
+++ b/mercurial/narrowspec.py
@@ -153,7 +153,7 @@
 def restorebackup(repo, backupname):
     if repository.NARROW_REQUIREMENT not in repo.requirements:
         return
-    repo.vfs.rename(backupname, FILENAME, checkambig=True)
+    repo.vfs.rename(backupname, FILENAME)
 
 def clearbackup(repo, backupname):
     if repository.NARROW_REQUIREMENT not in repo.requirements:



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list