Allow adding patches to the pullrev list.
This commit is contained in:
parent
356046ff98
commit
8a0df3f30f
23
pullrev.sh
23
pullrev.sh
@ -9,7 +9,7 @@ repo="https://svn.apache.org/repos/asf/httpd/httpd/trunk"
|
||||
#repo="https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x"
|
||||
ver=2.4.43
|
||||
prefix="httpd-${ver}"
|
||||
suffix="r$1${2:++}"
|
||||
suffix="${SUFFIX:-r$1${2:++}}"
|
||||
fn="${prefix}-${suffix}.patch"
|
||||
vcurl="http://svn.apache.org/viewvc?view=revision&revision="
|
||||
|
||||
@ -23,8 +23,12 @@ fi
|
||||
|
||||
new=0
|
||||
for r in $*; do
|
||||
if ! grep -q "${vcurl}${r}" ${fn}; then
|
||||
echo "${vcurl}${r}"
|
||||
case $r in
|
||||
http*) url=$r ;;
|
||||
*) url=${vcurl}${r} ;;
|
||||
esac
|
||||
if ! grep -q "^${url}" ${fn}; then
|
||||
echo "${url}"
|
||||
new=1
|
||||
fi
|
||||
done >> ${fn}
|
||||
@ -35,10 +39,17 @@ prev=/dev/null
|
||||
for r in $*; do
|
||||
echo "+ fetching ${r}"
|
||||
this=`mktemp /tmp/pullrevXXXXXX`
|
||||
svn diff -c ${r} ${repo} | filterdiff --remove-timestamps --clean -x 'CHANGES' -x '*/next-number' -x 'STATUS' \
|
||||
-x '*.xml' --addprefix="${prefix}/" > ${this}
|
||||
case $r in
|
||||
http*) curl -s "$r" | filterdiff --strip=3 ;;
|
||||
*) svn diff -c ${r} ${repo} ;;
|
||||
esac | filterdiff --remove-timestamps --clean \
|
||||
-x 'CHANGES' -x '*/next-number' -x 'STATUS' -x '*.xml' \
|
||||
--addprefix="${prefix}/" > ${this}
|
||||
next=`mktemp /tmp/pullrevXXXXXX`
|
||||
combinediff --quiet ${prev} ${this} > ${next}
|
||||
if ! combinediff -w ${prev} ${this} > ${next}; then
|
||||
echo "Failed combining previous ${prev} with ${this}";
|
||||
exit 1
|
||||
fi
|
||||
rm -f "${this}"
|
||||
[ "${prev}" = "/dev/null" ] || rm -f "${prev}"
|
||||
prev=${next}
|
||||
|
Loading…
Reference in New Issue
Block a user