Mercurial > hg
changeset 10872:9606edb8777e stable
mq: use util.unlink instead of os.unlink and os.removedirs
If, on Windows, your repository and working copy are in a reparse point and you
use os.removedirs, you will remove non-empty reparse points, disabling the
reparse point. See @fa901423ac23.
author | Henrik Stuart <henrik.stuart@edlund.dk> |
---|---|
date | Wed, 07 Apr 2010 16:55:01 +0200 |
parents | 532138ba8a06 |
children | bbf496db0766 4f11978ae45d |
files | hgext/mq.py |
diffstat | 1 files changed, 1 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Tue Apr 06 15:39:44 2010 +0200 +++ b/hgext/mq.py Wed Apr 07 16:55:01 2010 +0200 @@ -1179,12 +1179,10 @@ raise util.Abort(_("deletions found between repo revs")) for f in a: try: - os.unlink(repo.wjoin(f)) + util.unlink(repo.wjoin(f)) except OSError, e: if e.errno != errno.ENOENT: raise - try: os.removedirs(os.path.dirname(repo.wjoin(f))) - except: pass repo.dirstate.forget(f) for f in m: getfile(f, mmap[f], mmap.flags(f))