[ooo-build-commit] .: doc/updating-patches-using-git.txt

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Jun 1 08:54:55 PDT 2010


 doc/updating-patches-using-git.txt |   66 +++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

New commits:
commit 8fc596f76ace792694bb873de2dffabbdddbc6af
Author: Jan Holesovsky <kendy at suse.cz>
Date:   Tue Jun 1 17:53:43 2010 +0200

    Short cheatsheet about updating patches using git.
    
    Some of that written when I was doing it, the rest off the top of my head,
    hopefully it will work for you too ;-)
    
    * doc/updating-patches-using-git.txt: How to update the patches.

diff --git a/doc/updating-patches-using-git.txt b/doc/updating-patches-using-git.txt
new file mode 100644
index 0000000..a5d0580
--- /dev/null
+++ b/doc/updating-patches-using-git.txt
@@ -0,0 +1,66 @@
+Short cheatsheet how to update patches to newer milestone using git
+===================================================================
+
++ [some stuff writen off the top of my head, please ping me (Kendy) if it does
+  not work for you]
+
++ create a list of patches to update somehow
+  + eg. ls build/ooo320-m17/applied_patches | sed 's/^....-//' > patches-list.txt
+
++ create an empty git tree containing the old milestone
+  + using eg. make unpack
+  + cd build/dev300-mOLD
+  + ../../bin/create-gitignores.sh
+
++ commit the patches to git
+  + to a separate branch
+    + git checkout -b patches_branch
+  + from the list we have created above
+
+    C=1 ; cat ../../patches-list.txt | while read P
+    do
+        F=`ls /local/ooo-build/ooo-build-dev300/patches/*/$P | grep -v 'patches/test'`
+        if [ -f "$F" ] ; then
+            echo "===== $P ($C) ====="
+            C=$(($C+1))
+            grep -v '^diff --git' "$F" | git apply -p0 --index --ignore-whitespace --whitespace=fix --unidiff-zero
+            git commit -m "$P"
+       else
+            echo "missing $F"
+       fi
+    done > .log 2>&1
+
++ commit the new milestone to master
+  + switch back to master
+    + git checkout master
+  + remove everything in build/dev300-mOLD
+    + rm -r *
+  + cd ../..
+  + configure --with-tag=dev300-mNEW
+  + cd build/dev300-mOLD
+  + cp -a ../dev300-mNEW/* .
+  + git add .
+  + git commit -am "New milestone mNEW"
+
++ rebase to the new milestone
+  + git checkout patches_branch
+  + git rebase -i master
+    + remove the patches that you already know that have been upstreamed
+      + query for multiple bugs, ehm issues, in IZ
+        + http://www.openoffice.org/issues/buglist.cgi?issue_id=<no.>,<no.>,<...>
+    + tweak whatever else you think you might need to tweak
+    + exit the editor, and with each problem that appears
+      + fix the stuff
+      + git add fixed.cxx files.cxx
+      + git rebase --continue
+
++ copy back
+  + when you are done
+  + git format-patch master
+
+    for I in *.patch
+    do
+        P=`grep '^Subject:' $I | sed 's/^.*\] //'`
+        F=`ls /local/ooo-build/ooo-build-dev300/patches/*/$P | grep -v 'patches/test'`
+        cp $I $F
+    done


More information about the ooo-build-commit mailing list