Mercurial > public > mercurial-scm > hg
diff mercurial/cmdutil.py @ 24857:d8505bfe4825 stable
revert: restore the ability to revert across case only renames (issue4481)
This regressed in 5e16fe6fdd32, in what looks like an unrelated change.
It seems sufficient to pass 'ignoremissing=True', but the restored try/except
has been there for six years since 41bb88cb913e, so this seems safer for now.
Note that renaming directories in the filename doesn't appear to work- not sure
if this would end up throwing a different type of error when that is fixed.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 25 Apr 2015 23:54:31 -0400 |
parents | 8133494accf1 |
children | bff42a92012e |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Apr 27 11:11:26 2015 -0500 +++ b/mercurial/cmdutil.py Sat Apr 25 23:54:31 2015 -0400 @@ -3084,7 +3084,10 @@ repo.dirstate.drop(f) for f in actions['remove'][0]: audit_path(f) - util.unlinkpath(repo.wjoin(f)) + try: + util.unlinkpath(repo.wjoin(f)) + except OSError: + pass repo.dirstate.remove(f) for f in actions['drop'][0]: audit_path(f)