Changeset 3414 for trunk/UTIL


Ignore:
Timestamp:
Aug 21, 2024, 3:46:56 PM (4 months ago)
Author:
afalco
Message:

git init in UTIL/ dir + README. AF

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
     5SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
     6cd ${SCRIPT_DIR}/..
    37
    48echo "WARNING: this script will setup the git repo"
     
    2428# (need git-svn to work)
    2529git svn init https://svn.lmd.jussieu.fr/Planeto/trunk
    26 GITSVN=$?
    27 if [ $GITSVN != 0 ]
    28 then
    29     printf "${RED}Error with git-svn init.${NC}\n"
    30     printf "${RED}Please check if git-svn is installed.${NC}\n"
    31     exit $GITSVN
    32 fi
    3330
    3431git update-ref refs/remotes/git-svn refs/remotes/origin/master
     
    3734# install pre-push hook to ensure
    3835# users push only commits in sync with svn
     36
    3937ln UTIL/pre-push .git/hooks
  • trunk/UTIL/pre-push

    r3413 r3414  
    5555GITSVN=$(git rev-parse git-svn)
    5656echo "local is at $HEAD"
    57 echo "svn   is
    58  at $GITSVN"
     57echo "svn   is at $GITSVN"
    5958if [ "$HEAD" != "$GITSVN" ] # check if dcommit changed hashes
    6059then
Note: See TracChangeset for help on using the changeset viewer.