tests/test-revert-unknown.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 18 Nov 2022 13:47:29 +0000
branchstable
changeset 49621 55c6ebd11cb9
parent 44724 5c2a4f37eace
permissions -rw-r--r--
tests: run many tests in $TESTTMP/repo instead of $TESTTMP This is useful so we can store other files in $TESTTMP (in particular tests that use docket files (nodemap, dirstate-v2) keep file uids in $TESTTMP/UID)

  $ hg init repo
  $ cd repo
  $ touch unknown

  $ touch a
  $ hg add a
  $ hg ci -m "1"

  $ touch b
  $ hg add b
  $ hg ci -m "2"

Should show unknown

  $ hg status
  ? unknown
  $ hg revert -r 0 --all
  removing b

Should show unknown and b removed

  $ hg status
  R b
  ? unknown

Should show a and unknown

  $ ls -A
  .hg
  a
  unknown