diff --git a/mercurial/merge.py b/mercurial/merge.py index 86290f6f65993e01f2871fe52ee7d4433ed857a4_bWVyY3VyaWFsL21lcmdlLnB5..0d61f7ec7f7637bcfeb6be1e699df5a2e72718fa_bWVyY3VyaWFsL21lcmdlLnB5 100644 --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -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()),