tests/test-remotefilelog-bad-configs.t
author Manuel Jacob <me@manueljacob.de>
Thu, 15 Sep 2022 01:48:38 +0200
changeset 49494 c96ed4029fda
parent 40722 0800d9e6e216
permissions -rw-r--r--
templates: add filter to reverse list The filter supports only lists because for lists, it’s straightforward to implement. Reversing text doesn’t seem very useful and is hard to implement. Reversing the bytes would break multi-bytes encodings. Reversing the code points would break characters consisting of multiple code points. Reversing graphemes is non-trivial without using a library not included in the standard library.

#require no-windows

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

  $ hg init 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]