--- 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()),