From 97367096ed30fad377fc8a93d775a8c18b356288 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 20 Apr 2006 20:13:18 +0000 Subject: [PATCH] Fix repoman --commitmsgfile logic. Thanks to Christian Heim for reporting. svn path=/main/trunk/; revision=3179 --- bin/repoman | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/bin/repoman b/bin/repoman index b11bf0fd4..fd67ce117 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1519,7 +1519,20 @@ else: print "myheaders:",myheaders print unlinkfile=0 - if not (commitmessage or commitmessagefile): + if commitmessagefile: + try: + f = open(commitmessagefile) + commitmessage = f.read() + f.close() + del f + except (IOError, OSError), e: + if e.errno == errno.ENOENT: + portage.writemsg("!!! File Not Found: --commitmsgfile='%s'\n" % commitmessagefile) + else: + raise + # 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: @@ -1528,7 +1541,7 @@ else: exithandler() try: commitmessage+="\n(Portage version: "+str(portage.VERSION)+")" - except: + except AttributeError: print "Failed to insert portage version in message!" commitmessage+="\n(Portage version: Unknown)" if not commitmessagefile: -- 2.26.2