# HG changeset patch # User FUJIWARA Katsunori # Date 1406826864 -32400 # Node ID 9663a7855798234e5c2606632f0cc5e17ffbcf8c # Parent 2122b82b6987c074ce9b4283c5d2b5927701a36c 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)) diff -r 2122b82b6987 -r 9663a7855798 hgext/convert/git.py --- 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