Show More
@@ -254,11 +254,6 b' def update(repo, node, branchmerge=False' | |||||
254 | t = repo.file(f).read(node) |
|
254 | t = repo.file(f).read(node) | |
255 | repo.wwrite(f, t) |
|
255 | repo.wwrite(f, t) | |
256 | util.set_exec(repo.wjoin(f), flag) |
|
256 | util.set_exec(repo.wjoin(f), flag) | |
257 | if not partial: |
|
|||
258 | if branchmerge: |
|
|||
259 | repo.dirstate.update([f], 'n', st_mtime=-1) |
|
|||
260 | else: |
|
|||
261 | repo.dirstate.update([f], 'n') |
|
|||
262 |
|
257 | |||
263 | # merge the tricky bits |
|
258 | # merge the tricky bits | |
264 | unresolved = [] |
|
259 | unresolved = [] | |
@@ -271,7 +266,38 b' def update(repo, node, branchmerge=False' | |||||
271 | if ret: |
|
266 | if ret: | |
272 | unresolved.append(f) |
|
267 | unresolved.append(f) | |
273 | util.set_exec(repo.wjoin(f), flag) |
|
268 | util.set_exec(repo.wjoin(f), flag) | |
274 | if not partial: |
|
269 | ||
|
270 | remove.sort() | |||
|
271 | for f in remove: | |||
|
272 | repo.ui.note(_("removing %s\n") % f) | |||
|
273 | util.audit_path(f) | |||
|
274 | try: | |||
|
275 | util.unlink(repo.wjoin(f)) | |||
|
276 | except OSError, inst: | |||
|
277 | if inst.errno != errno.ENOENT: | |||
|
278 | repo.ui.warn(_("update failed to remove %s: %s!\n") % | |||
|
279 | (f, inst.strerror)) | |||
|
280 | ||||
|
281 | # update dirstate | |||
|
282 | if not partial: | |||
|
283 | repo.dirstate.setparents(p1, p2) | |||
|
284 | repo.dirstate.forget(forget) | |||
|
285 | if branchmerge: | |||
|
286 | repo.dirstate.update(remove, 'r') | |||
|
287 | else: | |||
|
288 | repo.dirstate.forget(remove) | |||
|
289 | ||||
|
290 | files = get.keys() | |||
|
291 | files.sort() | |||
|
292 | for f in files: | |||
|
293 | if branchmerge: | |||
|
294 | repo.dirstate.update([f], 'n', st_mtime=-1) | |||
|
295 | else: | |||
|
296 | repo.dirstate.update([f], 'n') | |||
|
297 | ||||
|
298 | files = merge.keys() | |||
|
299 | files.sort() | |||
|
300 | for f in files: | |||
275 | if branchmerge: |
|
301 | if branchmerge: | |
276 | # We've done a branch merge, mark this file as merged |
|
302 | # We've done a branch merge, mark this file as merged | |
277 | # so that we properly record the merger later |
|
303 | # so that we properly record the merger later | |
@@ -286,26 +312,6 b' def update(repo, node, branchmerge=False' | |||||
286 | f_len = fl.size(fl.rev(other)) |
|
312 | f_len = fl.size(fl.rev(other)) | |
287 | repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1) |
|
313 | repo.dirstate.update([f], 'n', st_size=f_len, st_mtime=-1) | |
288 |
|
314 | |||
289 | remove.sort() |
|
|||
290 | for f in remove: |
|
|||
291 | repo.ui.note(_("removing %s\n") % f) |
|
|||
292 | util.audit_path(f) |
|
|||
293 | try: |
|
|||
294 | util.unlink(repo.wjoin(f)) |
|
|||
295 | except OSError, inst: |
|
|||
296 | if inst.errno != errno.ENOENT: |
|
|||
297 | repo.ui.warn(_("update failed to remove %s: %s!\n") % |
|
|||
298 | (f, inst.strerror)) |
|
|||
299 | if not partial: |
|
|||
300 | if branchmerge: |
|
|||
301 | repo.dirstate.update(remove, 'r') |
|
|||
302 | else: |
|
|||
303 | repo.dirstate.forget(remove) |
|
|||
304 |
|
||||
305 | if not partial: |
|
|||
306 | repo.dirstate.setparents(p1, p2) |
|
|||
307 | repo.dirstate.forget(forget) |
|
|||
308 |
|
||||
309 | if show_stats: |
|
315 | if show_stats: | |
310 | stats = ((len(get), _("updated")), |
|
316 | stats = ((len(get), _("updated")), | |
311 | (len(merge) - len(unresolved), _("merged")), |
|
317 | (len(merge) - len(unresolved), _("merged")), |
General Comments 0
You need to be logged in to leave comments.
Login now