diff tests/test-revset.t @ 26020:cc3a30ff9490

revpair: restrict odd-range handling to top-level x:y expression (issue4774) The odd-range hack was introduced by 2a0efa1112ac for backward compatibility, but it was too widely applied. I've checked cmdutil.revpair() at 1.6, and found that ".:", ":0" and ":" are also handled as pairs. So let's enable the hack only for "x:y", "x:", "y:" and ":". test-revset.t is updated because "tip^::tip^ or tip^" shouldn't be taken as an odd range. This patch adds "tip^:tip^" instead. This patch is written for the default branch because parse() of the stable branch lacks compatibility hack for "foo+bar" tag. If we want to mitigate the issue in stable, we can add something like "and '::' in revs[0]".
author Yuya Nishihara <yuya@tcha.org>
date Thu, 13 Aug 2015 16:15:43 +0900
parents a7527c5769bb
children be8a4e0800d8
line wrap: on
line diff
--- a/tests/test-revset.t	Thu Aug 13 16:27:32 2015 +0900
+++ b/tests/test-revset.t	Thu Aug 13 16:15:43 2015 +0900
@@ -1515,10 +1515,16 @@
 (single rev)
 
   $ hg diff -r 'tip^' -r 'tip^'
-  $ hg diff -r 'tip^::tip^ or tip^'
+  $ hg diff -r 'tip^:tip^'
 
 (single rev that does not looks like a range)
 
+  $ hg diff -r 'tip^::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
   $ hg diff -r 'tip^ or tip^'
   diff -r d5d0dcbdc4d9 .hgtags
   --- /dev/null	Thu Jan 01 00:00:00 1970 +0000