diff tests/test-status-rev.t @ 23196:daa73289dd2a

test-status-rev: use same names as from generate-working-copy-states To prepare for using generate-working-copy-states.py for generating the files and their content, let's start by renaming the files according to the naming scheme used by that script.
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 20 Oct 2014 23:56:55 -0700
parents eeaed3d2b004
children 636158ff7329
line wrap: on
line diff
--- a/tests/test-status-rev.t	Mon Nov 03 16:27:01 2014 -0800
+++ b/tests/test-status-rev.t	Mon Oct 20 23:56:55 2014 -0700
@@ -1,156 +1,136 @@
 Tests of 'hg status --rev <rev>' to make sure status between <rev> and '.' get
 combined correctly with the dirstate status.
 
-Sets up a history for a number of files where the filename describes the file's
-history. The first two letters of the filename describe the first two commits;
-the third letter describes the dirstate for the file. For example, a file called
-'amr' was added in the first commit, modified in the second and then removed in
-the dirstate.
-
-These codes are used for commits:
-x: does not exist
-a: added
-c: clean
-m: modified
-r: removed
-
-These codes are used for dirstate:
-d: in dirstate, but deleted from disk
-f: removed from dirstate, but file exists (forgotten)
-r: removed from dirstate and disk
-q: added, but deleted from disk (q for q-rious?)
-u: not in dirstate, but file exists (unknown)
-
   $ hg init
   $ touch .hgignore
   $ hg add .hgignore
   $ hg commit -m initial
 
-First letter: first commit
+First commit
 
-  $ echo a >acc
-  $ echo a >acd
-  $ echo a >acf
-  $ echo a >acm
-  $ echo a >acr
-  $ echo a >amc
-  $ echo a >amd
-  $ echo a >amf
-  $ echo a >amm
-  $ echo a >amr
-  $ echo a >ara
-  $ echo a >arq
-  $ echo a >aru
+  $ echo a >content1_content1_content1-tracked
+  $ echo a >content1_content1_missing-tracked
+  $ echo a >content1_content1_content1-untracked
+  $ echo a >content1_content1_content3-tracked
+  $ echo a >content1_content1_missing-untracked
+  $ echo a >content1_content2_content2-tracked
+  $ echo a >content1_content2_missing-tracked
+  $ echo a >content1_content2_content2-untracked
+  $ echo a >content1_content2_content3-tracked
+  $ echo a >content1_content2_missing-untracked
+  $ echo a >content1_missing_content3-tracked
+  $ echo a >content1_missing_missing-tracked
+  $ echo a >content1_missing_content3-untracked
   $ hg commit -Aqm first
 
-Second letter: second commit
+Second commit
 
-  $ echo b >xad
-  $ echo b >xaf
-  $ echo b >xam
-  $ echo b >xar
-  $ echo b >amc
-  $ echo b >amd
-  $ echo b >amf
-  $ echo b >amm
-  $ echo b >amr
-  $ hg rm ara
-  $ hg rm arq
-  $ hg rm aru
+  $ echo b >missing_content2_missing-tracked
+  $ echo b >missing_content2_content2-untracked
+  $ echo b >missing_content2_content3-tracked
+  $ echo b >missing_content2_missing-untracked
+  $ echo b >content1_content2_content2-tracked
+  $ echo b >content1_content2_content3-tracked
+  $ echo b >content1_content2_content2-untracked
+  $ echo b >content1_content2_content3-tracked
+  $ echo b >content1_content2_missing-untracked
+  $ hg rm content1_missing_content3-tracked
+  $ hg rm content1_missing_missing-tracked
+  $ hg rm content1_missing_content3-untracked
   $ hg commit -Aqm second
 
-Third letter: dirstate
+Working copy
 
-  $ echo c >acm
-  $ echo c >amm
-  $ echo c >xam
-  $ echo c >ara && hg add ara
-  $ echo c >arq && hg add arq && rm arq
-  $ echo c >aru
-  $ hg rm amr
-  $ hg rm acr
-  $ hg rm xar
-  $ rm acd
-  $ rm amd
-  $ rm xad
-  $ hg forget acf
-  $ hg forget amf
-  $ hg forget xaf
-  $ touch xxu
+  $ echo c >content1_content1_content3-tracked
+  $ echo c >content1_content2_content3-tracked
+  $ echo c >missing_content2_content3-tracked
+  $ echo c >content1_missing_content3-tracked && hg add content1_missing_content3-tracked
+  $ echo c >content1_missing_missing-tracked && hg add content1_missing_missing-tracked && rm content1_missing_missing-tracked
+  $ echo c >content1_missing_content3-untracked
+  $ hg rm content1_content2_missing-untracked
+  $ hg rm content1_content1_missing-untracked
+  $ hg rm missing_content2_missing-untracked
+  $ rm content1_content1_missing-tracked
+  $ rm content1_content2_missing-tracked
+  $ rm missing_content2_missing-tracked
+  $ hg forget content1_content1_content1-untracked
+  $ hg forget content1_content2_content2-untracked
+  $ hg forget missing_content2_content2-untracked
+  $ touch missing_missing_content3-untracked
 
 Status compared to one revision back
 
-  $ hg status -A --rev 1 acc
-  C acc
+  $ hg status -A --rev 1 content1_content1_content1-tracked
+  C content1_content1_content1-tracked
 BROKEN: file appears twice; should be '!'
