tests/test-revert-unknown.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 05 Mar 2018 14:09:23 -0500
changeset 37109 a532b2f54f95
parent 12156 4c94b6d0fb1c
child 44724 5c2a4f37eace
permissions -rw-r--r--
merge: use constants for merge state record types merge.py is using multiple discrete sets of 1 and 2 letter constants to define types and behavior. To the uninitiated, the code is very difficult to reason about. I didn't even realize there were multiple sets of constants in play initially! We begin our sanity injection with merge state records. The record types (which are serialized to disk) are now defined in RECORD_* constants. Differential Revision: https://phab.mercurial-scm.org/D2698

  $ 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