Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 27049:0d61f7ec7f76
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.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sat, 14 Nov 2015 00:07:11 -0800 |
parents | 86290f6f6599 |
children | 78b0c88ab0db |
comparison
equal
deleted
inserted
replaced
27048:86290f6f6599 | 27049:0d61f7ec7f76 |
---|---|
364 fca: file context for ancestors, | 364 fca: file context for ancestors, |
365 fd: file path of the resulting merge. | 365 fd: file path of the resulting merge. |
366 | 366 |
367 note: also write the local version to the `.hg/merge` directory. | 367 note: also write the local version to the `.hg/merge` directory. |
368 """ | 368 """ |
369 hash = util.sha1(fcl.path()).hexdigest() | 369 if fcl.isabsent(): |
370 self._repo.vfs.write('merge/' + hash, fcl.data()) | 370 hash = nullhex |
371 else: | |
372 hash = util.sha1(fcl.path()).hexdigest() | |
373 self._repo.vfs.write('merge/' + hash, fcl.data()) | |
371 self._state[fd] = ['u', hash, fcl.path(), | 374 self._state[fd] = ['u', hash, fcl.path(), |
372 fca.path(), hex(fca.filenode()), | 375 fca.path(), hex(fca.filenode()), |
373 fco.path(), hex(fco.filenode()), | 376 fco.path(), hex(fco.filenode()), |
374 fcl.flags()] | 377 fcl.flags()] |
375 self._dirty = True | 378 self._dirty = True |