##// END OF EJS Templates
mergestate: move staticmethod _filectxorabsent to module level...
Augie Fackler -
r45407:17d928f8 default
parent child Browse files
Show More
@@ -31,6 +31,13 def _droponode(data):
31 31 return b'\0'.join(bits)
32 32
33 33
34 def _filectxorabsent(hexnode, ctx, f):
35 if hexnode == nullhex:
36 return filemerge.absentfilectx(ctx, f)
37 else:
38 return ctx[f]
39
40
34 41 # Merge state record types. See ``mergestate`` docs for more.
35 42 RECORD_LOCAL = b'L'
36 43 RECORD_OTHER = b'O'
@@ -600,8 +607,8 class mergestate(object):
600 607 actx = self._repo[anccommitnode]
601 608 else:
602 609 actx = None
603 fcd = self._filectxorabsent(localkey, wctx, dfile)
604 fco = self._filectxorabsent(onode, octx, ofile)
610 fcd = _filectxorabsent(localkey, wctx, dfile)
611 fco = _filectxorabsent(onode, octx, ofile)
605 612 # TODO: move this to filectxorabsent
606 613 fca = self._repo.filectx(afile, fileid=anode, changectx=actx)
607 614 # "premerge" x flags
@@ -679,12 +686,6 class mergestate(object):
679 686
680 687 return complete, r
681 688
682 def _filectxorabsent(self, hexnode, ctx, f):
683 if hexnode == nullhex:
684 return filemerge.absentfilectx(ctx, f)
685 else:
686 return ctx[f]
687
688 689 def preresolve(self, dfile, wctx):
689 690 """run premerge process for dfile
690 691
General Comments 0
You need to be logged in to leave comments. Login now