Patchwork [4,of,4] test-status-rev: add tests for plain dirstate and inter-revision status

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 5, 2014, 9:16 p.m.
Message ID <78c396e361fac4b8baee.1415222205@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6588/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Nov. 5, 2014, 9:16 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1415166326 28800
#      Tue Nov 04 21:45:26 2014 -0800
# Node ID 78c396e361fac4b8baeeef56241bec51606785d6
# Parent  aa03bcda7f9d9a8ef1efb8599edbdb035fd91dcb
test-status-rev: add tests for plain dirstate and inter-revision status

We have tests for the status across from '.^' to the working copy. It
makes sense to have the similar tests for the inter-revision status
between '.^' and '.' and for the dirstate status in the same
place.
Pierre-Yves David - Nov. 6, 2014, 11:17 a.m.
On 11/05/2014 09:16 PM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1415166326 28800
> #      Tue Nov 04 21:45:26 2014 -0800
> # Node ID 78c396e361fac4b8baeeef56241bec51606785d6
> # Parent  aa03bcda7f9d9a8ef1efb8599edbdb035fd91dcb
> test-status-rev: add tests for plain dirstate and inter-revision status

Those are pushed for stable, thanks.
Pierre-Yves David - Nov. 6, 2014, 11:22 a.m.
On 11/06/2014 11:17 AM, Pierre-Yves David wrote:
>
>
> On 11/05/2014 09:16 PM, Martin von Zweigbergk wrote:
>> # HG changeset patch
>> # User Martin von Zweigbergk <martinvonz@google.com>
>> # Date 1415166326 28800
>> #      Tue Nov 04 21:45:26 2014 -0800
>> # Node ID 78c396e361fac4b8baeeef56241bec51606785d6
>> # Parent  aa03bcda7f9d9a8ef1efb8599edbdb035fd91dcb
>> test-status-rev: add tests for plain dirstate and inter-revision status
>
> Those are pushed for stable, thanks.

Please read: "Those are pushed to the clowncopter, thanks".

Patch

diff --git a/tests/test-status-rev.t b/tests/test-status-rev.t
--- a/tests/test-status-rev.t
+++ b/tests/test-status-rev.t
@@ -64,7 +64,62 @@ 
   $ hg forget *_*_*-untracked
   $ rm *_*_missing-*
 
-Status compared to one revision back
+Status compared to parent of the working copy, i.e. the dirstate status
+
+  $ hg status -A --rev 1 'glob:missing_content2_content3-tracked'
+  M missing_content2_content3-tracked
+  $ hg status -A --rev 1 'glob:missing_content2_content2-tracked'
+  C missing_content2_content2-tracked
+  $ hg status -A --rev 1 'glob:missing_missing_content3-tracked'
+  A missing_missing_content3-tracked
+  $ hg status -A --rev 1 'glob:missing_missing_content3-untracked'
+  ? missing_missing_content3-untracked
+  $ hg status -A --rev 1 'glob:missing_content2_*-untracked'
+  R missing_content2_content2-untracked
+  R missing_content2_content3-untracked
+  R missing_content2_missing-untracked
+  $ hg status -A --rev 1 'glob:missing_*_missing-tracked'
+  ! missing_content2_missing-tracked
+  ! missing_missing_missing-tracked
+  $ hg status -A --rev 1 'glob:missing_missing_missing-untracked'
+  missing_missing_missing-untracked: No such file or directory
+
+Status between first and second commit. Should ignore dirstate status.
+
+  $ hg status -A --rev 0:1 'glob:content1_content2_*'
+  M content1_content2_content1-tracked
+  M content1_content2_content1-untracked
+  M content1_content2_content2-tracked
+  M content1_content2_content2-untracked
+  M content1_content2_content3-tracked
+  M content1_content2_content3-untracked
+  M content1_content2_missing-tracked
+  M content1_content2_missing-untracked
+  $ hg status -A --rev 0:1 'glob:content1_content1_*'
+  C content1_content1_content1-tracked
+  C content1_content1_content1-untracked
+  C content1_content1_content3-tracked
+  C content1_content1_content3-untracked
+  C content1_content1_missing-tracked
+  C content1_content1_missing-untracked
+  $ hg status -A --rev 0:1 'glob:missing_content2_*'
+  A missing_content2_content2-tracked
+  A missing_content2_content2-untracked
+  A missing_content2_content3-tracked
+  A missing_content2_content3-untracked
+  A missing_content2_missing-tracked
+  A missing_content2_missing-untracked
+  $ hg status -A --rev 0:1 'glob:content1_missing_*'
+  R content1_missing_content1-tracked
+  R content1_missing_content1-untracked
+  R content1_missing_content3-tracked
+  R content1_missing_content3-untracked
+  R content1_missing_missing-tracked
+  R content1_missing_missing-untracked
+  $ hg status -A --rev 0:1 'glob:missing_missing_*'
+
+Status compared to one revision back, checking that the dirstate status
+is correctly combined with the inter-revision status
 
   $ hg status -A --rev 0 'glob:content1_*_content[23]-tracked'
   M content1_content1_content3-tracked