D5470: narrow: keep narrowspec backup in store
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Sat Dec 22 21:14:53 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG1e8d9f472ea1: narrow: keep narrowspec backup in store (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5470?vs=12934&id=12958
REVISION DETAIL
https://phab.mercurial-scm.org/D5470
AFFECTED FILES
mercurial/narrowspec.py
tests/test-narrow-clone-stream.t
CHANGE DETAILS
diff --git a/tests/test-narrow-clone-stream.t b/tests/test-narrow-clone-stream.t
--- a/tests/test-narrow-clone-stream.t
+++ b/tests/test-narrow-clone-stream.t
@@ -77,6 +77,7 @@
00manifest.i
data (tree flat-fncache !)
fncache (tree flat-fncache !)
+ journal.narrowspec
meta (tree !)
narrowspec
undo
diff --git a/mercurial/narrowspec.py b/mercurial/narrowspec.py
--- a/mercurial/narrowspec.py
+++ b/mercurial/narrowspec.py
@@ -160,19 +160,19 @@
def savebackup(repo, backupname):
if repository.NARROW_REQUIREMENT not in repo.requirements:
return
- vfs = repo.vfs
- vfs.tryunlink(backupname)
- util.copyfile(repo.svfs.join(FILENAME), vfs.join(backupname), hardlink=True)
+ svfs = repo.svfs
+ svfs.tryunlink(backupname)
+ util.copyfile(svfs.join(FILENAME), svfs.join(backupname), hardlink=True)
def restorebackup(repo, backupname):
if repository.NARROW_REQUIREMENT not in repo.requirements:
return
- util.rename(repo.vfs.join(backupname), repo.svfs.join(FILENAME))
+ util.rename(repo.svfs.join(backupname), repo.svfs.join(FILENAME))
def clearbackup(repo, backupname):
if repository.NARROW_REQUIREMENT not in repo.requirements:
return
- repo.vfs.unlink(backupname)
+ repo.svfs.unlink(backupname)
def restrictpatterns(req_includes, req_excludes, repo_includes, repo_excludes):
r""" Restricts the patterns according to repo settings,
To: martinvonz, durin42, #hg-reviewers
Cc: mjpieters, mercurial-devel
More information about the Mercurial-devel
mailing list