Created
August 7, 2010 07:31
-
-
Save kamawanu/512557 to your computer and use it in GitHub Desktop.
svn & mercurial scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -x | |
#svnadmin create file:$PWD/$( basename $1 ) | |
URL1=$( echo $1 | sed -e 's/\/trunk\///' ) | |
NAMING=$( echo $URL1 | sed -e 's/\/\/*/\//g;s/\/$//' | rev | cut -d/ -f1-2 | rev | tr / _ ) | |
echo $URL1 | |
echo $NAMING | |
###exit | |
NAMING=SVFS-$NAMING | |
svnadmin create $NAMING | |
( echo "#!/bin/sh" ; echo exit 0 ) > $NAMING/hooks/pre-revprop-change | |
chmod +x $NAMING/hooks/pre-revprop-change | |
svnsync init file://$PWD/$NAMING/ $URL1 | |
svnsync sync file://$PWD/$NAMING | |
hg convert $NAMING |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment