mercurial/commands.py
changeset 1350 3729e2773cca
parent 1342 5a42da1db402
child 1354 8cf364c65425
equal deleted inserted replaced
1349:c6295d2a361e 1350:3729e2773cca
  2172     except IOError, inst:
  2172     except IOError, inst:
  2173         if hasattr(inst, "code"):
  2173         if hasattr(inst, "code"):
  2174             u.warn("abort: %s\n" % inst)
  2174             u.warn("abort: %s\n" % inst)
  2175         elif hasattr(inst, "reason"):
  2175         elif hasattr(inst, "reason"):
  2176             u.warn("abort: error: %s\n" % inst.reason[1])
  2176             u.warn("abort: error: %s\n" % inst.reason[1])
  2177         elif getattr(inst, "strerror", None):
       
  2178             u.warn("abort: %s\n" % inst.strerror)
       
  2179         elif hasattr(inst, "args") and inst[0] == errno.EPIPE:
  2177         elif hasattr(inst, "args") and inst[0] == errno.EPIPE:
  2180             if u.debugflag:
  2178             if u.debugflag:
  2181                 u.warn("broken pipe\n")
  2179                 u.warn("broken pipe\n")
       
  2180         elif getattr(inst, "strerror", None):
       
  2181             u.warn("abort: %s\n" % inst.strerror)
  2182         else:
  2182         else:
  2183             raise
  2183             raise
  2184     except OSError, inst:
  2184     except OSError, inst:
  2185         if hasattr(inst, "filename"):
  2185         if hasattr(inst, "filename"):
  2186             u.warn("abort: %s: %s\n" % (inst.strerror, inst.filename))
  2186             u.warn("abort: %s: %s\n" % (inst.strerror, inst.filename))