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