Show More
@@ -157,19 +157,19 b' def update(repo, node, branchmerge=False' | |||||
157 | # "if we changed or they changed, change in merge" |
|
157 | # "if we changed or they changed, change in merge" | |
158 | a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) |
|
158 | a, b, c = mfa.execf(f), mfw.execf(f), mf2.execf(f) | |
159 | mode = ((a^b) | (a^c)) ^ a |
|
159 | mode = ((a^b) | (a^c)) ^ a | |
160 |
merge[f] = (m1.get(f, nullid), m2[f] |
|
160 | merge[f] = (mode, m1.get(f, nullid), m2[f]) | |
161 | s = 1 |
|
161 | s = 1 | |
162 | # are we clobbering? |
|
162 | # are we clobbering? | |
163 | # is remote's version newer? |
|
163 | # is remote's version newer? | |
164 | # or are we going back in time? |
|
164 | # or are we going back in time? | |
165 | elif overwrite or m2[f] != a or (p2 == pa and mw[f] == m1[f]): |
|
165 | elif overwrite or m2[f] != a or (p2 == pa and mw[f] == m1[f]): | |
166 | repo.ui.debug(_(" remote %s is newer, get\n") % f) |
|
166 | repo.ui.debug(_(" remote %s is newer, get\n") % f) | |
167 | get[f] = m2[f] |
|
167 | get[f] = (m2.execf(f), m2[f]) | |
168 | s = 1 |
|
168 | s = 1 | |
169 | elif f in umap or f in added: |
|
169 | elif f in umap or f in added: | |
170 | # this unknown file is the same as the checkout |
|
170 | # this unknown file is the same as the checkout | |
171 | # we need to reset the dirstate if the file was added |
|
171 | # we need to reset the dirstate if the file was added | |
172 | get[f] = m2[f] |
|
172 | get[f] = (m2.execf(f), m2[f]) | |
173 |
|
173 | |||
174 | if not s and mfw.execf(f) != mf2.execf(f): |
|
174 | if not s and mfw.execf(f) != mf2.execf(f): | |
175 | if overwrite: |
|
175 | if overwrite: | |
@@ -221,14 +221,14 b' def update(repo, node, branchmerge=False' | |||||
221 | (_("remote changed %s which local deleted\n") % f) + |
|
221 | (_("remote changed %s which local deleted\n") % f) + | |
222 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) |
|
222 | _("(k)eep or (d)elete?"), _("[kd]"), _("k")) | |
223 | if r == _("k"): |
|
223 | if r == _("k"): | |
224 | get[f] = n |
|
224 | get[f] = (m2.execf(f), n) | |
225 | elif f not in ma: |
|
225 | elif f not in ma: | |
226 | repo.ui.debug(_("remote created %s\n") % f) |
|
226 | repo.ui.debug(_("remote created %s\n") % f) | |
227 | get[f] = n |
|
227 | get[f] = (m2.execf(f), n) | |
228 | else: |
|
228 | else: | |
229 | if overwrite or p2 == pa: # going backwards? |
|
229 | if overwrite or p2 == pa: # going backwards? | |
230 | repo.ui.debug(_("local deleted %s, recreating\n") % f) |
|
230 | repo.ui.debug(_("local deleted %s, recreating\n") % f) | |
231 | get[f] = n |
|
231 | get[f] = (m2.execf(f), n) | |
232 | else: |
|
232 | else: | |
233 | repo.ui.debug(_("local deleted %s\n") % f) |
|
233 | repo.ui.debug(_("local deleted %s\n") % f) | |
234 |
|
234 | |||
@@ -236,7 +236,7 b' def update(repo, node, branchmerge=False' | |||||
236 |
|
236 | |||
237 | if overwrite: |
|
237 | if overwrite: | |
238 | for f in merge: |
|
238 | for f in merge: | |
239 |
get[f] = merge[f][ |
|
239 | get[f] = merge[f][:2] | |
240 | merge = {} |
|
240 | merge = {} | |
241 |
|
241 | |||
242 | if linear_path or overwrite: |
|
242 | if linear_path or overwrite: | |
@@ -254,12 +254,13 b' def update(repo, node, branchmerge=False' | |||||
254 | files = get.keys() |
|
254 | files = get.keys() | |
255 | files.sort() |
|
255 | files.sort() | |
256 | for f in files: |
|
256 | for f in files: | |
|
257 | flag, node = get[f] | |||
257 | if f[0] == "/": |
|
258 | if f[0] == "/": | |
258 | continue |
|
259 | continue | |
259 | repo.ui.note(_("getting %s\n") % f) |
|
260 | repo.ui.note(_("getting %s\n") % f) | |
260 |
t = repo.file(f).read( |
|
261 | t = repo.file(f).read(node) | |
261 | repo.wwrite(f, t) |
|
262 | repo.wwrite(f, t) | |
262 |
util.set_exec(repo.wjoin(f), |
|
263 | util.set_exec(repo.wjoin(f), flag) | |
263 | if not partial: |
|
264 | if not partial: | |
264 | if branchmerge: |
|
265 | if branchmerge: | |
265 | repo.dirstate.update([f], 'n', st_mtime=-1) |
|
266 | repo.dirstate.update([f], 'n', st_mtime=-1) | |
@@ -272,7 +273,7 b' def update(repo, node, branchmerge=False' | |||||
272 | files.sort() |
|
273 | files.sort() | |
273 | for f in files: |
|
274 | for f in files: | |
274 | repo.ui.status(_("merging %s\n") % f) |
|
275 | repo.ui.status(_("merging %s\n") % f) | |
275 |
my, other |
|
276 | flag, my, other = merge[f] | |
276 | ret = merge3(repo, f, my, other, xp1, xp2) |
|
277 | ret = merge3(repo, f, my, other, xp1, xp2) | |
277 | if ret: |
|
278 | if ret: | |
278 | unresolved.append(f) |
|
279 | unresolved.append(f) |
General Comments 0
You need to be logged in to leave comments.
Login now