mercurial/merge.py
changeset 26987 416b2b7d3068
parent 26986 1ee5e48f09d4
child 26990 11b1832db8ae
--- a/mercurial/merge.py	Tue Nov 17 14:11:52 2015 -0800
+++ b/mercurial/merge.py	Tue Nov 17 17:00:54 2015 -0800
@@ -75,6 +75,14 @@
     statepathv1 = 'merge/state'
     statepathv2 = 'merge/state2'
 
+    @staticmethod
+    def clean(repo, node=None, other=None):
+        """Initialize a brand new merge state, removing any existing state on
+        disk."""
+        ms = mergestate(repo)
+        ms.reset(node, other)
+        return ms
+
     def __init__(self, repo):
         self._repo = repo
         self._dirty = False