Patchwork [1,of,4,stable?] tests: clean-up of largefiles tests in test-issue3084.t

login
register
mail settings
Submitter Mads Kiilerich
Date Dec. 1, 2014, 1:32 a.m.
Message ID <87043596cf6bb6610e95.1417397578@localhost.localdomain>
Download mbox | patch
Permalink /patch/6922/
State Accepted
Commit 442bb30171db40c9a9a97b39620defe505714132
Headers show

Comments

Mads Kiilerich - Dec. 1, 2014, 1:32 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1417396257 -3600
#      Mon Dec 01 02:10:57 2014 +0100
# Branch stable
# Node ID 87043596cf6bb6610e957669fa0112852e84dfa8
# Parent  edf29f9c15f0f171847f4c7a8184cca4e95c8b31
tests: clean-up of largefiles tests in test-issue3084.t

Prepare for adding more test cases to the systematic testing, moving the test
from ac3b3a2d976d to another section.

Patch

diff --git a/tests/test-issue3084.t b/tests/test-issue3084.t
--- a/tests/test-issue3084.t
+++ b/tests/test-issue3084.t
@@ -9,7 +9,19 @@  Create the repository outside $HOME sinc
   $ cd test
   $ echo "root" > root
   $ hg add root
-  $ hg commit -m "Root commit"
+  $ hg commit -m "Root commit" --config extensions.largefiles=!
+
+Ensure that .hg/largefiles isn't created before largefiles are added
+#if unix-permissions
+  $ chmod 555 .hg
+#endif
+  $ hg status
+#if unix-permissions
+  $ chmod 755 .hg
+#endif
+
+  $ test -f .hg/largefiles
+  [1]
 
   $ echo "large" > foo
   $ hg add --large foo
@@ -145,70 +157,78 @@  Updating from normal to largefile - no r
 
 Systematic testing of merges involving largefiles:
 
-Ancestor: normal  Parent: normal=  Parent: large   result: large
-Ancestor: normal  Parent: normal2  Parent: large   result: ?
-Ancestor: large   Parent: large=   Parent: normal  result: normal
-Ancestor: large   Parent: large2   Parent: normal  result: ?
+Ancestor: normal  Parent: normal-id  Parent: large   result: large
+Ancestor: normal  Parent: normal2    Parent: large   result: ?
+Ancestor: large   Parent: large-id   Parent: normal  result: normal
+Ancestor: large   Parent: large2     Parent: normal  result: ?
 
 All cases should try merging both ways.
-"=" means same file content.
 
 Prepare test repo:
 
   $ hg init merges
   $ cd merges
-  $ touch f1
-  $ hg ci -Aqm "0-root" --config extensions.largefiles=!
 
-Ensure that .hg/largefiles isn't created before largefiles are added
-#if unix-permissions
-  $ chmod 555 .hg
-#endif
-  $ hg status
-#if unix-permissions
-  $ chmod 755 .hg
-#endif
+prepare cases with "normal" ancestor:
 
-  $ test -f .hg/largefiles
-  [1]
-
-ancestor is "normal":
+  $ hg up -qr null
   $ echo normal > f
-  $ hg ci -Aqm "1-normal-ancestor"
+  $ hg ci -Aqm "normal-ancestor"
+  $ hg tag -l "normal-ancestor"
   $ touch f2
-  $ hg ci -Aqm "2-normal-unchanged"
-  $ hg tag -l "normal="
+  $ hg ci -Aqm "normal-id"
+  $ hg tag -l "normal-id"
   $ echo normal2 > f
-  $ hg ci -m "3-normal2"
+  $ hg ci -m "normal2"
   $ hg tag -l "normal2"
-  $ hg up -qr 1
+  $ hg up -qr "normal-ancestor"
   $ hg rm f
   $ echo large > f
   $ hg add --large f
-  $ hg ci -qm "4-normal-to-large"
+  $ hg ci -qm "large"
   $ hg tag -l "large"
 
+prepare cases with "large" ancestor:
+
   $ hg up -qr null
-
-ancestor is "large":
   $ echo large > f
   $ hg add --large f
-  $ hg ci -qm "5-large-ancestor"
+  $ hg ci -qm "large-ancestor"
+  $ hg tag -l "large-ancestor"
   $ touch f2
-  $ hg ci -Aqm "6-large-unchanged"
-  $ hg tag -l "large="
+  $ hg ci -Aqm "large-id"
+  $ hg tag -l "large-id"
   $ echo large2 > f
-  $ hg ci -m "7-large2"
+  $ hg ci -m "large2"
   $ hg tag -l "large2"
-  $ hg up -qr 5
+  $ hg up -qr "large-ancestor"
   $ hg rm f
   $ echo normal > f
-  $ hg ci -qAm "8-large-to-normal"
+  $ hg ci -qAm "normal"
   $ hg tag -l "normal"
 
-Ancestor: normal  Parent: normal=  Parent: large   result: large
+  $ hg log -GT '{tags}'
+  @  normal tip
+  |
+  | o  large2
+  | |
+  | o  large-id
+  |/
+  o  large-ancestor
+  
+  o  large
+  |
+  | o  normal2
+  | |
+  | o  normal-id
+  |/
+  o  normal-ancestor
+  
 
-  $ hg up -Cqr normal=
+
+Ancestor: normal  Parent: normal-id  Parent: large   result: large
+
+  $ hg up -Cqr normal-id
   $ hg merge -r large
   getting changed largefiles
   1 largefiles updated, 0 removed
@@ -220,7 +240,7 @@  Ancestor: normal  Parent: normal=  Paren
 swap
 
   $ hg up -Cqr large
-  $ hg merge -r normal=
+  $ hg merge -r normal-id
   getting changed largefiles
   0 largefiles updated, 0 removed
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -307,9 +327,9 @@  swap
   $ cat f
   large
 
-Ancestor: large   Parent: large=   Parent: normal  result: normal
+Ancestor: large   Parent: large-id   Parent: normal  result: normal
 
-  $ hg up -Cqr large=
+  $ hg up -Cqr large-id
   $ hg merge -r normal
   getting changed largefiles
   0 largefiles updated, 0 removed
@@ -321,7 +341,7 @@  Ancestor: large   Parent: large=   Paren
 swap
 
   $ hg up -Cqr normal
-  $ hg merge -r large=
+  $ hg merge -r large-id
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ cat f