# HG changeset patch # User Mads Kiilerich # Date 1417396257 -3600 # Node ID 442bb30171db40c9a9a97b39620defe505714132 # Parent 53a65929ef1f74ee062eae6f2aa47d787ed012b8 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. diff -r 53a65929ef1f -r 442bb30171db tests/test-issue3084.t --- a/tests/test-issue3084.t Sat Nov 29 19:17:47 2014 -0800 +++ b/tests/test-issue3084.t Mon Dec 01 02:10:57 2014 +0100 @@ -9,7 +9,19 @@ $ 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 @@ 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" - $ hg up -qr null +prepare cases with "large" ancestor: -ancestor is "large": + $ hg up -qr null $ 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 @@ 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 @@ $ 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 @@ 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