Mercurial > hg
changeset 33082:f9e50ee4c52b
merge: replace repo.wvfs.unlinkpath() with calls to wctx[f].remove()
The code inside workingfilectx.remove() is a straight call to
repo.wvfs.unlinkpath, so this should be a no-op.
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Sun, 25 Jun 2017 16:58:26 -0700 |
parents | 6582dc01aca3 |
children | 05c680ebf512 |
files | mercurial/merge.py |
diffstat | 1 files changed, 4 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Sun Jun 25 16:56:49 2017 -0700 +++ b/mercurial/merge.py Sun Jun 25 16:58:26 2017 -0700 @@ -495,7 +495,7 @@ self._repo.wwrite(dfile, f.read(), flags) f.close() else: - self._repo.wvfs.unlinkpath(dfile, ignoremissing=True) + wctx[dfile].remove(ignoremissing=True) complete, r, deleted = filemerge.premerge(self._repo, self._local, lfile, fcd, fco, fca, labels=self._labels) @@ -1084,7 +1084,6 @@ yields tuples for progress updates """ verbose = repo.ui.verbose - unlinkpath = repo.wvfs.unlinkpath audit = repo.wvfs.audit try: cwd = pycompat.getcwd() @@ -1099,7 +1098,7 @@ repo.ui.note(_("removing %s\n") % f) audit(f) try: - unlinkpath(f, ignoremissing=True) + wctx[f].remove(ignoremissing=True) except OSError as inst: repo.ui.warn(_("update failed to remove %s: %s!\n") % (f, inst.strerror)) @@ -1213,7 +1212,7 @@ if os.path.lexists(repo.wjoin(f)): repo.ui.debug("removing %s\n" % f) audit(f) - repo.wvfs.unlinkpath(f) + wctx[f].remove() numupdates = sum(len(l) for m, l in actions.items() if m != 'k') @@ -1272,7 +1271,7 @@ repo.ui.note(_("moving %s to %s\n") % (f0, f)) audit(f) repo.wwrite(f, wctx.filectx(f0).data(), flags) - repo.wvfs.unlinkpath(f0) + wctx[f0].remove() updated += 1 # local directory rename, get