D3656: graft: use cmdstate.delete() to delete the state file

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri May 25 14:55:38 EDT 2018


pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3656

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -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
 



To: pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list