Mercurial > hg
changeset 2891:95cc73523983
Use revlog hash comparison technique in merge
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 15 Aug 2006 15:45:45 -0500 |
parents | 5df3e5cf16bc |
children | dd41ad984f71 |
files | mercurial/merge.py |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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]: