graft: use cmdstate.delete() to delete the state file
Previous patches start using state.cmdstate() class for statefiles. The class
has a function delete() to delete the state file. This patch replaces the
existing repo.vfs.unlink() with that delete() function.
Differential Revision: https://phab.mercurial-scm.org/D3656
--- a/mercurial/commands.py Thu May 24 23:05:12 2018 -0700
+++ b/mercurial/commands.py Fri May 25 16:00:37 2018 +0530
@@ -2379,7 +2379,7 @@
# remove state when we complete successfully
if not opts.get('dry_run'):
- repo.vfs.unlinkpath('graftstate', ignoremissing=True)
+ graftstate.delete()
return 0