tests/test-rebuildstate.t
author Mads Kiilerich <mads@kiilerich.com>
Mon, 07 Nov 2011 03:14:54 +0100
changeset 15440 9ab2b3b730ee
parent 12121 8f258dd4ed02
child 16913 f2719b387380
permissions -rw-r--r--
windows: use umask 022 in debugstate output debugstate would always report files as mode 666 or 777 on Windows. umask is not used on Windows, but faking and using a defalt value of 022 matches what the test suite uses on Unix.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     1
basic test for hg debugrebuildstate
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     2
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     3
  $ hg init repo
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     4
  $ cd repo
5065
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     5
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     6
  $ touch foo bar
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     7
  $ hg ci -Am 'add foo bar'
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     8
  adding bar
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
     9
  adding foo
5065
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    10
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    11
  $ touch baz
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    12
  $ hg add baz
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    13
  $ hg rm bar
5065
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    14
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    15
  $ hg debugrebuildstate
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    16
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    17
state dump after
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    18
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    19
  $ hg debugstate --nodates | sort
15440
9ab2b3b730ee windows: use umask 022 in debugstate output
Mads Kiilerich <mads@kiilerich.com>
parents: 12121
diff changeset
    20
  n 644         -1 bar
9ab2b3b730ee windows: use umask 022 in debugstate output
Mads Kiilerich <mads@kiilerich.com>
parents: 12121
diff changeset
    21
  n 644         -1 foo
5065
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    22
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    23
status
5065
b304c2496f52 dirstate: fix rebuild; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    24
12121
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    25
  $ hg st -A
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    26
  ! bar
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    27
  ? baz
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    28
  C foo
8f258dd4ed02 tests: unify test-rebuildstate
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 6344
diff changeset
    29