-  $ hg status -A --rev 1 acd
-  ! acd
-  C acd
-  $ hg status -A --rev 1 acf
-  R acf
-  $ hg status -A --rev 1 acm
-  M acm
-  $ hg status -A --rev 1 acr
-  R acr
-  $ hg status -A --rev 1 amc
-  M amc
+  $ hg status -A --rev 1 content1_content1_missing-tracked
+  ! content1_content1_missing-tracked
+  C content1_content1_missing-tracked
+  $ hg status -A --rev 1 content1_content1_content1-untracked
+  R content1_content1_content1-untracked
+  $ hg status -A --rev 1 content1_content1_content3-tracked
+  M content1_content1_content3-tracked
+  $ hg status -A --rev 1 content1_content1_missing-untracked
+  R content1_content1_missing-untracked
+  $ hg status -A --rev 1 content1_content2_content2-tracked
+  M content1_content2_content2-tracked
 BROKEN: file appears twice; should be '!'
-  $ hg status -A --rev 1 amd
-  ! amd
-  C amd
-  $ hg status -A --rev 1 amf
-  R amf
-  $ hg status -A --rev 1 amm
-  M amm
-  $ hg status -A --rev 1 amr
-  R amr
-  $ hg status -A --rev 1 ara
-  M ara
+  $ hg status -A --rev 1 content1_content2_missing-tracked
+  ! content1_content2_missing-tracked
+  C content1_content2_missing-tracked
+  $ hg status -A --rev 1 content1_content2_content2-untracked
+  R content1_content2_content2-untracked
+  $ hg status -A --rev 1 content1_content2_content3-tracked
+  M content1_content2_content3-tracked
+  $ hg status -A --rev 1 content1_content2_missing-untracked
+  R content1_content2_missing-untracked
+  $ hg status -A --rev 1 content1_missing_content3-tracked
+  M content1_missing_content3-tracked
 BROKEN: file appears twice; should be '!'
-  $ hg status -A --rev 1 arq
-  R arq
-  ! arq
-  $ hg status -A --rev 1 aru
-  R aru
-  $ hg status -A --rev 1 xad
-  ! xad
-  $ hg status -A --rev 1 xaf
-  $ hg status -A --rev 1 xam
-  A xam
-  $ hg status -A --rev 1 xar
-  $ hg status -A --rev 1 xxu
-  ? xxu
+  $ hg status -A --rev 1 content1_missing_missing-tracked
+  R content1_missing_missing-tracked
+  ! content1_missing_missing-tracked
+  $ hg status -A --rev 1 content1_missing_content3-untracked
+  R content1_missing_content3-untracked
+  $ hg status -A --rev 1 missing_content2_missing-tracked
+  ! missing_content2_missing-tracked
+  $ hg status -A --rev 1 missing_content2_content2-untracked
+  $ hg status -A --rev 1 missing_content2_content3-tracked
+  A missing_content2_content3-tracked
+  $ hg status -A --rev 1 missing_content2_missing-untracked
+  $ hg status -A --rev 1 missing_missing_content3-untracked
+  ? missing_missing_content3-untracked
 
 Status compared to two revisions back
 
-  $ hg status -A --rev 0 acc
-  A acc
-  $ hg status -A --rev 0 acd
-  ! acd
+  $ hg status -A --rev 0 content1_content1_content1-tracked
+  A content1_content1_content1-tracked
+  $ hg status -A --rev 0 content1_content1_missing-tracked
+  ! content1_content1_missing-tracked
 BROKEN: file exists, so should be listed (as '?')
-  $ hg status -A --rev 0 acf
-  $ hg status -A --rev 0 acm
-  A acm
-  $ hg status -A --rev 0 acr
-  $ hg status -A --rev 0 amc
-  A amc
-  $ hg status -A --rev 0 amd
-  ! amd
+  $ hg status -A --rev 0 content1_content1_content1-untracked
+  $ hg status -A --rev 0 content1_content1_content3-tracked
+  A content1_content1_content3-tracked
+  $ hg status -A --rev 0 content1_content1_missing-untracked
+  $ hg status -A --rev 0 content1_content2_content2-tracked
+  A content1_content2_content2-tracked
+  $ hg status -A --rev 0 content1_content2_missing-tracked
+  ! content1_content2_missing-tracked
 BROKEN: file exists, so should be listed (as '?')
-  $ hg status -A --rev 0 amf
-  $ hg status -A --rev 0 amm
-  A amm
-  $ hg status -A --rev 0 amr
-  $ hg status -A --rev 0 ara
-  A ara
-  $ hg status -A --rev 0 arq
-  ! arq
-  $ hg status -A --rev 0 aru
-  ? aru
-  $ hg status -A --rev 0 xad
-  ! xad
+  $ hg status -A --rev 0 content1_content2_content2-untracked
+  $ hg status -A --rev 0 content1_content2_content3-tracked
+  A content1_content2_content3-tracked
+  $ hg status -A --rev 0 content1_content2_missing-untracked
+  $ hg status -A --rev 0 content1_missing_content3-tracked
+  A content1_missing_content3-tracked
+  $ hg status -A --rev 0 content1_missing_missing-tracked
+  ! content1_missing_missing-tracked
+  $ hg status -A --rev 0 content1_missing_content3-untracked
+  ? content1_missing_content3-untracked
+  $ hg status -A --rev 0 missing_content2_missing-tracked
+  ! missing_content2_missing-tracked
 BROKEN: file exists, so should be listed (as '?')
-  $ hg status -A --rev 0 xaf
-  $ hg status -A --rev 0 xam
-  A xam
-  $ hg status -A --rev 0 xar
+  $ hg status -A --rev 0 missing_content2_content2-untracked
+  $ hg status -A --rev 0 missing_content2_content3-tracked
+  A missing_content2_content3-tracked
+  $ hg status -A --rev 0 missing_content2_missing-untracked