Changeset 3414 for trunk/UTIL
- Timestamp:
- Aug 21, 2024, 3:46:56 PM (4 months ago)
- Location:
- trunk/UTIL
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTIL/git_init.sh
r3413 r3414 1 # Script to initialize the git repository from a svn repo 2 # WARNING: we assume the svn and the git to be up-to-date 1 # Script to initialize the git repository and link it to the svn. 2 # The synchronization requires two pushes 3 # (1st push=svn dcommit, 2nd push=git push) 4 # WARNING: we assume the svn and the git are up-to-date 5 SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) 6 cd ${SCRIPT_DIR}/.. 3 7 4 8 echo "WARNING: this script will setup the git repo" … … 24 28 # (need git-svn to work) 25 29 git svn init https://svn.lmd.jussieu.fr/Planeto/trunk 26 GITSVN=$?27 if [ $GITSVN != 0 ]28 then29 printf "${RED}Error with git-svn init.${NC}\n"30 printf "${RED}Please check if git-svn is installed.${NC}\n"31 exit $GITSVN32 fi33 30 34 31 git update-ref refs/remotes/git-svn refs/remotes/origin/master … … 37 34 # install pre-push hook to ensure 38 35 # users push only commits in sync with svn 36 39 37 ln UTIL/pre-push .git/hooks -
trunk/UTIL/pre-push
r3413 r3414 55 55 GITSVN=$(git rev-parse git-svn) 56 56 echo "local is at $HEAD" 57 echo "svn is 58 at $GITSVN" 57 echo "svn is at $GITSVN" 59 58 if [ "$HEAD" != "$GITSVN" ] # check if dcommit changed hashes 60 59 then
Note: See TracChangeset
for help on using the changeset viewer.