view tests/test-remotefilelog-bad-configs.t @ 40562:e5ad3ef90aa1

revlog: give formatting to clang-format This has two lines that are poorly formatted, both right after PyObject_HEAD macros. It's possible that in the future there will be a feature to tell clang-format that a token includes an end-of-line character (in this case the ;), but for now I'm willing to live with two poorly-formatted lines in a struct definition in exchange for not thinking about how this file is formatted. Differential Revision: https://phab.mercurial-scm.org/D5234
author Augie Fackler <augie@google.com>
date Tue, 06 Nov 2018 11:22:16 -0500
parents 3a333a582d7b
children 95a079ea1e19
line wrap: on
line source

  $ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
  $ export PYTHONPATH

  $ . "$TESTDIR/remotefilelog-library.sh"

  $ hginit master
  $ cd master
  $ cat >> .hg/hgrc <<EOF
  > [remotefilelog]
  > server=True
  > EOF
  $ echo x > x
  $ echo y > y
  $ echo z > z
  $ hg commit -qAm xy

  $ cd ..

  $ hgcloneshallow ssh://user@dummy/master shallow -q
  3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
  $ cd shallow

Verify error message when noc achepath specified
  $ hg up -q null
  $ cp $HGRCPATH $HGRCPATH.bak
  $ grep -v cachepath < $HGRCPATH.bak > tmp
  $ mv tmp $HGRCPATH
  $ hg up tip
  abort: could not find config option remotefilelog.cachepath
  [255]
  $ mv $HGRCPATH.bak $HGRCPATH

Verify error message when no fallback specified

  $ hg up -q null
  $ rm .hg/hgrc
  $ clearcache
  $ hg up tip
  3 files fetched over 1 fetches - (3 misses, 0.00% hit ratio) over *s (glob)
  abort: no remotefilelog server configured - is your .hg/hgrc trusted?
  [255]