[PATCH] workingfilectx: add exists, lexists
Yuya Nishihara
yuya at tcha.org
Thu Jul 6 09:07:14 EDT 2017
On Tue, 4 Jul 2017 22:35:58 -0700, Phil Cohen wrote:
> # HG changeset patch
> # User Phil Cohen <phillco at fb.com>
> # Date 1499232952 25200
> # Tue Jul 04 22:35:52 2017 -0700
> # Node ID f62300ac0b720dae3e6966550c8db8c52d0170d1
> # Parent 5c9ad50fd62fbc2057ef7b44f921f22e7359af32
> workingfilectx: add exists, lexists
Queued, thanks.
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -1206,7 +1206,7 @@
>
> # remove renamed files after safely stored
> for f in moves:
> - if os.path.lexists(repo.wjoin(f)):
> + if wctx[f].lexists():
> repo.ui.debug("removing %s\n" % f)
> wctx[f].audit()
> wctx[f].remove()
Maybe you've noticed, these wctx[f] constructions can be merged into one.
More information about the Mercurial-devel
mailing list