mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
merge: hoist some working manifest logic out of merge loop
This commit is contained in:
parent
dd967a0972
commit
61c48232d9
@ -116,8 +116,12 @@ def update(repo, node, branchmerge=False, force=False, partial=None,
|
||||
umap = dict.fromkeys(unknown)
|
||||
|
||||
for f in added + modified + unknown:
|
||||
mw[f] = None
|
||||
if f in m1: mw[f] = "" # distinguish between changed and new
|
||||
mw[f] = ""
|
||||
# is the wfile new and matches m2?
|
||||
if (f not in m1 and f in m2 and
|
||||
not repo.file(f).cmp(m2[f], repo.wread(f))):
|
||||
mw[f] = m2[f]
|
||||
|
||||
mw.set(f, util.is_exec(repo.wjoin(f), mw.execf(f)))
|
||||
|
||||
for f in deleted + removed:
|
||||
@ -139,11 +143,6 @@ def update(repo, node, branchmerge=False, force=False, partial=None,
|
||||
if f in m2:
|
||||
s = 0
|
||||
|
||||
# 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]
|
||||
|
||||
# are files different?
|
||||
if n != m2[f]:
|
||||
a = ma.get(f, nullid)
|
||||
|
Loading…
Reference in New Issue
Block a user