mercurial/merge.py
changeset 14168 135e244776f0
parent 14064 e4bfb9c337f3
child 14220 21b8ce4d3331
equal deleted inserted replaced
14167:0e4753807c93 14168:135e244776f0
    45                 f.write("\0".join([d] + v) + "\n")
    45                 f.write("\0".join([d] + v) + "\n")
    46             f.close()
    46             f.close()
    47             self._dirty = False
    47             self._dirty = False
    48     def add(self, fcl, fco, fca, fd, flags):
    48     def add(self, fcl, fco, fca, fd, flags):
    49         hash = util.sha1(fcl.path()).hexdigest()
    49         hash = util.sha1(fcl.path()).hexdigest()
    50         self._repo.opener("merge/" + hash, "w").write(fcl.data())
    50         self._repo.opener.write("merge/" + hash, fcl.data())
    51         self._state[fd] = ['u', hash, fcl.path(), fca.path(),
    51         self._state[fd] = ['u', hash, fcl.path(), fca.path(),
    52                            hex(fca.filenode()), fco.path(), flags]
    52                            hex(fca.filenode()), fco.path(), flags]
    53         self._dirty = True
    53         self._dirty = True
    54     def __contains__(self, dfile):
    54     def __contains__(self, dfile):
    55         return dfile in self._state
    55         return dfile in self._state