mirror of
https://github.com/opnsense/src.git
synced 2026-03-24 03:33:08 -04:00
awkdiff is the script from scottl that he got from ken a long time ago... It no longer lives in his home dir, so give it a new home... This does simple massaging of p4 output to create a useful diff... The script p4diffbranch will create a diff that includes new and deleted files unlike the normal diff2 -b command... So will be useful for extracting patches from p4... It does take a changeset that will be used to diff against...
19 lines
410 B
Bash
Executable file
19 lines
410 B
Bash
Executable file
#!/bin/sh -
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
if [ x"$#" != x"2" ]; then
|
|
echo "Usage: $0 <branch> <changesetnum>"
|
|
exit 1
|
|
fi
|
|
|
|
basescript="$(realpath "$0")"
|
|
awkdiff="${basescript%/*}/awkdiff"
|
|
|
|
branch="$1"
|
|
changenum="$2"
|
|
|
|
p4 branch -o "$branch" |
|
|
awk ' /^View:/ { doview = 1; next; } /^[^ ]/ {doview = 0; next; } $1 && $2 && doview == 1 { system("p4 diff2 -du " $1 "@" changenum " " $2) }' changenum="$changenum" |
|
|
"$awkdiff"
|