sapling/hgext3rd
Adam Simpkins 33b2fbc0bc fbconduit: fix error handling in gitnode() revset
Summary:
Don't let errors propagate out of the gitnode() revset.  Always report errors
in gitnode() as a translation failure, rather than letting exceptions propagate
up and crash mercurial.  The code was previously only catching internally
generated ConduitError exceptions, but it can also throw HttpError exceptions,
and the underlying httplib code can throw its own exceptions as well as
socket.error exceptions.

This also fixes the test code to use an ephemeral TCP port rather than assuming
port 8543 will always be available.  Using a fixed TCP port in test code is a
very common way to cause bogus failures if the tests are run in parallel.
(For instance, testing multiple repositories in parallel on the same build
host.)

Test Plan:
Added unit tests that check the behavior when the server returns a 500 error,
and when the server refuses the connection entirely.

Reviewers: quark, durham, rmcelroy

Reviewed By: rmcelroy

Subscribers: net-systems-diffs@fb.com, yogeshwer, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4556871

Signature: t1:4556871:1487062142:b58d770d46c975d44933bec08cfce8acb25ff16b
2017-02-15 12:35:06 -08:00
..
__init__.py debian: Do not package hgext3rd/__init__.py 2016-12-19 16:34:49 -08:00
absorb.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
allowunstable.py allowunstable: allow hg record in the middle of a stack 2017-01-26 10:24:16 -08:00
arcdiff.py arcdiff: use absolute paths 2017-01-20 00:24:45 -08:00
backups.py unit-tests: fixes 2017-01-03 05:59:55 -08:00
bundle2hooks.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
catnotate.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
chistedit.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
commitextras.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
debugcommitmessage.py extension to print commit message that would be supplied to editor 2016-10-03 04:39:51 -07:00
debuginhibit.py debuginhibit: print out inhibited nodes by default 2017-02-10 11:28:33 -08:00
dialect.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
dirsync.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
errorredirect.py unit-tests: fixes 2017-01-03 05:59:55 -08:00
extorder.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
extutil.py extutil: create new package and move runshellfast here 2016-11-21 00:52:30 -08:00
fastlog.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
fastpartialmatch.py fastpartialmatch: fix the build 2017-02-02 08:00:55 -08:00
fbamend.py fbamend: make inhibit hook fire after rebase 2017-02-02 11:49:44 -08:00
fbconduit.py fbconduit: fix error handling in gitnode() revset 2017-02-15 12:35:06 -08:00
fbhistedit.py unit-tests: fixes 2017-01-03 05:59:55 -08:00
generic_bisect.py fastpartialmatch: use bisect to quickly find matching revisions 2017-02-02 05:12:10 -08:00
githelp.py hgext: githelp support for commit -C 2016-12-02 10:41:54 +00:00
gitlookup.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
gitrevset.py templates: fix help messages for template keywords 2017-01-19 12:52:54 -08:00
grepdiff.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
grpcheck.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
hiddenerror.py hiddenerror: make error message configurable 2017-02-14 11:15:19 -08:00
inhibitwarn.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
linkrevcache.py linkrevcache: update documentation 2016-12-02 00:59:48 +00:00
logginghelper.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
mergedriver.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
morestatus.py morestatus: suggest --clean for unfinished update state 2017-01-03 16:25:52 +00:00
myparent.py templates: fix help messages for template keywords 2017-01-19 12:52:54 -08:00
nointerrupt.py hgext: move single file extensions to hgext3rd 2016-07-08 13:15:42 +01:00
ownercheck.py ownercheck: new extension to prevent operations on repos not owned 2016-07-26 13:10:15 +01:00
patchpython.py patchpython: fix test-check tests 2016-10-20 16:03:31 +01:00
perftweaks.py perftweaks: fix failure 2017-02-03 07:22:07 -08:00
phabdiff.py templates: fix help messages for template keywords 2017-01-19 12:52:54 -08:00
phabstatus.py templates: fix help messages for template keywords 2017-01-19 12:52:54 -08:00
phrevset.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
profiling.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
pullcreatemarkers.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
pushrebase.py pushrebase: close bundle file 2017-01-03 06:01:57 -08:00
pushvars.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00
rage.py rage: annotate hidden nodes in hg sl 2017-01-23 17:56:38 -08:00
reset.py unit-tests: fixes 2017-01-03 05:59:55 -08:00
sampling.py sampling: fix comment 2017-02-07 00:39:26 -08:00
show.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
simplecache.py testedwith: change testedwith to "ships-with-fb-hgext" 2016-11-29 13:24:07 +00:00
smartlog.py smartlog: work better with repos where there is no master 2017-02-14 17:25:12 -08:00
sparse.py Allow sparse profiles to contain comments 2017-02-13 04:17:51 -08:00
sshaskpass.py sshaskpass: do not import mercurial 2017-01-05 17:04:34 +00:00
tweakdefaults.py tweakdefaults: make --phabdiff use shortdate on --quiet as in default blame 2017-01-10 08:48:02 -08:00
uncommit.py uncommit: don't lose copy information of remaining files (issue5403) 2017-02-01 02:17:40 -08:00
upgradegeneraldelta.py pyflakes: fix all pyflakes issues 2016-11-25 00:23:21 +00:00