Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/commands.py @ 1354:8cf364c65425
Made the abort message for IOError nicer when the filename is known.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Tue, 27 Sep 2005 14:58:48 -0700 |
parents | 3729e2773cca |
children | 136920d13fc2 |
comparison
equal
deleted
inserted
replaced
1353:a0c68981a5f4 | 1354:8cf364c65425 |
---|---|
2176 u.warn("abort: error: %s\n" % inst.reason[1]) | 2176 u.warn("abort: error: %s\n" % inst.reason[1]) |
2177 elif hasattr(inst, "args") and inst[0] == errno.EPIPE: | 2177 elif hasattr(inst, "args") and inst[0] == errno.EPIPE: |
2178 if u.debugflag: | 2178 if u.debugflag: |
2179 u.warn("broken pipe\n") | 2179 u.warn("broken pipe\n") |
2180 elif getattr(inst, "strerror", None): | 2180 elif getattr(inst, "strerror", None): |
2181 u.warn("abort: %s\n" % inst.strerror) | 2181 if getattr(inst, "filename", None): |
2182 u.warn("abort: %s - %s\n" % (inst.strerror, inst.filename)) | |
2183 else: | |
2184 u.warn("abort: %s\n" % inst.strerror) | |
2182 else: | 2185 else: |
2183 raise | 2186 raise |
2184 except OSError, inst: | 2187 except OSError, inst: |
2185 if hasattr(inst, "filename"): | 2188 if hasattr(inst, "filename"): |
2186 u.warn("abort: %s: %s\n" % (inst.strerror, inst.filename)) | 2189 u.warn("abort: %s: %s\n" % (inst.strerror, inst.filename)) |