convert: fix argument mismatch at formatting the abort message
This patch fixes argument mismatch at formatting the abort message,
introduced by
a204fd9b5ba9: the last '%s' doesn't have corresponded
argument.
This patch uses "unexpected size" in the abort message, to distinguish
the reason of failure from "unexpected type" failure checked in the
prior code path below:
if info[1] != type:
raise util.Abort(_('cannot read %r object at %s') % (type, rev))
--- a/hgext/convert/git.py Thu Jul 31 10:31:56 2014 +0100
+++ b/hgext/convert/git.py Fri Aug 01 02:14:24 2014 +0900
@@ -127,7 +127,8 @@
size = int(info[2])
data = self.catfilepipe[1].read(size)
if len(data) < size:
- raise util.Abort(_('cannot read %r object at %s: %s') % (type, rev))
+ raise util.Abort(_('cannot read %r object at %s: unexpected size')
+ % (type, rev))
# read the trailing newline
self.catfilepipe[1].read(1)
return data