Mercurial > hg
changeset 2086:8742352db413
mq: do not fail if directory to create exists
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Tue, 18 Apr 2006 14:56:54 -0700 |
parents | 67a0a3852024 |
children | 19fcc2889bad |
files | hgext/mq.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Thu Apr 13 17:42:49 2006 -0700 +++ b/hgext/mq.py Tue Apr 18 14:56:54 2006 -0700 @@ -625,7 +625,10 @@ try: repo.wfile(f, "w").write(t) except IOError: - os.makedirs(os.path.dirname(repo.wjoin(f))) + try: + os.makedirs(os.path.dirname(repo.wjoin(f))) + except OSError, err: + if err.errno != errno.EEXIST: raise repo.wfile(f, "w").write(t) if not wlock: