# HG changeset patch # User Matt Mackall # Date 1155674745 18000 # Node ID 95cc73523983f2904cd5f2f8154f9a7b455fb84c # Parent 5df3e5cf16bce8a2c24de94d4aa6ef521840d372 Use revlog hash comparison technique in merge diff -r 5df3e5cf16bc -r 95cc73523983 mercurial/merge.py --- a/mercurial/merge.py Tue Aug 15 14:18:13 2006 -0500 +++ b/mercurial/merge.py Tue Aug 15 15:45:45 2006 -0500 @@ -90,9 +90,7 @@ if not force: for f in unknown: if f in m2: - t1 = repo.wread(f) - t2 = repo.file(f).read(m2[f]) - if cmp(t1, t2) != 0: + if repo.file(f).cmp(m2[f], repo.wread(f)): raise util.Abort(_("'%s' already exists in the working" " dir and differs from remote") % f) @@ -137,11 +135,8 @@ # is the wfile new since m1, and match m2? if f not in m1: - t1 = repo.wread(f) - t2 = repo.file(f).read(m2[f]) - if cmp(t1, t2) == 0: + if not repo.file(f).cmp(m2[f], repo.wread(f)): n = m2[f] - del t1, t2 # are files different? if n != m2[f]: