graft: use cmdstate.delete() to delete the state file
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 25 May 2018 16:00:37 +0530
changeset 38151 0dfa27e53c57
parent 38150 24e517600b29
child 38152 63553c2bef7e
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
mercurial/commands.py
--- 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