summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-14 09:52:48 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-14 09:52:48 +0000
commita02348d917983de5acdec114f8b31a9a61b79e8a (patch)
treeadc0f3b6e35d9546846e5bc48b642154f46f3c69
parentdec44665f91e1ba78573ae95f6585e5a293916a0 (diff)
downloadportage-a02348d917983de5acdec114f8b31a9a61b79e8a.tar.gz
portage-a02348d917983de5acdec114f8b31a9a61b79e8a.tar.bz2
portage-a02348d917983de5acdec114f8b31a9a61b79e8a.zip
Add support for multi-line commit message input by using EOF
as a delimiter (Ctrl-d) instead of a new line. svn path=/main/trunk/; revision=8920
-rwxr-xr-xbin/repoman16
1 files changed, 10 insertions, 6 deletions
diff --git a/bin/repoman b/bin/repoman
index 7d71d07af..20abec653 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -1720,12 +1720,16 @@ else:
# We've read the content so the file is no longer needed.
commitmessagefile = None
if not commitmessage:
- print "Please enter a CVS commit message at the prompt:"
- while not commitmessage:
- try:
- commitmessage=raw_input(green("> "))
- except KeyboardInterrupt:
- exithandler()
+ print "Please enter a commit message. Use Ctrl-d to finish or Ctrl-c to abort."
+ commitmessage = []
+ try:
+ while True:
+ commitmessage.append(sys.stdin.readline())
+ if not commitmessage[-1]:
+ break
+ except KeyboardInterrupt:
+ exithandler()
+ commitmessage = "".join(commitmessage)
portage_version = getattr(portage, "VERSION", None)
if portage_version is None:
sys.stderr.write("Failed to insert portage version in message!\n")