From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: [StGit PATCH 1/6] Allow caller to customize title of error/warning message
Date: Mon, 08 Oct 2007 10:55:12 +0200 [thread overview]
Message-ID: <20071008085512.9734.33911.stgit@yoghurt> (raw)
In-Reply-To: <20071008085430.9734.75797.stgit@yoghurt>
Signed-off-by: Karl Hasselström <kha@treskal.com>
---
stgit/out.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/stgit/out.py b/stgit/out.py
index 3464175..d3c86b4 100644
--- a/stgit/out.py
+++ b/stgit/out.py
@@ -85,12 +85,12 @@ class MessagePrinter(object):
def info(self, *msgs):
for msg in msgs:
self.__out.single_line(msg)
- def note(self, *msgs):
- self.__out.tagged_lines('Notice', msgs)
- def warn(self, *msgs):
- self.__err.tagged_lines('Warning', msgs)
- def error(self, *msgs):
- self.__err.tagged_lines('Error', msgs)
+ def note(self, *msgs, **kw):
+ self.__out.tagged_lines(kw.get('title', 'Notice'), msgs)
+ def warn(self, *msgs, **kw):
+ self.__err.tagged_lines(kw.get('title', 'Warning'), msgs)
+ def error(self, *msgs, **kw):
+ self.__err.tagged_lines(kw.get('title', 'Error'), msgs)
def start(self, msg):
"""Start a long-running operation."""
self.__out.single_line('%s ... ' % msg, print_newline = False)
next prev parent reply other threads:[~2007-10-08 8:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 8:55 [StGit PATCH 0/6] Survive capital punishment Karl Hasselström
2007-10-08 8:55 ` Karl Hasselström [this message]
2007-10-08 8:55 ` [StGit PATCH 2/6] Use our nice message printout wrapping system Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 3/6] Properly detect that HEAD is detached Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 4/6] Refactor crt_series creation Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 5/6] Don't have a global crt_series in stgit.commans.common Karl Hasselström
2007-10-08 8:55 ` [StGit PATCH 6/6] Let some commands work with detached HEAD Karl Hasselström
2007-10-08 15:34 ` Karl Hasselström
2007-10-09 4:42 ` [StGit PATCH] New test: "stg diff" Karl Hasselström
2007-10-09 5:12 ` [StGit PATCH 6/6] Let some commands work with detached HEAD Karl Hasselström
2007-10-08 8:58 ` [StGit PATCH 0/6] Survive capital punishment Karl Hasselström
2007-10-08 9:27 ` Karl Hasselström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071008085512.9734.33911.stgit@yoghurt \
--to=kha@treskal.com \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).