Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2017-07-13,master
commit 386403dd7eed2b6fe9965f7202cc335d974d3cd8 Author: Sven Eckelmann sven@narfation.org Date: Sat Dec 18 13:41:40 2010 +0000
doc: batman-adv/LinuxNextTracking
386403dd7eed2b6fe9965f7202cc335d974d3cd8 batman-adv/LinuxNextTracking.textile | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-)
diff --git a/batman-adv/LinuxNextTracking.textile b/batman-adv/LinuxNextTracking.textile index 9097e77d..5780f5ec 100644 --- a/batman-adv/LinuxNextTracking.textile +++ b/batman-adv/LinuxNextTracking.textile @@ -1,6 +1,4 @@ - -h1. Tracking the linux-next branch - += Tracking the linux-next branch =
We have currently our own branch to create patches for linux. These patches are send to a sub-system maintainer which integrates them into his own git repository. New patches from other people usually went to linux-next. We have to create patches on top of linux-next unless they are only small bug fixes directly for 2.6.
@@ -8,11 +6,9 @@ Other people will also create patches which may affect our code and thus we have
The new approach is to create a mirror of linux-next on our server, install a small script which parses the commits in post-receive and send mails when there are changes in fails inside net/batman-adv. This script is stolen from http://git.open-mesh.org/batman-adv.git.
+== Initial setup ==
-h2. Initial setup - - -<pre> +{{{ su batman - cd $HOME git clone --mirror git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git @@ -25,37 +21,37 @@ export MY_REV="refs/heads/master" export GIT_DIR=/home/batman/linux-next.git cd "$GIT_DIR" cd /home/batman/linux-next.git -oldrev="@git rev-parse $MY_REV@" +oldrev="`git rev-parse $MY_REV`" git fetch -newref="@git rev-parse master@" +newref="`git rev-parse master`" if [ "$oldrev" != "$newref" ]; then echo "$oldrev" "$newref" "$MY_REV" | ./hooks/manual-hook fi EOF chmod +x linux-next.git/sync-git -</pre> +}}}
The script has to be modified a little bit to get it working after refs/heads/master was modified. Just exchange -<pre> +{{{ git rev-parse --not --branches | grep -v $(git rev-parse $refname) | git rev-list --reverse --stdin $oldrev..$newrev -- net/batman-adv -</pre> +}}}
with -<pre> +{{{ git rev-list --reverse $oldrev..$newrev -- net/batman-adv -</pre> +}}}
The next step is to add it to batman crontab -<pre> +{{{ 15 0 * * * /home/batman/linux-next.git/sync-git >& /dev/null -</pre> +}}}
To get it really to send something we have to add the mail information to the hooks section of linux-next.git/config -<pre> +{{{ [hooks] mailinglist = my-address@foobar.com envelopesender = postmaster@open-mesh.org emailprefix = "[linux-next] " -</pre> +}}}
Now the guy with my-address@foobar.com will receive our and foreign patches which touches net/batman-adv in linux-next... each day at 0:15 (or at least once a day). \ No newline at end of file