debugshell: add "api" object

Summary: It is handy to test edenapi methods directly.

Reviewed By: kulshrax

Differential Revision: D23750709

fbshipit-source-id: 33c15cecaa0372ba9e4688502e7d8f3fdda7c3b8
This commit is contained in:
Jun Wu 2020-09-18 13:24:31 -07:00 committed by Facebook GitHub Bot
parent 478e1fe524
commit 80bf264e24
3 changed files with 9 additions and 1 deletions

View File

@ -514,6 +514,8 @@ rev_name rev_range send_chunk send_error send_exception treemanifest_paths
txn_id use_mononoke use_treemanifest txn_id use_mononoke use_treemanifest
st_mtime st_ctime st_atime st_mtime st_ctime st_atime
get_ipython
""".split() """.split()
# ported from check-commit # ported from check-commit

View File

@ -72,6 +72,12 @@ def _assignobjects(objects, repo):
except Exception: except Exception:
pass pass
# EdenAPI client
try:
objects["api"] = repo.edenapi
except Exception:
pass
# Import other handy modules # Import other handy modules
for name in ["os", "sys", "subprocess", "re"]: for name in ["os", "sys", "subprocess", "re"]:
objects[name] = __import__(name) objects[name] = __import__(name)
@ -128,6 +134,7 @@ def _startipython(ui, repo):
bannermsg += ( bannermsg += (
" repo: the repo object\n" " repo: the repo object\n"
" serv: commitcloud service\n" " serv: commitcloud service\n"
" api: edenapi client\n"
" cl: repo.changelog\n" " cl: repo.changelog\n"
" mf: repo.manifestlog\n" " mf: repo.manifestlog\n"
" ml: repo.svfs.metalog\n" " ml: repo.svfs.metalog\n"

View File

@ -58,7 +58,6 @@ New errors are not allowed. Warnings are strongly discouraged.
Skipping lib/clib/portability/portability.h it has no-che?k-code (glob) Skipping lib/clib/portability/portability.h it has no-che?k-code (glob)
Skipping lib/clib/portability/unistd.h it has no-che?k-code (glob) Skipping lib/clib/portability/unistd.h it has no-che?k-code (glob)
Skipping lib/clib/sha1.h it has no-che?k-code (glob) Skipping lib/clib/sha1.h it has no-che?k-code (glob)
edenscm/hgext/debugshell.py:179: use foobar, not foo_bar naming --> get_ipython = ipython.get_ipython # noqa: F841
edenscm/hgext/extlib/phabricator/graphql.py:*: use foobar, not foo_bar naming --> ca_bundle = repo.ui.configpath("web", "cacerts") (glob) edenscm/hgext/extlib/phabricator/graphql.py:*: use foobar, not foo_bar naming --> ca_bundle = repo.ui.configpath("web", "cacerts") (glob)
edenscm/hgext/extlib/phabricator/graphql.py:*: use foobar, not foo_bar naming --> def scmquery_log( (glob) edenscm/hgext/extlib/phabricator/graphql.py:*: use foobar, not foo_bar naming --> def scmquery_log( (glob)
edenscm/hgext/hggit/git_handler.py:*: use foobar, not foo_bar naming --> git_renames = {} (glob) edenscm/hgext/hggit/git_handler.py:*: use foobar, not foo_bar naming --> git_renames = {} (glob)