Show More
@@ -414,8 +414,9 b' class mergestate(object):' | |||
|
414 | 414 | stateentry = self._state[dfile] |
|
415 | 415 | state, hash, lfile, afile, anode, ofile, onode, flags = stateentry |
|
416 | 416 | octx = self._repo[self._other] |
|
417 | fcd = wctx[dfile] | |
|
418 | fco = octx[ofile] | |
|
417 | fcd = self._filectxorabsent(hash, wctx, dfile) | |
|
418 | fco = self._filectxorabsent(onode, octx, ofile) | |
|
419 | # TODO: move this to filectxorabsent | |
|
419 | 420 | fca = self._repo.filectx(afile, fileid=anode) |
|
420 | 421 | # "premerge" x flags |
|
421 | 422 | flo = fco.flags() |
@@ -429,9 +430,12 b' class mergestate(object):' | |||
|
429 | 430 | flags = flo |
|
430 | 431 | if preresolve: |
|
431 | 432 | # restore local |
|
432 | f = self._repo.vfs('merge/' + hash) | |
|
433 | self._repo.wwrite(dfile, f.read(), flags) | |
|
434 | f.close() | |
|
433 | if hash != nullhex: | |
|
434 | f = self._repo.vfs('merge/' + hash) | |
|
435 | self._repo.wwrite(dfile, f.read(), flags) | |
|
436 | f.close() | |
|
437 | else: | |
|
438 | self._repo.wvfs.unlinkpath(dfile, ignoremissing=True) | |
|
435 | 439 | complete, r, deleted = filemerge.premerge(self._repo, self._local, |
|
436 | 440 | lfile, fcd, fco, fca, |
|
437 | 441 | labels=labels) |
@@ -462,6 +466,12 b' class mergestate(object):' | |||
|
462 | 466 | |
|
463 | 467 | return complete, r, action |
|
464 | 468 | |
|
469 | def _filectxorabsent(self, hexnode, ctx, f): | |
|
470 | if hexnode == nullhex: | |
|
471 | return filemerge.absentfilectx(ctx, f) | |
|
472 | else: | |
|
473 | return ctx[f] | |
|
474 | ||
|
465 | 475 | def preresolve(self, dfile, wctx, labels=None): |
|
466 | 476 | """run premerge process for dfile |
|
467 | 477 |
General Comments 0
You need to be logged in to leave comments.
Login now