# HG changeset patch # User Siddharth Agarwal # Date 1447488431 28800 # Node ID 0d61f7ec7f7637bcfeb6be1e699df5a2e72718fa # Parent 86290f6f65993e01f2871fe52ee7d4433ed857a4 mergestate.add: store absentfilectxes as nullhex This is the most natural way to represent these files. We also need to make sure we don't try to store these files in the merge store. diff -r 86290f6f6599 -r 0d61f7ec7f76 mercurial/merge.py --- 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()),