tests/test-revert-unknown.t
author Paul Morelle <paul.morelle@octobus.net>
Fri, 20 Jul 2018 13:32:17 +0200
changeset 39149 f8db458651c8
parent 12156 4c94b6d0fb1c
child 44724 5c2a4f37eace
permissions -rw-r--r--
revlog: add a method to tells whether rev is stored as a snapshot For now we only have one type of snapshot: full snapshot versus nullrev. However we are looking into adding intermediate snapshot where a large diff against another snapshot is performed instead of storing a full new text. The conditional is a bit strange and is done in order to help readability of a some later changesets.

  $ 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