Make the commit message indicate when the --force option is used. (trunk r7712)
authorZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:45:59 +0000 (17:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 6 Sep 2007 17:45:59 +0000 (17:45 -0000)
svn path=/main/branches/2.1.2/; revision=7738

bin/repoman

index cd8fca0bc937962db1da527cbbcef95203729694..a31cc6ea89123d59c46d99f07744e7681ad1f5af 100755 (executable)
@@ -1680,12 +1680,15 @@ else:
                                commitmessage=raw_input(green("> "))
                        except KeyboardInterrupt: 
                                exithandler()
-       try:
-               commitmessage+="\n(Portage version: "+str(portage.VERSION)+")"
-       except AttributeError:
-               print "Failed to insert portage version in message!"
-               commitmessage+="\n(Portage version: Unknown)"
-
+       portage_version = getattr(portage, "VERSION", None)
+       if portage_version is None:
+               sys.stderr.write("Failed to insert portage version in message!\n")
+               sys.stderr.flush()
+               portage_version = "Unknown"
+       commitmessage += "\n(Portage version: "+str(portage_version)
+       if "--force" in myoptions:
+               commitmessage += ", RepoMan options: --force"
+       commitmessage += ")"
        if not manifest1_compat:
                myfiles = myupdates + myremoved + mymanifests
                filesdirs = set()