diff options
author | Sven Gothel <[email protected]> | 2010-11-09 03:12:37 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-11-09 03:12:37 +0100 |
commit | 328d022b474aea3786de67cccb09a6f392834486 (patch) | |
tree | 9493ac16fba7a3166143342b672a66778da2081a /git | |
parent | b3e89bfa55389cae974c94afba6fb4ce118f75df (diff) |
Add backup script and git stuff
Diffstat (limited to 'git')
-rw-r--r-- | git/git-make-shared-bare.sh | 23 | ||||
-rw-r--r-- | git/git-relocate-files.txt | 117 |
2 files changed, 140 insertions, 0 deletions
diff --git a/git/git-make-shared-bare.sh b/git/git-make-shared-bare.sh new file mode 100644 index 0000000..78dd735 --- /dev/null +++ b/git/git-make-shared-bare.sh @@ -0,0 +1,23 @@ +#! /bin/sh + +make_git_bare() { + name=$1 + shift + mkdir $name.git + cd $name.git + git init --bare --shared=0664 + cd .. +} + +# do a: 'newgrp jogl' first +#make_git_bare gluegen +#make_git_bare jogl +#make_git_bare jogl-demos +#make_git_bare applet-launcher +#make_git_bare joal +#make_git_bare joal-demos +#make_git_bare jocl +#make_git_bare jocl-demos +#make_git_bare jogl-utils +#make_git_bare jogamp.org +make_git_bare jogamp.org-SocialCoding diff --git a/git/git-relocate-files.txt b/git/git-relocate-files.txt new file mode 100644 index 0000000..166580a --- /dev/null +++ b/git/git-relocate-files.txt @@ -0,0 +1,117 @@ +1 Generic Manual +2 JogAmp Example 'Relocation: GlueGen GL Parts to Jogl' + +1 Generic Manual +------------------- + +http://superuser.com/questions/164362/git-keep-changelog-for-file-when-moving-to-a-different-repository + +Assume you want to transfer the history of filename.conf from one source repository to another receiving repository. I think the strategy you want to follow is: + + 1. In the source repository, create a branch of commits which are re-written to contain only filename.conf. + 2. Fetch the commits into the receiving repository. + 3. Merge the independent line of commits into a normal branch in the receiving repository. + +Definitely make backups of your repositories before you do any of this! + +In the source repository: + +<--- + +git checkout -b filtered-commits +git filter-branch -f --prune-empty --tree-filter 'find . -not -name filename.conf -exec rm {} \;' filtered-commits + +---> + +Then, in the receiving repository: + +<--- + +git remote add source path/to/source/repo +git fetch source filtered-commits +GIT_INDEX_FILE=.git/tmp-index git read-tree FETCH_HEAD +GIT_INDEX_FILE=.git/tmp-index git checkout-index -a -u +git update-index --add -- filename.conf +cp .git/FETCH_HEAD .git/MERGE_HEAD +git commit + +---> + ++++++++++++ ++++++++++++ ++++++++++++ + +2 JogAmp Example 'Relocation: GlueGen GL Parts to Jogl' +--------------------------------------------------------- + +Relocation: GlueGen GL Parts to Jogl +commit: 12c0248c77b3481eb16f6cd80de427f2fc49aa6d + +2.1) In gluegen (source) + + - git checkout -b pre_reloc (branch holding the pre relocation index) + - git checkout -b filter (temp branch) + - bash filter.sh (see below) + +2.2) In jogl (destination) + + - git remote add gluegen ../gluegen + - git fetch gluegen filter + - GIT_INDEX_FILE=.git/tmp-index git read-tree FETCH_HEAD + - GIT_INDEX_FILE=.git/tmp-index git checkout-index -a -u + - git update-index --add -- `cat ../gluegen/file.list` + - cp .git/FETCH_HEAD .git/MERGE_HEAD + - git status . + - git commit -m "Relocation: GlueGen GL Parts to Jogl" + - git remote rm gluegen + + .. now package renames etc followed up .. + +2.3) Cleanup in Gluegen + + - git checkout pre_reloc + - git branch -D filter + - git show-ref ( check for 'filter' ref ) + - git update-ref -d refs/original/refs/heads/filter + + - git checkout -b post_reloc + - git rm `cat file.list` + - git commit -m "Relocation: GlueGen GL Parts to Jogl" + +done + +++++ + +gluegen/filter.sh: +<--- +git filter-branch -f --prune-empty --tree-filter \ + 'find . -not -name GLExtensionNames.java \ + -a -not -name GLProcAddressResolver.java \ + -a -not -name BuildComposablePipeline.java \ + -a -not -name BuildStaticGLInfo.java \ + -a -not -name GLConfiguration.java \ + -a -not -name GLEmitter.java \ + -a -not -name GLJavaMethodBindingEmitter.java \ + -a -not -name StaticGLGenTask.java \ + -a -not -name NativeSignatureEmitter.java \ + -a -not -name NativeSignatureJavaMethodBindingEmitter.java \ + -a -type f \ + -exec rm {} \;' \ + filter +---> + +gluegen/file.list: +<--- +src/java/com/jogamp/gluegen/runtime/opengl/GLExtensionNames.java +src/java/com/jogamp/gluegen/runtime/opengl/GLProcAddressResolver.java +src/java/com/jogamp/gluegen/ant/StaticGLGenTask.java +src/java/com/jogamp/gluegen/nativesig/NativeSignatureEmitter.java +src/java/com/jogamp/gluegen/nativesig/NativeSignatureJavaMethodBindingEmitter.java +src/java/com/sun/gluegen/opengl/BuildComposablePipeline.java +src/java/com/sun/gluegen/opengl/BuildStaticGLInfo.java +src/java/com/sun/gluegen/opengl/GLConfiguration.java +src/java/com/sun/gluegen/opengl/GLEmitter.java +src/java/com/sun/gluegen/opengl/GLJavaMethodBindingEmitter.java +---> + + |