mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
test-check: backport test-check-config from core hg
Summary: Hopefully this will prevent new undocumented config options. Issues about fastannotate are fixed. We still have many other issues, which are ignored by this diff for now. Test Plan: `arc unit` Reviewers: #sourcecontrol, stash Reviewed By: stash Subscribers: stash, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4037173 Signature: t1:4037173:1476876491:280e839a8e3d4f4dfbdf6b6953ab860bb7cd3ed4
This commit is contained in:
parent
b9d8fe4c72
commit
393ae99254
@ -131,7 +131,7 @@ def fastannotate(ui, repo, *pats, **opts):
|
||||
showpath = opts.get('file', False)
|
||||
|
||||
# find the head of the main (master) branch
|
||||
master = ui.config('fastannotate', 'mainbranch', rev)
|
||||
master = ui.config('fastannotate', 'mainbranch') or rev
|
||||
|
||||
for path in _matchpaths(repo, rev, pats, opts, aopts):
|
||||
result = lines = existinglines = None
|
||||
|
@ -19,7 +19,7 @@ def _annotate(orig, fctx, ui):
|
||||
diffopts = patch.difffeatureopts(ui, untrusted=True,
|
||||
section='annotate', whitespace=True)
|
||||
aopts = context.annotateopts(diffopts=diffopts)
|
||||
master = ui.config('fastannotate', 'mainbranch', 'default')
|
||||
master = ui.config('fastannotate', 'mainbranch') or 'default'
|
||||
with context.annotatecontext(fctx.repo(), fctx.path(), aopts) as ac:
|
||||
# fastannotate returns: [(nodeid, linenum, path)], [linecontent]
|
||||
annotated, contents = ac.annotate(fctx.rev(), master=master,
|
||||
|
126
tests/test-check-config-hg.t
Normal file
126
tests/test-check-config-hg.t
Normal file
@ -0,0 +1,126 @@
|
||||
#require test-repo
|
||||
|
||||
$ . $TESTDIR/require-core-hg.sh contrib/check-config.py
|
||||
|
||||
This file is backported from mercurial/tests/test-check-config.t.
|
||||
It differs slightly to fix paths and include files in core hg.
|
||||
|
||||
$ . "$RUNTESTDIR/helpers-testrepo.sh"
|
||||
$ cd "$TESTDIR"/..
|
||||
|
||||
New errors are not allowed. Warnings are strongly discouraged.
|
||||
|
||||
$ export RUNTESTDIR
|
||||
$ (
|
||||
> hg files "set:(**.py or **.txt) - tests/**"
|
||||
> hg files --cwd $RUNTESTDIR/.. "set:(**.py or **.txt) - tests/**" | sed "s#^#${RUNTESTDIR}/../#"
|
||||
> ) | sed 's|\\|/|g' |
|
||||
> $PYTHON $RUNTESTDIR/../contrib/check-config.py
|
||||
repo.ui.config("paths", "default")))
|
||||
|
||||
conflict on paths.default: ('str', '') != ('str', '<variable>')
|
||||
if ui.configbool("experimental", "histeditng"):
|
||||
|
||||
conflict on experimental.histeditng: ('bool', '') != ('str', '')
|
||||
undocumented: dirsync._tempdisable (bool)
|
||||
undocumented: extensions.fbamend (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.debugfastmanifest (bool)
|
||||
undocumented: fastmanifest.debugmetrics (bool)
|
||||
undocumented: fastmanifest.logfile (str)
|
||||
undocumented: fastmanifest.maxinmemoryentries (str) [DEFAULT_MAX_MEMORY_ENTRIES]
|
||||
undocumented: fastmanifest.silent (bool)
|
||||
undocumented: fastmanifest.usecache (bool) [True]
|
||||
undocumented: fastmanifest.usetree (bool)
|
||||
undocumented: fbamend.education (str)
|
||||
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)
|
||||
undocumented: format.sqldirstate (bool)
|
||||
undocumented: grep.command (str) ['grep']
|
||||
undocumented: infinitepush.branchpattern (str)
|
||||
undocumented: infinitepush.get_args (list)
|
||||
undocumented: infinitepush.get_binary (str)
|
||||
undocumented: infinitepush.indexpath (str)
|
||||
undocumented: infinitepush.indextype (str)
|
||||
undocumented: infinitepush.logfile (str)
|
||||
undocumented: infinitepush.loglevel (str) ['DEBUG']
|
||||
undocumented: infinitepush.put_args (list)
|
||||
undocumented: infinitepush.put_binary (str)
|
||||
undocumented: infinitepush.reponame (str)
|
||||
undocumented: infinitepush.server (bool)
|
||||
undocumented: infinitepush.sqlhost (str)
|
||||
undocumented: infinitepush.storetype (str)
|
||||
undocumented: inhibit.bypass-warning (bool)
|
||||
undocumented: inhibit.cutoff (str)
|
||||
undocumented: inhibitwarn.education (str)
|
||||
undocumented: morestatus.show (bool)
|
||||
undocumented: nointerrupt.interactiveonly (bool) [True]
|
||||
undocumented: perftweaks.cachenoderevs (bool) [True]
|
||||
undocumented: perftweaks.disablebranchcache (bool)
|
||||
undocumented: perftweaks.disablecasecheck (bool)
|
||||
undocumented: perftweaks.disabletags (bool)
|
||||
undocumented: perftweaks.preferdeltas (bool)
|
||||
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.data.gencountlimit (int) [2]
|
||||
undocumented: remotefilelog.debug (bool)
|
||||
undocumented: remotefilelog.excludepattern (list)
|
||||
undocumented: remotefilelog.fastdatapack (bool)
|
||||
undocumented: remotefilelog.fetchpacks (bool)
|
||||
undocumented: remotefilelog.fetchwarning (str)
|
||||
undocumented: remotefilelog.history.gencountlimit (int) [2]
|
||||
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.validatecache (str) ['on']
|
||||
undocumented: remotefilelog.validatecachelog (str)
|
||||
undocumented: simplecache.cachedir (str)
|
||||
undocumented: simplecache.caches (list) [['local']]
|
||||
undocumented: simplecache.evictionpercent (int) [50]
|
||||
undocumented: simplecache.host (str) ['localhost']
|
||||
undocumented: simplecache.maxcachesize (int) [2000]
|
||||
undocumented: simplecache.port (str) [11101]
|
||||
undocumented: simplecache.version (str) ['1']
|
||||
undocumented: smartlog.ignorebookmarks (str) ['!']
|
||||
undocumented: sqldirstate.cachebuildtreshold (str) [10000]
|
||||
undocumented: sqldirstate.downgrade (bool)
|
||||
undocumented: sqldirstate.fakedirstate (bool) [True]
|
||||
undocumented: sqldirstate.skipbackups (bool) [True]
|
||||
undocumented: sqldirstate.tracefile (str)
|
||||
undocumented: sqldirstate.upgrade (bool)
|
||||
undocumented: ssl.timeout (int) [5]
|
||||
undocumented: statprof.format (str) ['hotpath']
|
||||
undocumented: statprof.mechanism (str) ['thread']
|
||||
undocumented: treemanifest.autocreatetrees (bool)
|
||||
undocumented: treemanifest.verifyautocreate (bool) [True]
|
||||
undocumented: tweakdefaults.allowbranch (bool) [True]
|
||||
undocumented: tweakdefaults.allowfullrepohistgrep (bool)
|
||||
undocumented: tweakdefaults.allowmerge (bool) [True]
|
||||
undocumented: tweakdefaults.allowrollback (bool) [True]
|
||||
undocumented: tweakdefaults.allowtags (bool) [True]
|
||||
undocumented: tweakdefaults.amendkeepdate (bool)
|
||||
undocumented: tweakdefaults.bmnodestmsg (str) [<variable>]
|
||||
undocumented: tweakdefaults.branchesmessage (str)
|
||||
undocumented: tweakdefaults.defaultdest (str)
|
||||
undocumented: tweakdefaults.graftkeepdate (bool)
|
||||
undocumented: tweakdefaults.nodestmsg (str) [<variable>]
|
||||
undocumented: tweakdefaults.nooprebase (bool) [True]
|
||||
undocumented: tweakdefaults.rebasekeepdate (bool)
|
||||
undocumented: tweakdefaults.rollbackhint (str)
|
||||
undocumented: tweakdefaults.tagsmessage (str)
|
Loading…
Reference in New Issue
Block a user