Commit 050e8153 authored by gejun's avatar gejun

add tools/patch_from_svn to ease patching from svn diffs

Change-Id: Ib8144514b7d73505c5ab1faa30b53d606463e20f
parent d7f59d26
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: patch_from_svn some.patch"
echo "The patch should be generated by 'svn diff -c <REV>'"
exit 1
fi
cat $1 | sed -e 's/src\/baidu\/rpc\//brpc\//g' > $1.brpc_os
EXTRA_ARGS=
if [ -z "$DO_RUN" ]; then
EXTRA_ARGS="--dry-run $EXTRA_ARGS"
echo "*** This is a dry-run. To really apply, run: DO_RUN=1 tools/patch_from_svn $1"
fi
patch -p0 -u $EXTRA_ARGS < $1.brpc_os
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment