Show More
@@ -7,7 +7,7 | |||||
7 |
|
7 | |||
8 | from node import nullid, nullrev, hex |
|
8 | from node import nullid, nullrev, hex | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 |
import errno, util, os, filemerge, copies, |
|
10 | import errno, util, os, filemerge, copies, shutil | |
11 |
|
11 | |||
12 | class mergestate(object): |
|
12 | class mergestate(object): | |
13 | '''track 3-way merge state of individual files''' |
|
13 | '''track 3-way merge state of individual files''' | |
@@ -19,7 +19,7 class mergestate(object): | |||||
19 | self._local = node |
|
19 | self._local = node | |
20 | shutil.rmtree(self._repo.join("merge"), True) |
|
20 | shutil.rmtree(self._repo.join("merge"), True) | |
21 | def add(self, fcl, fco, fca, fd, flags): |
|
21 | def add(self, fcl, fco, fca, fd, flags): | |
22 |
hash = |
|
22 | hash = util.sha1(fcl.path()).hexdigest() | |
23 | self._repo.opener("merge/" + hash, "w").write(fcl.data()) |
|
23 | self._repo.opener("merge/" + hash, "w").write(fcl.data()) | |
24 | self._state[fd] = 'u' |
|
24 | self._state[fd] = 'u' | |
25 | self._data[fd] = (hash, fcl.path(), fca.path(), hex(fca.filenode()), |
|
25 | self._data[fd] = (hash, fcl.path(), fca.path(), hex(fca.filenode()), |
General Comments 0
You need to be logged in to leave comments.
Login now