From cf1939605ecb54b7a9658a9c9cc15ccda0f0f48b Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Fri, 30 Jul 2010 15:56:57 +0200 Subject: [PATCH] ack-sync: Improve source package name guessing. --- ack-sync | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ack-sync b/ack-sync index 5efbcfa..a0593f4 100755 --- a/ack-sync +++ b/ack-sync @@ -166,9 +166,14 @@ def main(bug_numbers, all_package, all_version, all_section, update, else: package = task.bug_target_name.split(" ")[0] if package == "ubuntu": - # no source package was defined. Guessing that the second word in - # the title is the package name - package = bug.title.split(" ")[1] + words = bug.title.split(" ") + # no source package was defined. Guessing that the second or + # third word in the title is the package name, because most + # titles start with "Please sync " or "Sync " + if words[0].lower() == "please": + package = words[2] + else: + package = words[1] if all_version is not None: version = all_version else: