# HG changeset patch # User Mads Kiilerich # Date 1489258945 28800 # Node ID f59b6cf663a941456a8695be439af84d808bb939 # Parent 431d4f73249e73e4f2c7d85ae0a004504c4c1aac vfs: use repo.vfs.unlinkpath diff -r 431d4f73249e -r f59b6cf663a9 hgext/rebase.py --- a/hgext/rebase.py Wed Jan 14 01:15:26 2015 +0100 +++ b/hgext/rebase.py Sat Mar 11 11:02:25 2017 -0800 @@ -1099,7 +1099,7 @@ 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 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 -r 431d4f73249e -r f59b6cf663a9 hgext/shelve.py --- a/hgext/shelve.py Wed Jan 14 01:15:26 2015 +0100 +++ b/hgext/shelve.py Sat Mar 11 11:02:25 2017 -0800 @@ -218,7 +218,7 @@ @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 -r 431d4f73249e -r f59b6cf663a9 mercurial/commands.py --- a/mercurial/commands.py Wed Jan 14 01:15:26 2015 +0100 +++ b/mercurial/commands.py Sat Mar 11 11:02:25 2017 -0800 @@ -2383,7 +2383,7 @@ # 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 -r 431d4f73249e -r f59b6cf663a9 mercurial/hg.py --- a/mercurial/hg.py Wed Jan 14 01:15:26 2015 +0100 +++ b/mercurial/hg.py Sat Mar 11 11:02:25 2017 -0800 @@ -716,7 +716,7 @@ 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