comparison mercurial/simplemerge.py @ 46355:98e3a693061a

simplemerge: delete unused find_unconflicted() The function has been unused ever since it was introduced in 465b9ea02868 (Import 3-way merge code from bzr, 2007-04-16). Differential Revision: https://phab.mercurial-scm.org/D9832
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 18 Jan 2021 22:32:09 -0800
parents 59fa3890d40a
children 728d89f6f9b1
comparison
equal deleted inserted replaced
46354:b8d8fd2fe75f 46355:98e3a693061a
400 bbase = len(self.b) 400 bbase = len(self.b)
401 sl.append((intbase, intbase, abase, abase, bbase, bbase)) 401 sl.append((intbase, intbase, abase, abase, bbase, bbase))
402 402
403 return sl 403 return sl
404 404
405 def find_unconflicted(self):
406 """Return a list of ranges in base that are not conflicted."""
407 am = mdiff.get_matching_blocks(self.basetext, self.atext)
408 bm = mdiff.get_matching_blocks(self.basetext, self.btext)
409
410 unc = []
411
412 while am and bm:
413 # there is an unconflicted block at i; how long does it
414 # extend? until whichever one ends earlier.
415 a1 = am[0][0]
416 a2 = a1 + am[0][2]
417 b1 = bm[0][0]
418 b2 = b1 + bm[0][2]
419 i = intersect((a1, a2), (b1, b2))
420 if i:
421 unc.append(i)
422
423 if a2 < b2:
424 del am[0]
425 else:
426 del bm[0]
427
428 return unc
429
430 405
431 def _verifytext(text, path, ui, opts): 406 def _verifytext(text, path, ui, opts):
432 """verifies that text is non-binary (unless opts[text] is passed, 407 """verifies that text is non-binary (unless opts[text] is passed,
433 then we just warn)""" 408 then we just warn)"""
434 if stringutil.binary(text): 409 if stringutil.binary(text):