Mercurial > hg > mercurial-crew-with-dirclash
comparison hgext/mq.py @ 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 | ebf1ecb5f4e8 |
children | 4d2c2597876f |
comparison
equal
deleted
inserted
replaced
2071:67a0a3852024 | 2086:8742352db413 |
---|---|
623 def getfile(f, rev): | 623 def getfile(f, rev): |
624 t = repo.file(f).read(rev) | 624 t = repo.file(f).read(rev) |
625 try: | 625 try: |
626 repo.wfile(f, "w").write(t) | 626 repo.wfile(f, "w").write(t) |
627 except IOError: | 627 except IOError: |
628 os.makedirs(os.path.dirname(repo.wjoin(f))) | 628 try: |
629 os.makedirs(os.path.dirname(repo.wjoin(f))) | |
630 except OSError, err: | |
631 if err.errno != errno.EEXIST: raise | |
629 repo.wfile(f, "w").write(t) | 632 repo.wfile(f, "w").write(t) |
630 | 633 |
631 if not wlock: | 634 if not wlock: |
632 wlock = repo.wlock() | 635 wlock = repo.wlock() |
633 if patch: | 636 if patch: |