# HG changeset patch # User Matt Mackall # Date 1155676371 18000 # Node ID 3cef09d1201029ce9724e71adc117dd4342367c3 # Parent dd41ad984f71f55ab5ac2bb3d566eac518247608 merge: working manifest new/changed To remove dependence on m1 during manifest comparison, we distinguish between new and changed states in mw. diff -r dd41ad984f71 -r 3cef09d12010 mercurial/merge.py --- a/mercurial/merge.py Tue Aug 15 15:58:10 2006 -0500 +++ b/mercurial/merge.py Tue Aug 15 16:12:51 2006 -0500 @@ -116,7 +116,8 @@ umap = dict.fromkeys(unknown) for f in added + modified + unknown: - mw[f] = "" + mw[f] = None + if f in m1: mw[f] = "" # distinguish between changed and new mw.set(f, util.is_exec(repo.wjoin(f), mw.execf(f))) for f in deleted + removed: @@ -138,8 +139,8 @@ if f in m2: s = 0 - # is the wfile new since m1, and match m2? - if f not in m1: + # is the wfile new and matches m2? + if mw[f] == None: if not repo.file(f).cmp(m2[f], repo.wread(f)): n = m2[f]