Comments
Patch
@@ -1062,7 +1062,7 @@ def storecollapsemsg(repo, collapsemsg):
def clearcollapsemsg(repo):
'Remove collapse message file'
- util.unlinkpath(repo.join("last-message.txt"), ignoremissing=True)
+ repo.vfs.unlinkpath("last-message.txt", ignoremissing=True)
def restorecollapsemsg(repo):
'Restore previously stored collapse message'
@@ -1104,7 +1104,7 @@ def storestatus(repo, originalwd, target
def clearstatus(repo):
'Remove the status files'
_clearrebasesetvisibiliy(repo)
- util.unlinkpath(repo.join("rebasestate"), ignoremissing=True)
+ repo.vfs.unlinkpath("rebasestate", ignoremissing=True)
def needupdate(repo, state):
'''check whether we should `update --clean` away from a merge, or if
@@ -217,7 +217,7 @@ class shelvedstate(object):
@classmethod
def clear(cls, repo):
- util.unlinkpath(repo.join(cls._filename), ignoremissing=True)
+ repo.vfs.unlinkpath(cls._filename, ignoremissing=True)
def cleanupoldbackups(repo):
vfs = scmutil.vfs(repo.join(backupdir))
@@ -2381,7 +2381,7 @@ def _dograft(ui, repo, *revs, **opts):
# remove state when we complete successfully
if not opts.get('dry_run'):
- util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
+ repo.vfs.unlinkpath('graftstate', ignoremissing=True)
return 0
@@ -715,7 +715,7 @@ def update(repo, node, quietempty=False,
def clean(repo, node, show_stats=True, quietempty=False):
"""forcibly switch the working directory to node, clobbering changes"""
stats = updaterepo(repo, node, True)
- util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
+ repo.vfs.unlinkpath('graftstate', ignoremissing=True)
if show_stats:
_showstats(repo, stats, quietempty)
return stats[3] > 0