Show More
@@ -1114,10 +1114,6 b' Filters work:' | |||
|
1114 | 1114 | other |
|
1115 | 1115 | user |
|
1116 | 1116 | |
|
1117 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
|
1118 | ||
|
1119 | $ hg log -l1 --template '{date|age}\n' | |
|
1120 | 7 years from now | |
|
1121 | 1117 | $ hg log --template '{date|date}\n' |
|
1122 | 1118 | Wed Jan 01 10:01:00 2020 +0000 |
|
1123 | 1119 | Mon Jan 12 13:46:40 1970 +0000 |
@@ -1220,6 +1216,20 b' Formatnode filter works:' | |||
|
1220 | 1216 | $ hg --debug log -r 0 --template '{node|formatnode}\n' |
|
1221 | 1217 | 1e4e1b8f71e05681d422154f5421e385fec3454f |
|
1222 | 1218 | |
|
1219 | Age filter: | |
|
1220 | ||
|
1221 | $ hg log --template '{date|age}\n' > /dev/null || exit 1 | |
|
1222 | ||
|
1223 | >>> from datetime import datetime | |
|
1224 | >>> fp = open('a', 'w') | |
|
1225 | >>> fp.write(str(datetime.now().year + 8) + '-01-01 00:00') | |
|
1226 | >>> fp.close() | |
|
1227 | $ hg add a | |
|
1228 | $ hg commit -m future -d "`cat a`" | |
|
1229 | ||
|
1230 | $ hg log -l1 --template '{date|age}\n' | |
|
1231 | 7 years from now | |
|
1232 | ||
|
1223 | 1233 | Error on syntax: |
|
1224 | 1234 | |
|
1225 | 1235 | $ echo 'x = "f' >> t |
General Comments 0
You need to be logged in to leave comments.
Login now