##// END OF EJS Templates
merge: fold umap and added into m1 manifest
Matt Mackall -
r2981:1b738357 default
parent child Browse files
Show More
@@ -113,9 +113,10 b' def update(repo, node, branchmerge=False'
113 # update m1 from working dir
113 # update m1 from working dir
114 umap = dict.fromkeys(unknown)
114 umap = dict.fromkeys(unknown)
115
115
116 for f in added + modified + unknown:
116 for i,l in (("a", added), ("m", modified), ("u", unknown)):
117 m1[f] = m1.get(f, nullid) + "+"
117 for f in l:
118 m1.set(f, util.is_exec(repo.wjoin(f), m1.execf(f)))
118 m1[f] = m1.get(f, nullid) + i
119 m1.set(f, util.is_exec(repo.wjoin(f), m1.execf(f)))
119
120
120 for f in deleted + removed:
121 for f in deleted + removed:
121 del m1[f]
122 del m1[f]
@@ -154,7 +155,7 b' def update(repo, node, branchmerge=False'
154 repo.ui.debug(_(" remote %s is newer, get\n") % f)
155 repo.ui.debug(_(" remote %s is newer, get\n") % f)
155 action[f] = (m2.execf(f), m2[f], None)
156 action[f] = (m2.execf(f), m2[f], None)
156 queued = 1
157 queued = 1
157 elif f in umap or f in added:
158 elif n[20:] in ("u","a"):
158 # this unknown file is the same as the checkout
159 # this unknown file is the same as the checkout
159 # we need to reset the dirstate if the file was added
160 # we need to reset the dirstate if the file was added
160 action[f] = (m2.execf(f), m2[f], None)
161 action[f] = (m2.execf(f), m2[f], None)
@@ -184,7 +185,7 b' def update(repo, node, branchmerge=False'
184 action[f] = (None, None, None)
185 action[f] = (None, None, None)
185 else:
186 else:
186 # file is created on branch or in working directory
187 # file is created on branch or in working directory
187 if overwrite and f not in umap:
188 if overwrite and n[20:] != "u":
188 repo.ui.debug(_("remote deleted %s, clobbering\n") % f)
189 repo.ui.debug(_("remote deleted %s, clobbering\n") % f)
189 action[f] = (None, None, None)
190 action[f] = (None, None, None)
190 elif not n[20:]: # same as parent
191 elif not n[20:]: # same as parent
General Comments 0
You need to be logged in to leave comments. Login now