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
Summary: See rd9d8d78e in the hg repository; cmdutil.service moved to server.runservice
Test Plan: Run test-fbconduit.t and observe it passing once more.
Reviewers: simonfar, rmcelroy, quark
Reviewed By: quark
Subscribers: mjpieters, #mercurial
Differential Revision: https://phabricator.intern.facebook.com/D4244268
Signature: t1:4244268:1480432981:8e06beadba912294e6d1a01d93b13848cb16a096
Summary: 1e42206a9778 in core hg broke this.
Test Plan: run the test and it doesn't fail
Reviewers: #sourcecontrol, ttung, durham
Reviewed By: durham
Subscribers: durham, mjpieters
Differential Revision: https://phabricator.fb.com/D3012325
Tasks: 10299400
Signature: t1:3012325:1457118454:6b551be9d826d17ecff18f271b31d9dc0218f461
Summary:
FBConduit used to throw a conduit error when a rev didn't map.
Now, it just returns an empty string for the mapping. This updates the
fbconduit extension so that it matches the server behavior.
Test Plan: passed unit tests.
Reviewers: mitrandir, ericsumner, durham
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2331464
Tasks: 7970302
Signature: t1:2331464:1439500203:cbf79e9b9c54aebdf33bbad82c1982b5a69e8bc9
Summary:
Built a http server that serves as a mock fbconduit server. It
answers the normal requests that fbconduit makes, as well as:
PUT /from_repo/from_scm/to_repo/to_scm/from_hash/to_hash
DELETE /from_repo/from_scm/to_repo/to_scm/from_hash/to_hash
Test Plan: used in later diffs
Reviewers: lcharignon, rmcelroy, durham, ericsumner
Reviewed By: ericsumner
Subscribers: mitrandir
Differential Revision: https://phabricator.fb.com/D2244917
Signature: t1:2244917:1436982657:bde0c04ea21299970dfb782b43ed13ab1f3e17b0