[MacPorts] CommittersTipsAndTricks modified

MacPorts noreply at macports.org
Tue Dec 18 02:23:04 PST 2012


Page "CommittersTipsAndTricks" was changed by raimue at macports.org
Diff URL: <https://trac.macports.org/wiki/CommittersTipsAndTricks?action=diff&version=53>
Revision 53
Comment: Use 'svn patch' if in subversion working copy (assuming svn >= 1.7)
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: CommittersTipsAndTricks
=========================================================================
--- CommittersTipsAndTricks (version: 52)
+++ CommittersTipsAndTricks (version: 53)
@@ -156,6 +156,7 @@
 
 function trac-patch {
     local cmd=""
+
     while [[ $1 == -* ]]; do
         if [ "$1" == "--" ]; then
             break
@@ -166,11 +167,16 @@
     done
 
     if [ -z $cmd ]; then
-        cmd="-p0"
-    fi  
+        cmd="--strip 0"
+    fi
 
     trac-get $1
-    patch $cmd < $(basename $1)
+
+    if svn info >/dev/null 2>&1; then
+        svn patch $cmd $(basename $1)
+    else
+        patch $cmd < $(basename $1)
+    fi
 }
 }}}
 
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/CommittersTipsAndTricks>
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone added your email address to be
notified of changes on 'CommittersTipsAndTricks' page.
If it was not you, please report to .


More information about the macports-changes mailing list