summaryrefslogtreecommitdiff
path: root/ports-mgmt/porttools/files/patch-cmd_commit.in
blob: 00fc765dca8857f2fa977f92a9c495bca4433017 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
--- cmd_commit.in.orig	2009-09-10 04:59:59.000000000 +0900
+++ cmd_commit.in	2012-12-31 21:42:13.000000000 +0900
@@ -1,6 +1,6 @@
 # cmd_commit
 # Module for port(1)
-# SUMMARY: commit a port into the FreeBSD Ports CVS Repository
+# SUMMARY: commit a port into the FreeBSD Ports SVN Repository
 #
 # $Id: cmd_commit.in,v 1.2 2009/09/09 19:58:30 skolobov Exp $
 #
@@ -59,13 +59,14 @@
 
 # Determine if this is a new port
 MODE="update"
-[ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
+svn status Makefile 2>&1 1>/dev/null | grep -qs 'svn: warning: W155007:'
+[ $? -eq 0 ] || [ "`grep '\$FreeBSD: ' Makefile`" ] || MODE="new"
 
 # Run portlint(1) to validate port's sanity
 echo "===> Pre-commit portlint check"
 FLAGS="-C"
 [ "${MODE}" = "new" ] && FLAGS="${FLAGS} -N"
-PL_CVS_IGNORE='^\d+$|^pr-patch$|^cvs-msg$' \
+PL_SVN_IGNORE='^\d+$|^pr-patch$|^svn-msg$' \
 portlint ${FLAGS}
 if [ $? -ne 0 ]
 then
@@ -79,15 +80,12 @@
 then
 	${PORTSDIR}/Tools/scripts/addport -d `pwd` -u ${FREEFALL_USERNAME}
 else
-	# Initialize CVS environment
-	PCVS="cvs -d ${FREEFALL_USERNAME}@pcvs.FreeBSD.org:/home/pcvs"
-
 	# Make sure we are working with up-to-date version
-	echo "===> Pre-commit CVS update"
-	${PCVS} update
+	echo "===> Pre-commit SVN update"
+	svn update
 
-	# See if CVS message already exists, and use that for commit log
-	MSG="cvs-msg"
+	# See if SVN message already exists, and use that for commit log
+	MSG="svn-msg"
 	FLAGS=""
 	if [ -e ${MSG} ]
 	then
@@ -99,16 +97,16 @@
 			echo '============================================='
 			cat ${MSG}
 			echo '============================================='
-			read -p "Is the CVS message above correct? (y/n)" ANSWER
+			read -p "Is the SVN message above correct? (y/n)" ANSWER
 			[ "${ANSWER}" = "y" ] && break
 			${VISUAL:-vi} ${MSG}
 		done
 	fi 
 	# Commit the port update
 	echo "===> Committing port update"
-	${PCVS} commit ${FLAGS}
+	svn commit ${FLAGS}
 	
-	# Remove CVS message file only if commit was successful
+	# Remove SVN message file only if commit was successful
 	[ $? -eq 0 -a -e ${MSG} ] && rm ${MSG}
 fi