2 # Copyright (c) 2007 David Soria Parra <dsp at php dot net>
4 # Licensed under the terms of the MIT License
5 # See /usr/share/doc/gcutils/copyright
6 # or http://www.opensource.org/licenses/mit-license.php
12 echo "Usage:" `basename $0`" [OPTIONS] <sha1>"
15 echo " -C run a cvsclean. "
16 echo " WARNING: this will run cvs up -C"
17 echo " and then remove all found .#* files"
18 echo " -c commit to cvs if no errors occured"
19 echo " -f force patching in case of an unclean"
20 echo " cvs repository"
21 echo " -V show version information"
51 echo >&2 "Parameter $1 is not known."
67 if test ! ".cvs" -o ! -d ".cvs/CVS/"
69 echo >&2 "CVS working directory not found."
70 die
"Make sure you imported your CVS repository using gc-import."
73 if test "$cvsclean" = "t"
75 (cd ".cvs" && cvs up
-C && find .
-iname ".#*" -exec rm '{}' \
;)
78 if test -d ".git" -a -d ".cvs"
81 GIT_DIR
="../.git" git-cvsexportcommit
-v $force $commit -u $1
85 die
"Not a git repository"
90 echo >&2 "No cvs repository found in .cvs. "
91 die
"Make sure you follow the standards"