X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=branch.sh;h=669da041008d172802cd6335594ba715919502c9;hb=b429b3cce05773992b05cc6a547662a7fc2ed100;hp=ce27a4517142655aa11cc1e84a23f9d4378913d2;hpb=d0faf49fa19651e958783a63497d921901f9f0a2;p=packages%2Flighttpd.git diff --git a/branch.sh b/branch.sh index ce27a45..669da04 100755 --- a/branch.sh +++ b/branch.sh @@ -1,10 +1,12 @@ #!/bin/sh set -e svn=svn://svn.lighttpd.net/lighttpd +url=https://git.lighttpd.net/lighttpd/lighttpd1.4.git package=lighttpd -tag=lighttpd-1.4.36 -branch=lighttpd-1.4.x -out=lighttpd-branch.diff +tag=lighttpd-1.4.41 +branch=master +out=$package-branch.diff +repo=$package.git # old version of this code used to create tarball. # leave it around @@ -22,25 +24,22 @@ d=$- filter() { set -$d # Excluding files which change version or were not in dist tarball - filterdiff \ + filterdiff -p1 \ -x 'CMakeLists.txt' \ -x 'configure.ac' \ -x 'SConstruct' \ - | \ - # remove revno's for smaller diffs - sed -e 's,^\([-+]\{3\} .*\)\t(revision [0-9]\+)$,\1,' + -x 'packdist.sh' \ + | cat } -old=$svn/tags/$tag -new=$svn/branches/$branch -echo >&2 "Running diff: $old -> $new" -LC_ALL=C svn diff --old=$old --new=$new > $out.tmp -revno=$(sed -ne 's,^[-+]\{3\} .*\t(revision \([0-9]\+\))$,\1,p' $out.tmp | sort -urn | head -n1) -echo >&2 "Revision $revno" -[ "$revno" -gt 0 ] || exit 1 +if [ ! -d $repo ]; then + git clone --bare $url -b $branch $repo +fi -sed -i -e "1i# Revision $revno" $out.tmp -filter < $out.tmp > $out.tmp2 && mv -f $out.{tmp2,tmp} +cd $repo + git fetch origin +$branch:refs/remotes/origin/$branch +refs/tags/$tag:refs/tags/$tag + git log -p --reverse $tag..$branch | filter > ../$out.tmp +cd .. if cmp -s $out{,.tmp}; then echo >&2 "No new diffs..."