mercurial/merge.py
changeset 27049 0d61f7ec7f76
parent 27048 86290f6f6599
child 27074 78b0c88ab0db
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