diff tests/test-revlog.t @ 32392:36d3559c69a6

revlog: tweak wording and logic for flags validation First, the logic around the if..elif..elif was subtly wrong and sub-optimal because all branches would be tested as long as the revlog was valid. This patch changes things so it behaves like a switch statement over the revlog version. While I was here, I also tweaked error strings to make them consistent and to read better.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 19 May 2017 20:10:50 -0700
parents 3ea1f1e71a0a
children 71d1bbf1617e
line wrap: on
line diff
--- a/tests/test-revlog.t	Fri May 19 20:01:35 2017 -0700
+++ b/tests/test-revlog.t	Fri May 19 20:10:50 2017 -0700
@@ -7,7 +7,7 @@
   ...     fh.write('\x00\x01\x00\x00')
 
   $ hg log
-  abort: index 00changelog.i unknown flags 0x01 for format v0!
+  abort: unknown flags (0x01) in version 0 revlog 00changelog.i!
   [255]
 
 Unknown flags on revlog version 1 are rejected
@@ -16,7 +16,7 @@
   ...     fh.write('\x00\x04\x00\x01')
 
   $ hg log
-  abort: index 00changelog.i unknown flags 0x04 for revlogng!
+  abort: unknown flags (0x04) in version 1 revlog 00changelog.i!
   [255]
 
 Unknown version is rejected
@@ -25,7 +25,7 @@
   ...     fh.write('\x00\x00\x00\x02')
 
   $ hg log
-  abort: index 00changelog.i unknown format 2!
+  abort: unknown version (2) in revlog 00changelog.i!
   [255]
 
   $ cd ..