Make the commit message indicate when the --force option is used.
authorZac Medico <zmedico@gentoo.org>
Tue, 28 Aug 2007 03:15:34 +0000 (03:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 28 Aug 2007 03:15:34 +0000 (03:15 -0000)
svn path=/main/trunk/; revision=7712

bin/repoman

index e7b76cc68a762c07335be4748deb99c387bec10c..3c68088b3623739ec9c29b84b64554d550595256 100755 (executable)
@@ -1710,12 +1710,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()