~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

Move all features to bzrlib.tests.features in 2.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
            "It is recommended that you upgrade by "
155
155
            "running the command\n"
156
156
            "  bzr upgrade %(basedir)s"),
 
157
        locks_steal_dead=(
 
158
            u"Stole dead lock %(lock_url)s %(other_holder_info)s."),
157
159
        )
158
160
 
159
161
    def __init__(self):
304
306
        try:
305
307
            template = self._user_warning_templates[warning_id]
306
308
        except KeyError:
307
 
            fail = "failed to format warning %r, %r" % (warning_id, message_args)
308
 
            warnings.warn(fail)   # so tests will fail etc
 
309
            fail = "bzr warning: %r, %r" % (warning_id, message_args)
 
310
            warnings.warn("no template for warning: " + fail)   # so tests will fail etc
309
311
            return fail
310
312
        try:
311
313
            return template % message_args
312
314
        except ValueError, e:
313
 
            fail = "failed to format warning %r, %r: %s" % (
 
315
            fail = "bzr unprintable warning: %r, %r, %s" % (
314
316
                warning_id, message_args, e)
315
317
            warnings.warn(fail)   # so tests will fail etc
316
318
            return fail