tests/test-revert-unknown.t
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Tue, 27 Jul 2010 23:07:30 +0900
changeset 12709 4147a292c508
parent 12156 4c94b6d0fb1c
child 44724 5c2a4f37eace
permissions -rw-r--r--
filectx: use ctx.size comparisons to speed up ctx.cmp Comparing sizes is cheaper than comparing file contents, as it does not involve reading the file on disk or from the filelog. It is however not always possible: some extensions, or encode filters, change data when extracting it to the working directory.

  $ 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