rename fbconduit extension to fbscmquery

Summary:
This is mostly result of:
```
  find . -type f -exec sed -i "s/fbconduit/fbscmquery/g" {} \;

```
`fbconduit` extension doesn't use conduit anymore so the name is just misleading.

Reviewed By: ikostia

Differential Revision: D18748843

fbshipit-source-id: 0d59e61ba7a96d86d9d1333d81255108cc3141bc
This commit is contained in:
Mateusz Kwapich 2019-12-13 03:20:28 -08:00 committed by Facebook Github Bot
parent b6f11be83a
commit 7e0e170db9
13 changed files with 38 additions and 38 deletions

View File

@ -388,7 +388,7 @@ class Client(object):
getmirroredrevmap(repo, [gitnode1, gitnode2],"git", "hg")
# => {gitnode1: hgnode1, gitnode2: hgnode2}
"""
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
if not reponame:
return {}

View File

@ -8,7 +8,7 @@
connect to scmquery servers for fast fetching of logs on files and directories.
Configure it by adding the following config options to your .hg/hgrc.
This relies on fbconduit being setup for the repo; this should already
This relies on fbscmquery being setup for the repo; this should already
be configured if supported by your repo.
Config::
@ -181,7 +181,7 @@ def fastlogfollow(orig, repo, subset, x, name, followfirst=False):
else:
startrev = repo["."].rev()
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
if not reponame or not repo.ui.configbool("fastlog", "enabled"):
repo.ui.debug("fastlog: not used because fastlog is disabled\n")
return orig(repo, subset, x, name, followfirst)

View File

@ -3,8 +3,8 @@
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# fbconduit.py
# An extension to query remote servers for extra information via conduit RPC
# scmquery.py
# An extension to augement hg with information obtained from SCMQuery
import json
import re
@ -57,7 +57,7 @@ def uisetup(ui):
def mirrornode(ctx, mapping, args):
"""template: find this commit in other repositories"""
reponame = mapping["repo"].ui.config("fbconduit", "reponame")
reponame = mapping["repo"].ui.config("fbscmquery", "reponame")
if not reponame:
# We don't know who we are, so we can't ask for a translation
return ""
@ -90,11 +90,11 @@ templatekeyword = registrar.templatekeyword()
@templatekeyword("gitnode")
def showgitnode(repo, ctx, templ, **args):
"""Return the git revision corresponding to a given hg rev"""
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
if not reponame:
# We don't know who we are, so we can't ask for a translation
return ""
backingrepos = repo.ui.configlist("fbconduit", "backingrepos", default=[reponame])
backingrepos = repo.ui.configlist("fbscmquery", "backingrepos", default=[reponame])
if ctx.mutable():
# Local commits don't have translations
@ -129,11 +129,11 @@ def gitnode(repo, subset, x):
l = revset.getargs(x, 1, 1, _("id requires one argument"))
n = revset.getstring(l[0], _("id requires a string"))
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
if not reponame:
# We don't know who we are, so we can't ask for a translation
return subset.filter(lambda r: False)
backingrepos = repo.ui.configlist("fbconduit", "backingrepos", default=[reponame])
backingrepos = repo.ui.configlist("fbscmquery", "backingrepos", default=[reponame])
lasterror = None
hghash = None
@ -180,7 +180,7 @@ def _phablookup(repo, phabrev):
phabhash = phabmatch.group(2)
# The hash may be a git hash
if phabrepo in repo.ui.configlist("fbconduit", "gitcallsigns", []):
if phabrepo in repo.ui.configlist("fbscmquery", "gitcallsigns", []):
return gittohg(phabhash)
return [repo[phabhash].node()]
@ -202,7 +202,7 @@ def _phablookup(repo, phabrev):
def _scmquerylookupglobalrev(orig, repo, rev):
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
if reponame:
try:
client = graphql.Client(repo=repo)

View File

@ -313,7 +313,7 @@ class remotefilectx(context.filectx):
def _linknodeviafastlog(self, repo, path, srcrev, fnode, cl, mfl, commonlogkwargs):
start = time.time()
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
logmsg = ""
try:
srchex = repo[srcrev].hex()

View File

@ -264,7 +264,7 @@ def _preimportmodules():
"extutil",
"fastannotate",
"fastlog",
"fbconduit",
"fbscmquery",
"fbhistedit",
"fixcorrupt",
"fsmonitor",

View File

@ -1840,7 +1840,7 @@ def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None, ancestors=No
prog.value = (z, f)
ms.resolve(f, wctx)
files.append(f)
reponame = repo.ui.config("fbconduit", "reponame")
reponame = repo.ui.config("fbscmquery", "reponame")
command = " ".join(util.shellquote(a) for a in pycompat.sysargv)
repo.ui.log(
"manualmergefiles",

View File

@ -55,10 +55,10 @@ New errors are not allowed. Warnings are strongly discouraged.
undocumented: extensions.remotenames (str)
undocumented: extensions.treemanifest (str)
undocumented: fastlog.enabled (bool)
undocumented: fbconduit.backingrepos (list) [[reponame]]
undocumented: fbconduit.gitcallsigns (list)
undocumented: fbconduit.reponame (str)
undocumented: fbhistedit.exec_in_user_shell (str)
undocumented: fbscmquery.backingrepos (list) [[reponame]]
undocumented: fbscmquery.gitcallsigns (list)
undocumented: fbscmquery.reponame (str)
undocumented: format.usehgsql (bool)
undocumented: git.public (list)
undocumented: grep.biggrepcorpus (str)

View File

@ -8,7 +8,7 @@ from edenscm.mercurial import commands, extensions, ui as uimod
ignore = {
b"",
b"factotum",
b"fbconduit",
b"fbscmquery",
b"globalrevs",
b"hgsql",
b"highlight",

View File

@ -2,7 +2,7 @@
> [extensions]
> tweakdefaults=
> fastlog=
> [fbconduit]
> [fbscmquery]
> host=our.intern.facebook.com
> protocol=http
> reponame=fbsource

View File

@ -25,8 +25,8 @@ Basic functionality.
$ echo {} > .arcconfig
$ cat >> .hg/hgrc <<EOF
> [extensions]
> fbconduit=
> [fbconduit]
> fbscmquery=
> [fbscmquery]
> reponame = basic
> host = localhost:$CONDUIT_PORT
> path = /intern/conduit/
@ -70,8 +70,8 @@ Test with one backing repos specified.
$ echo {} > .arcconfig
$ cd single_backingrepo
$ echo "[extensions]" >> .hg/hgrc
$ echo "fbconduit=" >> .hg/hgrc
$ echo "[fbconduit]" >> .hg/hgrc
$ echo "fbscmquery=" >> .hg/hgrc
$ echo "[fbscmquery]" >> .hg/hgrc
$ echo "reponame = single" >> .hg/hgrc
$ echo "backingrepos = single_src" >> .hg/hgrc
$ echo "host = localhost:$CONDUIT_PORT" >> .hg/hgrc
@ -104,8 +104,8 @@ Test with multiple backing repos specified.
$ echo {} > .arcconfig
$ cd backingrepos
$ echo "[extensions]" >> .hg/hgrc
$ echo "fbconduit=" >> .hg/hgrc
$ echo "[fbconduit]" >> .hg/hgrc
$ echo "fbscmquery=" >> .hg/hgrc
$ echo "[fbscmquery]" >> .hg/hgrc
$ echo "reponame = multiple" >> .hg/hgrc
$ echo "backingrepos = src_a src_b src_c" >> .hg/hgrc
$ echo "host = localhost:$CONDUIT_PORT" >> .hg/hgrc
@ -172,8 +172,8 @@ Test with a bad server port, where we get connection refused errors.
$ echo {} > .arcconfig
$ cd errortest
$ echo "[extensions]" >> .hg/hgrc
$ echo "fbconduit=" >> .hg/hgrc
$ echo "[fbconduit]" >> .hg/hgrc
$ echo "fbscmquery=" >> .hg/hgrc
$ echo "[fbscmquery]" >> .hg/hgrc
$ echo "reponame = errortest" >> .hg/hgrc
$ echo "host = localhost:9" >> .hg/hgrc
$ echo "path = /intern/conduit/" >> .hg/hgrc
@ -205,13 +205,13 @@ Make sure that globalrevs work
$ cd ..
$ initserver mockwwwrepo mockwwwrepo
$ cd mockwwwrepo
$ enable fbconduit globalrevs pushrebase
$ enable fbscmquery globalrevs pushrebase
$ setconfig \
> hgsql.enabled=True \
> fbconduit.reponame=basic \
> fbconduit.host=localhost:$CONDUIT_PORT \
> fbconduit.path=/intern/conduit/ \
> fbconduit.protocol=http \
> fbscmquery.reponame=basic \
> fbscmquery.host=localhost:$CONDUIT_PORT \
> fbscmquery.path=/intern/conduit/ \
> fbscmquery.protocol=http \
> globalrevs.onlypushrebase=False \
> globalrevs.startrev=5000 \
> globalrevs.svnrevinteroperation=True \

View File

@ -258,10 +258,10 @@ Case 1: fastlog service calls fails or times out
$ echo {} > .arcconfig
$ cat >> .hg/hgrc <<EOF
> [extensions]
> fbconduit=
> fbscmquery=
> [fastlog]
> enabled=True
> [fbconduit]
> [fbscmquery]
> reponame = basic
> host = localhost:$CONDUIT_PORT
> path = /intern/conduit/

View File

@ -312,8 +312,8 @@ Test extension help:
extutil (no help text available)
fastannotate yet another annotate implementation that might be faster
fastlog
fbconduit (no help text available)
fbhistedit extends the existing histedit functionality
fbscmquery (no help text available)
fixcorrupt (no help text available)
generic_bisect
(no help text available)

View File

@ -123,7 +123,7 @@ Somehow problematic: With many extensions
> fastannotate=
> fastlog=
> fastpartialmatch=!
> fbconduit=
> fbscmquery=
> fbhistedit=
> githelp=
> gitlookup=!
@ -182,7 +182,7 @@ Somehow problematic: With many extensions
> [treemanifest]
> treeonly=True
>
> [fbconduit]
> [fbscmquery]
> host=example.com
> path=/conduit/
> reponame=x