##// END OF EJS Templates
simplemerge: store input data in MergeInput...
Martin von Zweigbergk -
r49595:59c6724d default
parent child Browse files
Show More
@@ -481,6 +481,19 b' class MergeInput(object):'
481 # separated by a ':'. The label is padded to make the ':' aligned among
481 # separated by a ':'. The label is padded to make the ':' aligned among
482 # all merge inputs.
482 # all merge inputs.
483 self.label_detail = label_detail
483 self.label_detail = label_detail
484 self._text = None
485
486 def text(self):
487 if self._text is None:
488 # Merges were always run in the working copy before, which means
489 # they used decoded data, if the user defined any repository
490 # filters.
491 #
492 # Maintain that behavior today for BC, though perhaps in the future
493 # it'd be worth considering whether merging encoded data (what the
494 # repository usually sees) might be more useful.
495 self._text = self.fctx.decodeddata()
496 return self._text
484
497
485
498
486 def simplemerge(
499 def simplemerge(
@@ -498,26 +511,19 b' def simplemerge('
498 The merged result is written into `localctx`.
511 The merged result is written into `localctx`.
499 """
512 """
500
513
501 def readctx(ctx):
514 def readctx(input):
502 # Merges were always run in the working copy before, which means
503 # they used decoded data, if the user defined any repository
504 # filters.
505 #
506 # Maintain that behavior today for BC, though perhaps in the future
507 # it'd be worth considering whether merging encoded data (what the
508 # repository usually sees) might be more useful.
509 return _verifytext(
515 return _verifytext(
510 ctx.decodeddata(),
516 input.text(),
511 ctx.path(),
517 input.fctx.path(),
512 ui,
518 ui,
513 quiet=quiet,
519 quiet=quiet,
514 allow_binary=allow_binary,
520 allow_binary=allow_binary,
515 )
521 )
516
522
517 try:
523 try:
518 localtext = readctx(local.fctx)
524 localtext = readctx(local)
519 basetext = readctx(base.fctx)
525 basetext = readctx(base)
520 othertext = readctx(other.fctx)
526 othertext = readctx(other)
521 except error.Abort:
527 except error.Abort:
522 return True
528 return True
523
529
General Comments 0
You need to be logged in to leave comments. Login now