mercurial/merge.py
changeset 27049 0d61f7ec7f76
parent 27048 86290f6f6599
child 27074 78b0c88ab0db
--- a/mercurial/merge.py	Fri Nov 20 01:14:15 2015 -0800
+++ b/mercurial/merge.py	Sat Nov 14 00:07:11 2015 -0800
@@ -366,8 +366,11 @@
 
         note: also write the local version to the `.hg/merge` directory.
         """
-        hash = util.sha1(fcl.path()).hexdigest()
-        self._repo.vfs.write('merge/' + hash, fcl.data())
+        if fcl.isabsent():
+            hash = nullhex
+        else:
+            hash = util.sha1(fcl.path()).hexdigest()
+            self._repo.vfs.write('merge/' + hash, fcl.data())
         self._state[fd] = ['u', hash, fcl.path(),
                            fca.path(), hex(fca.filenode()),
                            fco.path(), hex(fco.filenode()),