Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 31309:8908f985570c
vfs: use repo.wvfs.unlinkpath
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Wed, 14 Jan 2015 01:15:26 +0100 |
parents | 1b08aca7870a |
children | 1b0db28dadf1 |
comparison
equal
deleted
inserted
replaced
31308:62939e0148f1 | 31309:8908f985570c |
---|---|
726 # fix up dirstate | 726 # fix up dirstate |
727 scmutil.dirstatecopy(ui, repo, wctx, abssrc, abstarget, | 727 scmutil.dirstatecopy(ui, repo, wctx, abssrc, abstarget, |
728 dryrun=dryrun, cwd=cwd) | 728 dryrun=dryrun, cwd=cwd) |
729 if rename and not dryrun: | 729 if rename and not dryrun: |
730 if not after and srcexists and not samefile: | 730 if not after and srcexists and not samefile: |
731 util.unlinkpath(repo.wjoin(abssrc)) | 731 repo.wvfs.unlinkpath(abssrc) |
732 wctx.forget([abssrc]) | 732 wctx.forget([abssrc]) |
733 | 733 |
734 # pat: ossep | 734 # pat: ossep |
735 # dest ossep | 735 # dest ossep |
736 # srcs: list of (hgsep, hgsep, ossep, bool) | 736 # srcs: list of (hgsep, hgsep, ossep, bool) |
2472 with repo.wlock(): | 2472 with repo.wlock(): |
2473 if not after: | 2473 if not after: |
2474 for f in list: | 2474 for f in list: |
2475 if f in added: | 2475 if f in added: |
2476 continue # we never unlink added files on remove | 2476 continue # we never unlink added files on remove |
2477 util.unlinkpath(repo.wjoin(f), ignoremissing=True) | 2477 repo.wvfs.unlinkpath(f, ignoremissing=True) |
2478 repo[None].forget(list) | 2478 repo[None].forget(list) |
2479 | 2479 |
2480 if warn: | 2480 if warn: |
2481 for warning in warnings: | 2481 for warning in warnings: |
2482 ui.warn(warning) | 2482 ui.warn(warning) |
3197 fc = ctx[f] | 3197 fc = ctx[f] |
3198 repo.wwrite(f, fc.data(), fc.flags()) | 3198 repo.wwrite(f, fc.data(), fc.flags()) |
3199 | 3199 |
3200 def doremove(f): | 3200 def doremove(f): |
3201 try: | 3201 try: |
3202 util.unlinkpath(repo.wjoin(f)) | 3202 repo.wvfs.unlinkpath(f) |
3203 except OSError: | 3203 except OSError: |
3204 pass | 3204 pass |
3205 repo.dirstate.remove(f) | 3205 repo.dirstate.remove(f) |
3206 | 3206 |
3207 audit_path = pathutil.pathauditor(repo.root) | 3207 audit_path = pathutil.pathauditor(repo.root) |