diff options
author | Russell Belfer <rb@github.com> | 2013-02-22 04:44:44 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-02-22 04:44:44 +0400 |
commit | d4b747c1cb72119d783154f88640920d3a3fdb3d (patch) | |
tree | 81b72f14e2a36850226bc6343f92cefeeea4ed83 /tests-clar/resources | |
parent | 960a04dd56d89e94b5092be19ba9704b2d292dba (diff) |
Add diff rename tests with partial similarity
This adds some new tests that actually exercise the similarity
metric between files to detect renames, copies, and split modified
files that are too heavily modified.
There is still more testing to do - these tests are just partially
covering the cases.
There is also one bug fix in this where a change set with only
MODIFY being broken into ADD/DELETE (due to low self-similarity)
without any additional RENAMED entries would end up not processing
the split requests (because the num_rewrites counter got reset).
Diffstat (limited to 'tests-clar/resources')
20 files changed, 93 insertions, 80 deletions
diff --git a/tests-clar/resources/renames/.gitted/index b/tests-clar/resources/renames/.gitted/index Binary files differindex 1fc69fcbe..72363c0f5 100644 --- a/tests-clar/resources/renames/.gitted/index +++ b/tests-clar/resources/renames/.gitted/index diff --git a/tests-clar/resources/renames/.gitted/logs/HEAD b/tests-clar/resources/renames/.gitted/logs/HEAD index 34222ed7d..e69792263 100644 --- a/tests-clar/resources/renames/.gitted/logs/HEAD +++ b/tests-clar/resources/renames/.gitted/logs/HEAD @@ -1,2 +1,4 @@ 0000000000000000000000000000000000000000 31e47d8c1fa36d7f8d537b96158e3f024de0a9f2 Russell Belfer <rb@github.com> 1351024687 -0700 commit (initial): Initial commit 31e47d8c1fa36d7f8d537b96158e3f024de0a9f2 2bc7f351d20b53f1c72c16c4b036e491c478c49a Russell Belfer <rb@github.com> 1351024817 -0700 commit: copy and rename with no change +2bc7f351d20b53f1c72c16c4b036e491c478c49a 1c068dee5790ef1580cfc4cd670915b48d790084 Russell Belfer <rb@github.com> 1361485758 -0800 commit: rewrites, copies with changes, etc. +1c068dee5790ef1580cfc4cd670915b48d790084 19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 Russell Belfer <rb@github.com> 1361486360 -0800 commit: more renames and smallish modifications diff --git a/tests-clar/resources/renames/.gitted/logs/refs/heads/master b/tests-clar/resources/renames/.gitted/logs/refs/heads/master index 34222ed7d..e69792263 100644 --- a/tests-clar/resources/renames/.gitted/logs/refs/heads/master +++ b/tests-clar/resources/renames/.gitted/logs/refs/heads/master @@ -1,2 +1,4 @@ 0000000000000000000000000000000000000000 31e47d8c1fa36d7f8d537b96158e3f024de0a9f2 Russell Belfer <rb@github.com> 1351024687 -0700 commit (initial): Initial commit 31e47d8c1fa36d7f8d537b96158e3f024de0a9f2 2bc7f351d20b53f1c72c16c4b036e491c478c49a Russell Belfer <rb@github.com> 1351024817 -0700 commit: copy and rename with no change +2bc7f351d20b53f1c72c16c4b036e491c478c49a 1c068dee5790ef1580cfc4cd670915b48d790084 Russell Belfer <rb@github.com> 1361485758 -0800 commit: rewrites, copies with changes, etc. +1c068dee5790ef1580cfc4cd670915b48d790084 19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 Russell Belfer <rb@github.com> 1361486360 -0800 commit: more renames and smallish modifications diff --git a/tests-clar/resources/renames/.gitted/objects/19/dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 b/tests-clar/resources/renames/.gitted/objects/19/dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 new file mode 100644 index 000000000..4be4c6952 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/19/dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 @@ -0,0 +1 @@ +xM!Ei@3ސc,\XK{Nrbo,xzYC<h[&?=fcvyCW<Z#:J"vs%9PQ|ZKj#|u-pڐ;+[Z;L+l\k'J.WT;O diff --git a/tests-clar/resources/renames/.gitted/objects/1c/068dee5790ef1580cfc4cd670915b48d790084 b/tests-clar/resources/renames/.gitted/objects/1c/068dee5790ef1580cfc4cd670915b48d790084 Binary files differnew file mode 100644 index 000000000..d65ab0a9b --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/1c/068dee5790ef1580cfc4cd670915b48d790084 diff --git a/tests-clar/resources/renames/.gitted/objects/36/020db6cdacaa93497f31edcd8f242ff9bc366d b/tests-clar/resources/renames/.gitted/objects/36/020db6cdacaa93497f31edcd8f242ff9bc366d Binary files differnew file mode 100644 index 000000000..f4f9303ed --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/36/020db6cdacaa93497f31edcd8f242ff9bc366d diff --git a/tests-clar/resources/renames/.gitted/objects/3c/04741dd4b96c4ae4b00ec0f6e10c816a30aad2 b/tests-clar/resources/renames/.gitted/objects/3c/04741dd4b96c4ae4b00ec0f6e10c816a30aad2 Binary files differnew file mode 100644 index 000000000..c23602262 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/3c/04741dd4b96c4ae4b00ec0f6e10c816a30aad2 diff --git a/tests-clar/resources/renames/.gitted/objects/42/10ffd5c390b21dd5483375e75288dea9ede512 b/tests-clar/resources/renames/.gitted/objects/42/10ffd5c390b21dd5483375e75288dea9ede512 Binary files differnew file mode 100644 index 000000000..d351a6d13 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/42/10ffd5c390b21dd5483375e75288dea9ede512 diff --git a/tests-clar/resources/renames/.gitted/objects/4e/4cae3e7dd56ed74bff39526d0469e554432953 b/tests-clar/resources/renames/.gitted/objects/4e/4cae3e7dd56ed74bff39526d0469e554432953 Binary files differnew file mode 100644 index 000000000..5e6ebd5e0 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/4e/4cae3e7dd56ed74bff39526d0469e554432953 diff --git a/tests-clar/resources/renames/.gitted/objects/5e/26abc56a5a84d89790f45416648899cbe13109 b/tests-clar/resources/renames/.gitted/objects/5e/26abc56a5a84d89790f45416648899cbe13109 Binary files differnew file mode 100644 index 000000000..2acd3d583 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/5e/26abc56a5a84d89790f45416648899cbe13109 diff --git a/tests-clar/resources/renames/.gitted/objects/9a/69d960ae94b060f56c2a8702545e2bb1abb935 b/tests-clar/resources/renames/.gitted/objects/9a/69d960ae94b060f56c2a8702545e2bb1abb935 Binary files differnew file mode 100644 index 000000000..f75178c59 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/9a/69d960ae94b060f56c2a8702545e2bb1abb935 diff --git a/tests-clar/resources/renames/.gitted/objects/d7/9b202de198fa61b02424b9e25e840dc75e1323 b/tests-clar/resources/renames/.gitted/objects/d7/9b202de198fa61b02424b9e25e840dc75e1323 Binary files differnew file mode 100644 index 000000000..daa2b3997 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/d7/9b202de198fa61b02424b9e25e840dc75e1323 diff --git a/tests-clar/resources/renames/.gitted/objects/ea/f4a3e3bfe68585e90cada20736ace491cd100b b/tests-clar/resources/renames/.gitted/objects/ea/f4a3e3bfe68585e90cada20736ace491cd100b new file mode 100644 index 000000000..f72df8d82 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/ea/f4a3e3bfe68585e90cada20736ace491cd100b @@ -0,0 +1,5 @@ +x}R@<_QT.A[ +{t2Cez%L'!aj!x{'+;$)Ξ#yǘ#q#hc
QDXmR|aD*O+^ZI~i>3a!,R!-EaI>yo*4戁Rf m&eIA*!;dݬ +Ho +OUDyTVHpwqH7Ʒ.ts6{Z+X\)C5Q9 +%t*&&v;|'4Du[7he!NK*"C-=`#؎$Ee2T|@NBsslW|/0¬aȥJNv)-ڡiۤ3bbO:uWMNX7T
\ No newline at end of file diff --git a/tests-clar/resources/renames/.gitted/objects/f9/0d4fc20ecddf21eebe6a37e9225d244339d2b5 b/tests-clar/resources/renames/.gitted/objects/f9/0d4fc20ecddf21eebe6a37e9225d244339d2b5 Binary files differnew file mode 100644 index 000000000..f6d933be9 --- /dev/null +++ b/tests-clar/resources/renames/.gitted/objects/f9/0d4fc20ecddf21eebe6a37e9225d244339d2b5 diff --git a/tests-clar/resources/renames/.gitted/refs/heads/master b/tests-clar/resources/renames/.gitted/refs/heads/master index 049b1f5ad..642c3198d 100644 --- a/tests-clar/resources/renames/.gitted/refs/heads/master +++ b/tests-clar/resources/renames/.gitted/refs/heads/master @@ -1 +1 @@ -2bc7f351d20b53f1c72c16c4b036e491c478c49a +19dd32dfb1520a64e5bbaae8dce6ef423dfa2f13 diff --git a/tests-clar/resources/renames/ikeepsix.txt b/tests-clar/resources/renames/ikeepsix.txt new file mode 100644 index 000000000..eaf4a3e3b --- /dev/null +++ b/tests-clar/resources/renames/ikeepsix.txt @@ -0,0 +1,27 @@ +I Keep Six Honest Serving-Men +============================= + +She sends'em abroad on her own affairs, + From the second she opens her eyes— +One million Hows, two million Wheres, +And seven million Whys! + +I let them rest from nine till five, + For I am busy then, +As well as breakfast, lunch, and tea, + For they are hungry men. +But different folk have different views; +I know a person small— +She keeps ten million serving-men, +Who get no rest at all! + + -- Rudyard Kipling + +I KEEP six honest serving-men + (They taught me all I knew); +Their names are What and Why and When + And How and Where and Who. +I send them over land and sea, + I send them east and west; +But after they have worked for me, + I give them all a rest. diff --git a/tests-clar/resources/renames/sixserving.txt b/tests-clar/resources/renames/sixserving.txt index ad0a8e55a..f90d4fc20 100644 --- a/tests-clar/resources/renames/sixserving.txt +++ b/tests-clar/resources/renames/sixserving.txt @@ -1,24 +1,25 @@ -I KEEP six honest serving-men - (They taught me all I knew); -Their names are What and Why and When - And How and Where and Who. -I send them over land and sea, - I send them east and west; -But after they have worked for me, - I give them all a rest. +I KEEP six honest serving-men + (They taught me all I knew); +Their names are What and Why and When + And How and Where and Who. +I send them over land and sea, + I send them east and west; +But after they have worked for me, + I give them all a rest. -I let them rest from nine till five, - For I am busy then, -As well as breakfast, lunch, and tea, - For they are hungry men. -But different folk have different views; -I know a person small— -She keeps ten million serving-men, -Who get no rest at all! +I let them rest from nine till five, + For I am busy then, +As well as breakfast, lunch, and tea, + For they are hungry men. +But different folk have different views; +I know a person small— +She keeps ten million serving-men, +Who get no rest at all! -She sends'em abroad on her own affairs, - From the second she opens her eyes— -One million Hows, two million Wheres, -And seven million Whys! +She sends'em abroad on her own affairs, + From the second she opens her eyes— +One million Hows, two million Wheres, +And seven million Whys! + + -- Rudyard Kipling - -- Rudyard Kipling diff --git a/tests-clar/resources/renames/sevencities.txt b/tests-clar/resources/renames/songof7cities.txt index 66311f5cf..4210ffd5c 100644 --- a/tests-clar/resources/renames/sevencities.txt +++ b/tests-clar/resources/renames/songof7cities.txt @@ -1,12 +1,12 @@ The Song of Seven Cities -======================== +------------------------ I WAS Lord of Cities very sumptuously builded. Seven roaring Cities paid me tribute from afar. -Ivory their outposts were—the guardrooms of them gilded, +Ivory their outposts were--the guardrooms of them gilded, And garrisoned with Amazons invincible in war. -All the world went softly when it walked before my Cities— +All the world went softly when it walked before my Cities-- Neither King nor Army vexed my peoples at their toil, Never horse nor chariot irked or overbore my Cities, Never Mob nor Ruler questioned whence they drew their spoil. @@ -23,20 +23,20 @@ They are evened with Atlantis and the towns before the Flood. Rain on rain-gorged channels raised the water-levels round them, Freshet backed on freshet swelled and swept their world from sight, -Till the emboldened floods linked arms and, flashing forward, drowned them— +Till the emboldened floods linked arms and, flashing forward, drowned them-- Drowned my Seven Cities and their peoples in one night! Low among the alders lie their derelict foundations, -The beams wherein they trusted and the plinths whereon they built— +The beams wherein they trusted and the plinths whereon they built-- My rulers and their treasure and their unborn populations, Dead, destroyed, aborted, and defiled with mud and silt! The Daughters of the Palace whom they cherished in my Cities, -My silver-tongued Princesses, and the promise of their May— -Their bridegrooms of the June-tide—all have perished in my Cities, +My silver-tongued Princesses, and the promise of their May-- +Their bridegrooms of the June-tide--all have perished in my Cities, With the harsh envenomed virgins that can neither love nor play. -I was Lord of Cities—I will build anew my Cities, +I was Lord of Cities--I will build anew my Cities, Seven, set on rocks, above the wrath of any flood. Nor will I rest from search till I have filled anew my Cities With peoples undefeated of the dark, enduring blood. @@ -46,4 +46,4 @@ Wealthy and well-weaponed, that once more may I behold All the world go softly when it walks before my Cities, And the horses and the chariots fleeing from them as of old! - -- Rudyard Kipling + -- Rudyard Kipling diff --git a/tests-clar/resources/renames/songofseven.txt b/tests-clar/resources/renames/songofseven.txt deleted file mode 100644 index 66311f5cf..000000000 --- a/tests-clar/resources/renames/songofseven.txt +++ /dev/null @@ -1,49 +0,0 @@ -The Song of Seven Cities -======================== - -I WAS Lord of Cities very sumptuously builded. -Seven roaring Cities paid me tribute from afar. -Ivory their outposts were—the guardrooms of them gilded, -And garrisoned with Amazons invincible in war. - -All the world went softly when it walked before my Cities— -Neither King nor Army vexed my peoples at their toil, -Never horse nor chariot irked or overbore my Cities, -Never Mob nor Ruler questioned whence they drew their spoil. - -Banded, mailed and arrogant from sunrise unto sunset; -Singing while they sacked it, they possessed the land at large. -Yet when men would rob them, they resisted, they made onset -And pierced the smoke of battle with a thousand-sabred charge. - -So they warred and trafficked only yesterday, my Cities. -To-day there is no mark or mound of where my Cities stood. -For the River rose at midnight and it washed away my Cities. -They are evened with Atlantis and the towns before the Flood. - -Rain on rain-gorged channels raised the water-levels round them, -Freshet backed on freshet swelled and swept their world from sight, -Till the emboldened floods linked arms and, flashing forward, drowned them— -Drowned my Seven Cities and their peoples in one night! - -Low among the alders lie their derelict foundations, -The beams wherein they trusted and the plinths whereon they built— -My rulers and their treasure and their unborn populations, -Dead, destroyed, aborted, and defiled with mud and silt! - -The Daughters of the Palace whom they cherished in my Cities, -My silver-tongued Princesses, and the promise of their May— -Their bridegrooms of the June-tide—all have perished in my Cities, -With the harsh envenomed virgins that can neither love nor play. - -I was Lord of Cities—I will build anew my Cities, -Seven, set on rocks, above the wrath of any flood. -Nor will I rest from search till I have filled anew my Cities -With peoples undefeated of the dark, enduring blood. - -To the sound of trumpets shall their seed restore my Cities -Wealthy and well-weaponed, that once more may I behold -All the world go softly when it walks before my Cities, -And the horses and the chariots fleeing from them as of old! - - -- Rudyard Kipling diff --git a/tests-clar/resources/renames/untimely.txt b/tests-clar/resources/renames/untimely.txt new file mode 100644 index 000000000..9a69d960a --- /dev/null +++ b/tests-clar/resources/renames/untimely.txt @@ -0,0 +1,24 @@ +Untimely
+========
+
+Nothing in life has been made by man for man's using
+But it was shown long since to man in ages
+Lost as the name of the maker of it,
+Who received oppression and shame for his wages--
+Hate, avoidance, and scorn in his daily dealings--
+Until he perished, wholly confounded
+
+More to be pitied than he are the wise
+Souls which foresaw the evil of loosing
+Knowledge or Art before time, and aborted
+Noble devices and deep-wrought healings,
+Lest offense should arise.
+
+Heaven delivers on earth the Hour that cannot be
+ thwarted,
+Neither advanced, at the price of a world nor a soul,
+ and its Prophet
+Comes through the blood of the vanguards who
+ dreamed--too soon--it had sounded.
+
+ -- Rudyard Kipling
|