Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 13235:6bf39d88c857
rename util.unlink to unlinkpath
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 02 Jan 2011 19:34:41 +0100 |
parents | 115a9760c382 |
children | d8d478f9ee0f |
comparison
equal
deleted
inserted
replaced
13234:0935ff767285 | 13235:6bf39d88c857 |
---|---|
310 repo.ui.note(_("removing %s\n") % f) | 310 repo.ui.note(_("removing %s\n") % f) |
311 audit_path(f) | 311 audit_path(f) |
312 if f == '.hgsubstate': # subrepo states need updating | 312 if f == '.hgsubstate': # subrepo states need updating |
313 subrepo.submerge(repo, wctx, mctx, wctx) | 313 subrepo.submerge(repo, wctx, mctx, wctx) |
314 try: | 314 try: |
315 util.unlink(repo.wjoin(f)) | 315 util.unlinkpath(repo.wjoin(f)) |
316 except OSError, inst: | 316 except OSError, inst: |
317 if inst.errno != errno.ENOENT: | 317 if inst.errno != errno.ENOENT: |
318 repo.ui.warn(_("update failed to remove %s: %s!\n") % | 318 repo.ui.warn(_("update failed to remove %s: %s!\n") % |
319 (f, inst.strerror)) | 319 (f, inst.strerror)) |
320 removed += 1 | 320 removed += 1 |
348 f2, fd, flags = a[2:] | 348 f2, fd, flags = a[2:] |
349 if f: | 349 if f: |
350 repo.ui.note(_("moving %s to %s\n") % (f, fd)) | 350 repo.ui.note(_("moving %s to %s\n") % (f, fd)) |
351 t = wctx.filectx(f).data() | 351 t = wctx.filectx(f).data() |
352 repo.wwrite(fd, t, flags) | 352 repo.wwrite(fd, t, flags) |
353 util.unlink(repo.wjoin(f)) | 353 util.unlinkpath(repo.wjoin(f)) |
354 if f2: | 354 if f2: |
355 repo.ui.note(_("getting %s to %s\n") % (f2, fd)) | 355 repo.ui.note(_("getting %s to %s\n") % (f2, fd)) |
356 t = mctx.filectx(f2).data() | 356 t = mctx.filectx(f2).data() |
357 repo.wwrite(fd, t, flags) | 357 repo.wwrite(fd, t, flags) |
358 updated += 1 | 358 updated += 1 |