mercurial/scmutil.py
changeset 41288 17941fc53ae9
parent 41218 24a1f67bb75a
child 41369 5079242abef9
equal deleted inserted replaced
41287:c0221d929eb9 41288:17941fc53ae9
    10 import errno
    10 import errno
    11 import glob
    11 import glob
    12 import hashlib
    12 import hashlib
    13 import os
    13 import os
    14 import re
    14 import re
    15 import socket
       
    16 import subprocess
    15 import subprocess
    17 import weakref
    16 import weakref
    18 
    17 
    19 from .i18n import _
    18 from .i18n import _
    20 from .node import (
    19 from .node import (
   268         ui.error(_("abort: out of memory\n"))
   267         ui.error(_("abort: out of memory\n"))
   269     except SystemExit as inst:
   268     except SystemExit as inst:
   270         # Commands shouldn't sys.exit directly, but give a return code.
   269         # Commands shouldn't sys.exit directly, but give a return code.
   271         # Just in case catch this and and pass exit code to caller.
   270         # Just in case catch this and and pass exit code to caller.
   272         return inst.code
   271         return inst.code
   273     except socket.error as inst:
       
   274         ui.error(_("abort: %s\n") % stringutil.forcebytestr(inst.args[-1]))
       
   275 
   272 
   276     return -1
   273     return -1
   277 
   274 
   278 def checknewlabel(repo, lbl, kind):
   275 def checknewlabel(repo, lbl, kind):
   279     # Do not use the "kind" parameter in ui output.
   276     # Do not use the "kind" parameter in ui output.