tests/test-revert-unknown.t
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 27 Dec 2019 14:08:02 -0800
changeset 44040 f652b7ddc1d4
parent 12156 4c94b6d0fb1c
child 44724 5c2a4f37eace
permissions -rw-r--r--
overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies `_wrappedctx` lives on overlwayworkingctx, not on the repo object, so we should access it as `._wrappedctx`, not `._repo._wrappedctx`. More importantly, the overlayworkingctx is relative to its base, not including it, so the copies returned should not include copies made in the base. Differential Revision: https://phab.mercurial-scm.org/D7801

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