tests/test-dirstate-nonnormalset.t
author Manuel Jacob <me@manueljacob.de>
Thu, 16 Jul 2020 23:49:04 +0200
changeset 45146 a0791bfd9cfa
parent 27591 127cc7f78475
child 45765 ed84a4d48910
permissions -rw-r--r--
util: enhance `nullcontextmanager` to be able to return __enter__ result This makes its functionality and signature equivalent to Python 3.7’s contextlib.nullcontext().

  $ cat >> $HGRCPATH << EOF
  > [ui]
  > logtemplate="{rev}:{node|short} ({phase}) [{tags} {bookmarks}] {desc|firstline}\n"
  > [extensions]
  > dirstateparanoidcheck = $TESTDIR/../contrib/dirstatenonnormalcheck.py
  > [experimental]
  > nonnormalparanoidcheck = True
  > [devel]
  > all-warnings=True
  > EOF
  $ mkcommit() {
  >    echo "$1" > "$1"
  >    hg add "$1"
  >    hg ci -m "add $1"
  > }

  $ hg init testrepo
  $ cd testrepo
  $ mkcommit a
  $ mkcommit b
  $ mkcommit c
  $ hg status