forked from Gnucash/gnucash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up some obsolete tools and references to non-git vcs's
- Loading branch information
Showing
11 changed files
with
6 additions
and
474 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
# With -t prints the vcs type that was detected to stdout and exits 0 | ||
# on success. | ||
# | ||
# Exits with errorcode 1 if we're not in an bzr, svn, svk or git checkout | ||
# Exits with errorcode 1 if we're not in a git work tree | ||
# | ||
# Written By: Derek Atkins <[email protected]> | ||
# Updated By: Geert Janssens <[email protected]> | ||
|
@@ -33,9 +33,9 @@ if [ "$BUILDING_FROM_VCS" = "0" -o \ | |
"$BUILDING_FROM_VCS" = "no" -o \ | ||
"$BUILDING_FROM_VCS" = "false" ]; then | ||
# Something outside of the Gnucash build system knows that we | ||
# are NOT building from svn, svk or git checkout. | ||
# are NOT building from a git work tree. | ||
# We should believe it (needed by packagers that maintain the | ||
# packaging code in svn, svk or git too) | ||
# packaging code in git too) | ||
echo "Environment variable BUILDING_FROM_VCS=$BUILDING_FROM_VCS" >&2 | ||
exit 1 | ||
fi | ||
|
@@ -72,39 +72,7 @@ else | |
real_srcdir="$srcdir" | ||
fi | ||
|
||
# Test if this code is an SVN Checkout | ||
# If this is an svn checkout we assume you have svnversion! | ||
if test -d "${real_srcdir}"/.svn | ||
then | ||
# If we're only interested in the vcs type, then we're done here | ||
if [ "$request" = "type" ] | ||
then | ||
echo "svn" | ||
exit 0 | ||
fi | ||
|
||
if [ "$request" = "date" ] | ||
then | ||
echo $(svn info "$real_srcdir}" | awk '/Last Changed Date/ { print $4 }') | ||
exit 0 | ||
fi | ||
|
||
# svnversion without options returns the most recent revision in the repo | ||
# at the time of the last svn update/checkout even if that revision | ||
# didn't hold any changes in the current path. Not very useful as a | ||
# reference. Better is to ask for the last changed revision with -c. | ||
# BUT: -c option for some reason always considers svn working copy | ||
# as having mixed sources. We're only interested in the last part so | ||
# we strip the beginning revision if it's there. | ||
# As a result if your WC really has mixed sources, that will not be | ||
# visible in the version number... | ||
svn_mixed_version=$(svnversion -c "$real_srcdir") | ||
echo ${svn_mixed_version#*:} | ||
exit $? | ||
fi | ||
|
||
# If we get here then this is NOT an svn checkout. | ||
# Maybe it's git? | ||
# Test if this code is in a git worktree | ||
real_gitdir="${real_srcdir}"/.git | ||
if test -d "${real_gitdir}" || test -e "${real_gitdir}" | ||
then | ||
|
@@ -145,73 +113,6 @@ then | |
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if test -d "${real_srcdir}"/.bzr ; | ||
then | ||
# If we're only interested in the vcs type, then we're done here | ||
if [ "$request" = "type" ] | ||
then | ||
echo "bzr" | ||
exit 0 | ||
fi | ||
|
||
if [ "$request" = "date" ] | ||
then | ||
# FIXME Don't know how to extract the commit's date from a bzr commit... | ||
echo $(date +%Y-%m-%d) | ||
exit 0 | ||
fi | ||
|
||
bzrhead=`(cd "${real_srcdir}"; bzr version-info --custom --template='{revno}\n')` | ||
if test $? = 0 ; then | ||
echo "$bzrhead"; | ||
exit 0 | ||
else | ||
exit 1 | ||
fi | ||
fi | ||
|
||
if test $OSTYPE -a $OSTYPE = "msys"; | ||
then | ||
svk_name="svk.bat" | ||
svk_cmd="cmd \/c svk" | ||
else | ||
svk_name="svk" | ||
svk_cmd="svk" | ||
fi | ||
|
||
# Maybe it's SVK? First, check if we've got 'svk' in the path. If not, | ||
# then exit with an error code of 1.. | ||
which $svk_name >/dev/null 2>&1 | ||
if test $? != 0 ; then exit 1 ; fi | ||
|
||
# Okay, we have 'svk'. Now see if $real_srcdir is an svk checkout | ||
# Note that the 'echo n' is to protect against having svk installed | ||
# without having configured the depotmap. | ||
svkinfo=`echo n | $svk_cmd info "$real_srcdir" 2>&1` | ||
if test $? != 0 ; then exit 1 ; fi | ||
|
||
# If we got here, then $real_srcdir is an svk checkout. | ||
# If we're only interested in the vcs type, then we're done here | ||
if [ "$request" = "type" ] | ||
then | ||
echo "svk" | ||
exit 0 | ||
fi | ||
|
||
if [ "$request" = "date" ] | ||
then | ||
# FIXME Don't know how to extract the commit's date from an svk commit... | ||
echo $(date +%Y-%m-%d) | ||
exit 0 | ||
exit 1 | ||
fi | ||
|
||
|
||
# Parse out the revision info, print it out, and then output 0. Just combine | ||
# all the revision numbers into a single string by combining them | ||
# with periods. | ||
svkinfo=`$svk_cmd info "$real_srcdir" | grep Rev | head -5 | sed -e 's/^.* \([0-9:]*\)$/\1/'` | ||
echo $svkinfo | sed -e 's/ /./g' | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.