Show More
@@ -272,16 +272,12 b' class Merge3Text(object):' | |||
|
272 | 272 | return sl |
|
273 | 273 | |
|
274 | 274 | |
|
275 | def _verifytext(text, path, ui, quiet=False, allow_binary=False): | |
|
275 | def _verifytext(input): | |
|
276 | 276 | """verifies that text is non-binary (unless opts[text] is passed, |
|
277 | 277 | then we just warn)""" |
|
278 | if stringutil.binary(text): | |
|
279 | msg = _(b"%s looks like a binary file.") % path | |
|
280 | if not quiet: | |
|
281 | ui.warn(_(b'warning: %s\n') % msg) | |
|
282 | if not allow_binary: | |
|
278 | if stringutil.binary(input.text()): | |
|
279 | msg = _(b"%s looks like a binary file.") % input.fctx.path() | |
|
283 | 280 |
|
|
284 | return text | |
|
285 | 281 | |
|
286 | 282 | |
|
287 | 283 | def _format_labels(*inputs): |
@@ -511,23 +507,12 b' def simplemerge(' | |||
|
511 | 507 | The merged result is written into `localctx`. |
|
512 | 508 | """ |
|
513 | 509 | |
|
514 | def readctx(input): | |
|
515 |
|
|
|
516 |
|
|
|
517 | input.fctx.path(), | |
|
518 | ui, | |
|
519 | quiet=quiet, | |
|
520 | allow_binary=allow_binary, | |
|
521 | ) | |
|
510 | if not allow_binary: | |
|
511 | _verifytext(local) | |
|
512 | _verifytext(base) | |
|
513 | _verifytext(other) | |
|
522 | 514 | |
|
523 | try: | |
|
524 | localtext = readctx(local) | |
|
525 | basetext = readctx(base) | |
|
526 | othertext = readctx(other) | |
|
527 | except error.Abort: | |
|
528 | return True | |
|
529 | ||
|
530 | m3 = Merge3Text(basetext, localtext, othertext) | |
|
515 | m3 = Merge3Text(base.text(), local.text(), other.text()) | |
|
531 | 516 | conflicts = False |
|
532 | 517 | if mode == b'union': |
|
533 | 518 | lines = _resolve(m3, (1, 2)) |
General Comments 0
You need to be logged in to leave comments.
Login now