[126108] users/pixilla/scripts/mp-svn-blame-port

pixilla at macports.org pixilla at macports.org
Fri Oct 3 16:24:02 PDT 2014


Revision: 126108
          https://trac.macports.org/changeset/126108
Author:   pixilla at macports.org
Date:     2014-10-03 16:24:02 -0700 (Fri, 03 Oct 2014)
Log Message:
-----------
scripts:
- Add svn blame helper script.

Added Paths:
-----------
    users/pixilla/scripts/mp-svn-blame-port

Added: users/pixilla/scripts/mp-svn-blame-port
===================================================================
--- users/pixilla/scripts/mp-svn-blame-port	                        (rev 0)
+++ users/pixilla/scripts/mp-svn-blame-port	2014-10-03 23:24:02 UTC (rev 126108)
@@ -0,0 +1,28 @@
+#!/bin/sh
+# mp-svn-log-port
+# Get svn blame for "port dir <stdin>"
+: ${MP_SVNCMD:=$(which svn)}
+MP_CMD="port dir $@ | sort -u"
+# echo "MP_CMD: ${MP_CMD}"
+# exit
+MP_DIRS=$(eval $MP_CMD)
+# echo "MP_DIRS: ${MP_DIRS}"
+# exit
+for MP_DIR in $MP_DIRS; do
+# echo "MP_DIR: ${MP_DIR}"
+    MP_DPORTS="${MP_DIR%/*/*}"
+    MP_PORTPARENT="${MP_DIR##*/}"
+    MP_PORTCAT="${MP_DIR%/*}"
+    MP_PORTDIR="${MP_PORTCAT##*/}/${MP_PORTPARENT}"
+# echo "MP_PORTPARENT: $MP_PORTPARENT"
+# echo "MP_PORTCAT: $MP_PORTCAT"
+# echo "MP_PORTDIR: $MP_PORTDIR"
+# exit
+    cd "${MP_DPORTS}"
+    MP_FILES=$(${MP_SVNCMD} ls -R "${MP_PORTDIR}" | grep -v -E "/$")
+    for MP_FILE in $MP_FILES; do
+        echo "svn blame ${MP_DPORTS}/${MP_PORTDIR}/${MP_FILE}:"
+        ${MP_SVNCMD} blame "${MP_PORTDIR}/${MP_FILE}"
+    done
+#   ${MP_SVNCMD} diff
+done


Property changes on: users/pixilla/scripts/mp-svn-blame-port
___________________________________________________________________
Added: svn:executable
   + *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141003/593988b3/attachment.html>


More information about the macports-changes mailing list