tests/test-status-rev.t
author Martin von Zweigbergk <martinvonz@google.com>
Tue, 04 Nov 2014 21:22:46 -0800
changeset 23229 2a462c0792fe
parent 23228 5f5876a2d2b2
child 23230 7f4f4217c924
permissions -rw-r--r--
test-status-rev: remove unnecessary initial commit The initial commit was there when we had a group of tests that compared against an empty base, but since those tests no longer exist, we can drop the empty commit.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     1
Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     2
combined correctly with the dirstate status.
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     3
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     4
  $ hg init
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     5
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
     6
First commit
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
     7
23197
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
     8
  $ python $TESTDIR/generate-working-copy-states.py base
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
     9
  $ hg addremove --similarity 0
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    10
  adding content1_content1_content1-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    11
  adding content1_content1_content1-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    12
  adding content1_content1_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    13
  adding content1_content1_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    14
  adding content1_content1_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    15
  adding content1_content1_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    16
  adding content1_content2_content1-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    17
  adding content1_content2_content1-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    18
  adding content1_content2_content2-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    19
  adding content1_content2_content2-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    20
  adding content1_content2_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    21
  adding content1_content2_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    22
  adding content1_content2_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    23
  adding content1_content2_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    24
  adding content1_missing_content1-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    25
  adding content1_missing_content1-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    26
  adding content1_missing_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    27
  adding content1_missing_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    28
  adding content1_missing_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    29
  adding content1_missing_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    30
  $ hg commit -m first
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    31
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    32
Second commit
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    33
23197
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    34
  $ python $TESTDIR/generate-working-copy-states.py parent
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    35
  $ hg addremove --similarity 0
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    36
  removing content1_missing_content1-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    37
  removing content1_missing_content1-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    38
  removing content1_missing_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    39
  removing content1_missing_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    40
  removing content1_missing_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    41
  removing content1_missing_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    42
  adding missing_content2_content2-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    43
  adding missing_content2_content2-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    44
  adding missing_content2_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    45
  adding missing_content2_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    46
  adding missing_content2_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    47
  adding missing_content2_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    48
  $ hg commit -m second
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    49
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    50
Working copy
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    51
23197
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    52
  $ python $TESTDIR/generate-working-copy-states.py wc
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    53
  $ hg addremove --similarity 0
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    54
  adding content1_missing_content1-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    55
  adding content1_missing_content1-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    56
  adding content1_missing_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    57
  adding content1_missing_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    58
  adding content1_missing_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    59
  adding content1_missing_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    60
  adding missing_missing_content3-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    61
  adding missing_missing_content3-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    62
  adding missing_missing_missing-tracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    63
  adding missing_missing_missing-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    64
  $ hg forget *_*_*-untracked
636158ff7329 test-status-rev: use common script for generating file history
Martin von Zweigbergk <martinvonz@google.com>
parents: 23196
diff changeset
    65
  $ rm *_*_missing-*
23037
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    66
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    67
Status compared to one revision back
eeaed3d2b004 status: add more complete tests for --rev
Martin von Zweigbergk <martinvonz@gmail.com>
parents:
diff changeset
    68
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    69
  $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked'
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    70
  M content1_content1_content3-tracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    71
  M content1_content2_content2-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    72
  M content1_content2_content3-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    73
  M content1_missing_content3-tracked
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    74
  $ hg status -A --rev 0 'glob:content1_*_content1-tracked'
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    75
  C content1_content1_content1-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    76
  C content1_content2_content1-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    77
  C content1_missing_content1-tracked
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    78
  $ hg status -A --rev 0 'glob:missing_*_content?-tracked'
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    79
  A missing_content2_content2-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    80
  A missing_content2_content3-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    81
  A missing_missing_content3-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    82
BROKEN: missing_content2_content[23]-untracked exist, so should be listed
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    83
  $ hg status -A --rev 0 'glob:missing_*_content?-untracked'
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    84
  ? missing_missing_content3-untracked
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    85
  $ hg status -A --rev 0 'glob:content1_*_*-untracked'
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    86
  R content1_content1_content1-untracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    87
  R content1_content1_content3-untracked
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    88
  R content1_content1_missing-untracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    89
  R content1_content2_content1-untracked
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    90
  R content1_content2_content2-untracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    91
  R content1_content2_content3-untracked
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    92
  R content1_content2_missing-untracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    93
  R content1_missing_content1-untracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    94
  R content1_missing_content3-untracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    95
  R content1_missing_missing-untracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    96
BROKEN: content1_*_missing-tracked appear twice; should just be '!'
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
    97
  $ hg status -A --rev 0 'glob:*_*_missing-tracked'
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
    98
  R content1_missing_missing-tracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
    99
  ! content1_content1_missing-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
   100
  ! content1_content2_missing-tracked
23196
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
   101
  ! content1_missing_missing-tracked
daa73289dd2a test-status-rev: use same names as from generate-working-copy-states
Martin von Zweigbergk <martinvonz@google.com>
parents: 23037
diff changeset
   102
  ! missing_content2_missing-tracked
23228
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
   103
  ! missing_missing_missing-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
   104
  C content1_content1_missing-tracked
5f5876a2d2b2 test-status-rev: use one glob for each expected status
Martin von Zweigbergk <martinvonz@google.com>
parents: 23227
diff changeset
   105
  C content1_content2_missing-tracked
23229
2a462c0792fe test-status-rev: remove unnecessary initial commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 23228
diff changeset
   106
  $ hg status -A --rev 0 'glob:missing_*_missing-untracked'