svn commit: r443456 - head/Tools/scripts

Bryan Drewery bdrewery at FreeBSD.org
Mon Jun 12 17:31:57 UTC 2017


Author: bdrewery
Date: Mon Jun 12 17:31:56 2017
New Revision: 443456
URL: https://svnweb.freebsd.org/changeset/ports/443456

Log:
  Allow editing commit message on failure and save it somewhere if declined.
  
  With hat:       portmgr

Modified:
  head/Tools/scripts/mfh

Modified: head/Tools/scripts/mfh
==============================================================================
--- head/Tools/scripts/mfh	Mon Jun 12 17:29:04 2017	(r443455)
+++ head/Tools/scripts/mfh	Mon Jun 12 17:31:56 2017	(r443456)
@@ -147,6 +147,13 @@ ask "Do you want to commit? (no = start a shell)" || (
 echo >> commit.txt
 echo "Approved by:	" >> commit.txt
 ${EDITOR:-vi} commit.txt
-"${svn}" ci -F commit.txt "${branch}"
+while ! "${svn}" ci -F commit.txt "${branch}"; do
+	if ! ask "Commit failed. Re-edit message and try again?"; then
+		save_log="$(mktemp -t mfh)"
+		cp -f commit.txt "${save_log}"
+		echo "Saving commit log to ${save_log}"
+		break
+	fi
+done
 rm -rf "${dir}"
 trap - 0


More information about the svn-ports-all mailing list