# HG changeset patch # User Pierre-Yves David # Date 2014-08-30 00:10:29 # Node ID 402e5fba65096c2e7ecec5279809a921cec079e5 # Parent 1db04829bdc187ccf8a2cae3915b654b4ea68110 revert: drop `lexist` check in the backup logic We are no longer trying to backup files that do not exist on disk. This check can be safely dropped. diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py --- a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -2576,8 +2576,7 @@ def revert(ui, repo, ctx, parents, *pats continue if xlist is not None: xlist.append(abs) - if (dobackup and os.path.lexists(target) - and wctx[abs].cmp(ctx[abs])): + if (dobackup and wctx[abs].cmp(ctx[abs])): bakname = "%s.orig" % rel ui.note(_('saving current version of %s as %s\n') % (rel, bakname))