Mercurial > public > mercurial-scm > hg
diff tests/test-revset.t @ 20862:97b2f26dfc43
revpair: smartset compatibility
Since recent revset changes, revrange now return a smartset. This smart set
probably does not support indexing (_addset does not). This led to crash.
Instead when the smartset is ordered we use the `min` and `max` method of
smart set. Otherwise we turn is into a list and use indexing on it.
The tests have been updated to catch such regression.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 20 Mar 2014 18:44:25 -0700 |
parents | 170d6d591a7d |
children | 876c17336b4e |
line wrap: on
line diff
--- a/tests/test-revset.t Fri Mar 28 16:12:05 2014 -0700 +++ b/tests/test-revset.t Thu Mar 20 18:44:25 2014 -0700 @@ -744,6 +744,43 @@ 6 7 +test usage in revpair (with "+") + +(real pair) + + $ hg diff -r 'tip^^' -r 'tip' + diff -r 2326846efdab -r 24286f4ae135 .hgtags + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0 + $ hg diff -r 'tip^^::tip' + diff -r 2326846efdab -r 24286f4ae135 .hgtags + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000 + @@ -0,0 +1,1 @@ + +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0 + +(single rev) + + $ hg diff -r 'tip^' -r 'tip^' + $ hg diff -r 'tip^::tip^ or tip^' + +(single rev that does not looks like a range) + + $ hg diff -r 'tip^ or tip^' + diff -r d5d0dcbdc4d9 .hgtags + --- /dev/null Thu Jan 01 00:00:00 1970 +0000 + +++ b/.hgtags * (glob) + @@ -0,0 +1,1 @@ + +e0cc66ef77e8b6f711815af4e001a6594fde3ba5 1.0 + +(no rev) + + $ hg diff -r 'author("babar") or author("celeste")' + abort: empty revision range + [255] + aliases: $ echo '[revsetalias]' >> .hg/hgrc