Submitter | Siddharth Agarwal |
---|---|
Date | Nov. 20, 2015, 9:20 a.m. |
Message ID | <139817087c45246470a1.1448011240@dev666.prn1.facebook.com> |
Download | mbox | patch |
Permalink | /patch/11542/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -366,8 +366,11 @@ class mergestate(object): 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()),