From faecbf7c316c456d987847b6e1789065d78273e2 Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Sat, 19 Jan 2008 16:19:55 +0100 Subject: [PATCH] * requestsync: Add line editing during input. --- debian/changelog | 3 ++- requestsync | 14 +++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 922db32..aaee2e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ ubuntu-dev-tools (0.25) UNRELEASED; urgency=low 'source' line (LP: #183346). + Add support to file sync requests with python-launchpad-bugs (--lp) (LP: #147994). + + Add line editing during input. * doc/requestsync.1: + Document new requestsync options. @@ -29,7 +30,7 @@ ubuntu-dev-tools (0.25) UNRELEASED; urgency=low * Remove duplicated ubuntu-dev-tools recommends (it's already a dependency). - -- Michael Bienia Sat, 19 Jan 2008 15:27:14 +0100 + -- Michael Bienia Sat, 19 Jan 2008 16:18:45 +0100 ubuntu-dev-tools (0.24) hardy; urgency=low diff --git a/requestsync b/requestsync index f2fc2fc..2ca579c 100755 --- a/requestsync +++ b/requestsync @@ -9,7 +9,7 @@ # # License: GPLv2, see /usr/share/common-licenses/GPL -import os, sys, urllib, subprocess, getopt +import os, sys, urllib, subprocess, getopt, readline def cur_version_component(sourcepkg, release): '''Determine current package version in ubuntu.''' @@ -140,7 +140,7 @@ def mail_bug(source_package, subscribe, status, bugtitle, bugtext, keyid = None) print 'Press enter to file this bug, Control-C to abort.' try: - sys.stdin.readline() + raw_input() except KeyboardInterrupt: print 'Abort requested. No sync request filed.' sys.exit(1) @@ -213,7 +213,7 @@ def post_bug(source_package, subscibe, status, bugtitle, bugtext): print 'Press enter to file this bug, Control-C to abort.' try: - sys.stdin.readline() + raw_input() except KeyboardInterrupt: print 'Abort requested. No sync request filed.' sys.exit(1) @@ -289,8 +289,12 @@ if __name__ == '__main__': print 'Explanation of the Ubuntu delta and why it can be dropped:' explanation = '\nExplanation of the Ubuntu delta and why it can be dropped:\n' while (explanation[-2:] != '\n\n'): - explanation += sys.stdin.readline() - report += explanation + try: + explanation += raw_input() + '\n' + except KeyboardInterrupt: + print 'Abort requested. No sync request filed.' + sys.exit(1) + report += explanation uidx = base_ver.find('build') if uidx > 0: