changeset 38184:0dfa27e53c57

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
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 25 May 2018 16:00:37 +0530
parents 24e517600b29
children 63553c2bef7e
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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