diff tests/test-template-functions.t @ 44582:482a6aac1f15

revset: allow repo.revs('%d', wdirrev) Otherwise we can't write repo.revs('null:%d', subset.max()) to build a smartset covering the range {null .. tip} + {wdir} if subset includes wdir.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 21 Mar 2020 13:27:47 +0900
parents fa246ada356b
children 967e2e81f762
line wrap: on
line diff
--- a/tests/test-template-functions.t	Thu Mar 19 16:06:24 2020 +0100
+++ b/tests/test-template-functions.t	Sat Mar 21 13:27:47 2020 +0900
@@ -1263,6 +1263,13 @@
   5:13207e5a10d9fd28ec424934298e176197f2c67f,
   4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
 
+%d parameter handling:
+
+  $ hg log -T '{revset("%d", rev)}\n' -r'wdir()'
+  2147483647
+  $ hg log -T '{revset("%d", rev)}\n' -r'null'
+  -1
+
 Invalid arguments passed to revset()
 
   $ hg log -T '{revset("%whatever", 0)}\n'