# HG changeset patch # User Matt Harbison # Date 1542323697 18000 # Node ID 93e5d18251d61b8abb2f6c6c9828a1c2f4f6fb57 # Parent 380f5131ee7b4ddbbc6b02538a04067a70d6d27a lfs: make the exception messages consistent I don't love that it repeats 'HTTP Error' in an already long message, but I doubt that we should assume that it will always say that on the original exception message. diff -r 380f5131ee7b -r 93e5d18251d6 hgext/lfs/blobstore.py --- a/hgext/lfs/blobstore.py Thu Nov 15 18:08:29 2018 -0500 +++ b/hgext/lfs/blobstore.py Thu Nov 15 18:14:57 2018 -0500 @@ -441,7 +441,7 @@ except util.urlerr.httperror as ex: if self.ui.debugflag: self.ui.debug('%s: %s\n' % (oid, ex.read())) - raise LfsRemoteError(_('HTTP error: %s (oid=%s, action=%s)') + raise LfsRemoteError(_('LFS HTTP error: %s (oid=%s, action=%s)') % (ex, oid, action)) except util.urlerr.urlerror as ex: hint = (_('attempted connection to %s') diff -r 380f5131ee7b -r 93e5d18251d6 tests/test-lfs-serve-access.t --- a/tests/test-lfs-serve-access.t Thu Nov 15 18:08:29 2018 -0500 +++ b/tests/test-lfs-serve-access.t Thu Nov 15 18:14:57 2018 -0500 @@ -282,7 +282,7 @@ $ hg -R client push http://localhost:$HGPORT1 pushing to http://localhost:$HGPORT1/ searching for changes - abort: HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! + abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c, action=upload)! [255] $ echo 'test lfs file' > server/lfs3.bin @@ -294,14 +294,14 @@ $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ > -R client update -r tip - abort: HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! + abort: LFS HTTP error: HTTP Error 500: Internal Server Error (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! [255] Test a checksum failure during the processing of the GET request $ hg --config lfs.url=http://localhost:$HGPORT1/.git/info/lfs \ > -R client update -r tip - abort: HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! + abort: LFS HTTP error: HTTP Error 422: corrupt blob (oid=276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d, action=download)! [255] $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS