# HG changeset patch # User Mads Kiilerich # Date 2017-03-11 19:02:25 # Node ID f59b6cf663a941456a8695be439af84d808bb939 # Parent 431d4f73249e73e4f2c7d85ae0a004504c4c1aac vfs: use repo.vfs.unlinkpath diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -1099,7 +1099,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, isabort): 'Restore previously stored collapse message' @@ -1120,7 +1120,7 @@ def restorecollapsemsg(repo, isabort): 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 diff --git a/hgext/shelve.py b/hgext/shelve.py --- a/hgext/shelve.py +++ b/hgext/shelve.py @@ -218,7 +218,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 = vfsmod.vfs(repo.join(backupdir)) diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2383,7 +2383,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 diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -716,7 +716,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