ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/pack/freebsd/libexec/diff.sh
Revision: 644
Committed: 2014-05-26T22:44:00-07:00 (11 years ago) by douglas
Content type: text/x-sh
File size: 1028 byte(s)
Log Message:
Make delete diff look correct.


File Contents

# Content
1 #!/usr/local/bin/bash
2 # Diff
3 #
4 # Douglas Thrift
5 #
6 # $Id$
7
8 summary='Create a diff patch of a port'
9 declare -A options
10 declare -A arguments
11
12 function svn_diff()
13 {
14 svn_revision=`git svn find-rev remotes/origin/svn_head`
15 git diff --no-prefix master | gsed -re 's/^index .*$/===================================================================/' \
16 -e 's/^diff --git (.*) \1$/Index: \1/' \
17 -e '/^--- .*$/h;/^\+\+\+ \/dev\/null.*$/{x;s/^---/+++/;s/\(revision [0-9]+\)$/(working copy)/}' \
18 -e "s/^--- .*$/&\t(revision $svn_revision)/" \
19 -e 's/^\+\+\+ .*$/&\t(working copy)/' \
20 -e '/^deleted file mode .*$/d'
21 }
22
23 function execute()
24 {
25 tool git devel/git-subversion
26 tool gsed ports/textproc/gsed
27 tool svn devel/subversion
28
29 svn_diff | cdiff
30
31 help diff
32
33 diff="diff/$category_port/$port.`date -u +%Y-%m-%dT%H%M%SZ`.diff"
34
35 svnmkdir `dirname $diff`
36 sanitize_freebsd_ids
37 (cd $category; diff -Nrux .svn -x work /usr/ports/$category_port $port) | tee $diff
38 unsanitize_freebsd_ids
39 svn add $diff
40 }
41
42 # vim: noexpandtab tabstop=4

Properties

Name Value
svn:keywords Id