diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -1170,12 +1170,10 @@ class queue(object): 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 + r: fctx = ctx[f]