2015-06-27 02:45:29 +03:00
|
|
|
#require test-repo
|
|
|
|
|
2016-05-11 07:49:27 +03:00
|
|
|
$ . "$TESTDIR/helpers-testrepo.sh"
|
2017-06-15 20:46:39 +03:00
|
|
|
|
|
|
|
Sanity check check-config.py
|
|
|
|
|
|
|
|
$ cat > testfile.py << EOF
|
|
|
|
> # Good
|
|
|
|
> foo = ui.config('ui', 'username')
|
|
|
|
> # Missing
|
|
|
|
> foo = ui.config('ui', 'doesnotexist')
|
|
|
|
> # Missing different type
|
|
|
|
> foo = ui.configint('ui', 'missingint')
|
|
|
|
> # Missing with default value
|
|
|
|
> foo = ui.configbool('ui', 'missingbool1', default=True)
|
|
|
|
> foo = ui.configbool('ui', 'missingbool2', False)
|
2017-07-02 06:34:27 +03:00
|
|
|
> # Inconsistent values for defaults.
|
|
|
|
> foo = ui.configint('ui', 'intdefault', default=1)
|
|
|
|
> foo = ui.configint('ui', 'intdefault', default=42)
|
|
|
|
> # Can suppress inconsistent value error
|
|
|
|
> foo = ui.configint('ui', 'intdefault2', default=1)
|
|
|
|
> # inconsistent config: ui.intdefault2
|
|
|
|
> foo = ui.configint('ui', 'intdefault2', default=42)
|
2017-06-15 20:46:39 +03:00
|
|
|
> EOF
|
|
|
|
|
|
|
|
$ cat > files << EOF
|
|
|
|
> mercurial/help/config.txt
|
|
|
|
> $TESTTMP/testfile.py
|
|
|
|
> EOF
|
|
|
|
|
2015-06-27 02:45:29 +03:00
|
|
|
$ cd "$TESTDIR"/..
|
|
|
|
|
2017-06-20 16:45:02 +03:00
|
|
|
$ $PYTHON contrib/check-config.py < $TESTTMP/files
|
2017-07-02 06:34:27 +03:00
|
|
|
foo = ui.configint('ui', 'intdefault', default=42)
|
|
|
|
conflict on ui.intdefault: ('int', '42') != ('int', '1')
|
2017-12-11 06:50:57 +03:00
|
|
|
at $TESTTMP/testfile.py:12:
|
2017-06-15 20:46:39 +03:00
|
|
|
undocumented: ui.doesnotexist (str)
|
2017-07-02 06:34:27 +03:00
|
|
|
undocumented: ui.intdefault (int) [42]
|
|
|
|
undocumented: ui.intdefault2 (int) [42]
|
2017-06-15 20:46:39 +03:00
|
|
|
undocumented: ui.missingbool1 (bool) [True]
|
|
|
|
undocumented: ui.missingbool2 (bool)
|
|
|
|
undocumented: ui.missingint (int)
|
|
|
|
|
2015-06-27 02:45:29 +03:00
|
|
|
New errors are not allowed. Warnings are strongly discouraged.
|
2018-07-07 03:13:21 +03:00
|
|
|
$ testrepohg files . | egrep -v '^tests/' | egrep '\.(py|txt)$' | sed 's|\\|/|g' |
|
2017-06-20 16:45:02 +03:00
|
|
|
> $PYTHON contrib/check-config.py
|
2018-04-25 23:41:45 +03:00
|
|
|
undocumented: clone.requestfullclone (bool)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: extensions.treemanifest (str)
|
|
|
|
undocumented: fastlog.debug (str)
|
|
|
|
undocumented: fastlog.enabled (bool)
|
|
|
|
undocumented: fastmanifest.cachecutoffdays (int) [60]
|
|
|
|
undocumented: fastmanifest.cacheonchange (bool)
|
|
|
|
undocumented: fastmanifest.cacheonchangebackground (bool) [True]
|
|
|
|
undocumented: fastmanifest.debugmetrics (bool)
|
|
|
|
undocumented: fastmanifest.logfile (str)
|
2018-05-30 23:30:10 +03:00
|
|
|
undocumented: fastmanifest.relevantremotenames (list) [["master"]]
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: fastmanifest.silent (bool)
|
2018-05-30 23:30:10 +03:00
|
|
|
undocumented: fastmanifest.silentworker (bool) [True]
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: fastmanifest.usecache (bool)
|
|
|
|
undocumented: fastmanifest.usetree (bool)
|
|
|
|
undocumented: fbconduit.backingrepos (list) [[reponame]]
|
|
|
|
undocumented: fbconduit.gitcallsigns (list)
|
|
|
|
undocumented: fbconduit.host (str)
|
|
|
|
undocumented: fbconduit.path (str)
|
|
|
|
undocumented: fbconduit.protocol (str)
|
|
|
|
undocumented: fbconduit.reponame (str)
|
|
|
|
undocumented: fbhistedit.exec_in_user_shell (str)
|
2018-01-03 18:03:21 +03:00
|
|
|
undocumented: format.usehgsql (bool)
|
2018-01-03 21:06:35 +03:00
|
|
|
undocumented: git.public (list)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: grep.command (str)
|
2018-04-13 20:43:19 +03:00
|
|
|
undocumented: hggit.disallowinitbare (bool)
|
2018-01-03 21:06:35 +03:00
|
|
|
undocumented: hggit.usephases (bool)
|
2018-01-03 18:03:21 +03:00
|
|
|
undocumented: hgsql.bypass (bool)
|
|
|
|
undocumented: hgsql.database (str)
|
|
|
|
undocumented: hgsql.enabled (bool)
|
2018-02-21 16:55:07 +03:00
|
|
|
undocumented: hgsql.engine (str)
|
2018-01-03 18:03:21 +03:00
|
|
|
undocumented: hgsql.host (str)
|
|
|
|
undocumented: hgsql.locktimeout (str)
|
|
|
|
undocumented: hgsql.port (int)
|
|
|
|
undocumented: hgsql.profileoutput (str)
|
|
|
|
undocumented: hgsql.user (str)
|
2018-09-25 06:39:40 +03:00
|
|
|
undocumented: hgsql.verbose (bool)
|
2018-01-03 18:03:21 +03:00
|
|
|
undocumented: hgsql.verifybatchsize (int)
|
2018-05-30 23:30:10 +03:00
|
|
|
undocumented: hgsubversion.externals (str) ["svnexternals"]
|
2018-01-03 22:51:20 +03:00
|
|
|
undocumented: hgsubversion.failoninvalidreplayfile (bool)
|
|
|
|
undocumented: hgsubversion.failonmissing (bool)
|
|
|
|
undocumented: hgsubversion.filestoresize (int) [200]
|
|
|
|
undocumented: hgsubversion.nativerevs (bool)
|
|
|
|
undocumented: hgsubversion.password (str)
|
|
|
|
undocumented: hgsubversion.password_stores (list)
|
|
|
|
undocumented: hgsubversion.revmapimpl (str)
|
|
|
|
undocumented: hgsubversion.startrev (str)
|
|
|
|
undocumented: hgsubversion.stupid (bool)
|
|
|
|
undocumented: hgsubversion.tunnels (list)
|
|
|
|
undocumented: hgsubversion.unsafeskip (list)
|
|
|
|
undocumented: hgsubversion.username (str)
|
2018-03-06 01:51:35 +03:00
|
|
|
undocumented: infinitepush.bgssh (str)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: infinitepush.bundle-stream (bool)
|
2018-03-06 01:51:35 +03:00
|
|
|
undocumented: infinitepushbackup.bgdebug (bool)
|
2018-01-23 23:08:08 +03:00
|
|
|
undocumented: infinitepushbackup.disableduntil (str)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: morestatus.show (bool)
|
|
|
|
undocumented: nointerrupt.interactiveonly (bool) [True]
|
|
|
|
undocumented: perftweaks.disablebranchcache (bool)
|
|
|
|
undocumented: perftweaks.disablecasecheck (bool)
|
|
|
|
undocumented: perftweaks.disabletags (bool)
|
2018-08-16 23:36:00 +03:00
|
|
|
undocumented: phabricator.arcrc_host (str)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: phabricator.graphql_app_id (str)
|
|
|
|
undocumented: phabricator.graphql_app_token (str)
|
|
|
|
undocumented: phabricator.graphql_host (str)
|
|
|
|
undocumented: phabstatus.logpeekahead (int) [30]
|
|
|
|
undocumented: phrevset.callsign (str)
|
|
|
|
undocumented: pushrebase.blocknonpushrebase (bool)
|
|
|
|
undocumented: pushrebase.rewritedates (bool)
|
|
|
|
undocumented: rage.fastmanifestcached (bool)
|
|
|
|
undocumented: remotefilelog.backgroundrepack (bool)
|
|
|
|
undocumented: remotefilelog.cachegroup (str)
|
|
|
|
undocumented: remotefilelog.debug (bool)
|
|
|
|
undocumented: remotefilelog.excludepattern (list)
|
|
|
|
undocumented: remotefilelog.fastdatapack (bool)
|
|
|
|
undocumented: remotefilelog.fetchpacks (bool)
|
|
|
|
undocumented: remotefilelog.fetchwarning (str)
|
|
|
|
undocumented: remotefilelog.includepattern (list)
|
|
|
|
undocumented: remotefilelog.pullprefetch (str)
|
|
|
|
undocumented: remotefilelog.reponame (str)
|
|
|
|
undocumented: remotefilelog.server (bool)
|
|
|
|
undocumented: remotefilelog.servercachepath (str)
|
|
|
|
undocumented: remotefilelog.serverexpiration (int) [30]
|
|
|
|
undocumented: remotefilelog.shallowtrees (bool)
|
2018-05-30 23:30:10 +03:00
|
|
|
undocumented: remotefilelog.validatecache (str) ["on"]
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: remotefilelog.validatecachelog (str)
|
2018-01-03 17:28:53 +03:00
|
|
|
undocumented: remotenames.alias.default (bool)
|
|
|
|
undocumented: remotenames.allownonfastforward (bool)
|
|
|
|
undocumented: remotenames.calculatedistance (bool)
|
|
|
|
undocumented: remotenames.disallowedbookmarks (list)
|
|
|
|
undocumented: remotenames.disallowedhint (str)
|
|
|
|
undocumented: remotenames.disallowedto (str)
|
|
|
|
undocumented: remotenames.fastheaddiscovery (bool)
|
|
|
|
undocumented: remotenames.forcecompat (bool)
|
|
|
|
undocumented: remotenames.forceto (bool)
|
|
|
|
undocumented: remotenames.pushanonheads (bool)
|
|
|
|
undocumented: remotenames.pushrev (str)
|
|
|
|
undocumented: remotenames.resolvenodes (bool)
|
|
|
|
undocumented: remotenames.selectivepull (bool)
|
|
|
|
undocumented: remotenames.selectivepulldefault (list)
|
|
|
|
undocumented: remotenames.suppressbranches (bool)
|
|
|
|
undocumented: remotenames.syncbookmarks (bool)
|
|
|
|
undocumented: remotenames.tracking (bool)
|
|
|
|
undocumented: remotenames.transitionmessage (str)
|
|
|
|
undocumented: remotenames.upstream (list)
|
2018-04-25 23:41:45 +03:00
|
|
|
undocumented: server.requireexplicitfullclone (bool)
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: simplecache.cachedir (str)
|
codemod: join the auto-formatter party
Summary:
Turned on the auto formatter. Ran `arc lint --apply-patches --take BLACK **/*.py`.
Then run `arc lint` again so some other autofixers like spellchecker etc. looked
at the code base. Manually accept the changes whenever they make sense, or use
a workaround (ex. changing "dict()" to "dict constructor") where autofix is false
positive. Disabled linters on files that are hard (i18n/polib.py) to fix, or less
interesting to fix (hgsubversion tests), or cannot be fixed without breaking
OSS build (FBPYTHON4).
Conflicted linters (test-check-module-imports.t, part of test-check-code.t,
test-check-pyflakes.t) are removed or disabled.
Duplicated linters (test-check-pyflakes.t, test-check-pylint.t) are removed.
An issue of the auto-formatter is lines are no longer guarnateed to be <= 80
chars. But that seems less important comparing with the benefit auto-formatter
provides.
As we're here, also remove test-check-py3-compat.t, as it is currently broken
if `PYTHON3=/bin/python3` is set.
Reviewed By: wez, phillco, simpkins, pkaush, singhsrb
Differential Revision: D8173629
fbshipit-source-id: 90e248ae0c5e6eaadbe25520a6ee42d32005621b
2018-05-26 07:34:37 +03:00
|
|
|
undocumented: simplecache.caches (list) [["local"]]
|
|
|
|
undocumented: smartlog.ignorebookmarks (str) ["!"]
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: ssl.timeout (int) [5]
|
|
|
|
undocumented: treemanifest.verifyautocreate (bool)
|
2018-10-16 19:23:18 +03:00
|
|
|
undocumented: ui.allowbranches (bool) [True]
|
2018-01-03 20:46:16 +03:00
|
|
|
undocumented: ui.editor.chunkselector (str)
|