Skip to content

Commit

Permalink
Clean up some obsolete tools and references to non-git vcs's
Browse files Browse the repository at this point in the history
  • Loading branch information
gjanssens committed Jun 8, 2024
1 parent bd6e79b commit fbb08c9
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 474 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ gnucash/gnome/gnucash
gnucash/gnome/gnucash.desktop
gnucash/gnome/gnucash.desktop.in
gnucash/gnome-utils/gnucash
gnucash/gnome-utils/gnc-svninfo.h
gnucash/gnome-utils/gnc-version.h
gnucash/gnome-utils/gnucash
gnucash/gnome-utils/test/test-gnc-dialog
Expand Down
2 changes: 1 addition & 1 deletion gnucash/gnucash-core-app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static QofLogModule log_module = GNC_MOD_GUI;
#include <locale.h>
#include <gnc-locale-utils.hpp>

/* GNC_VCS is defined whenever we're building from an svn/svk/git/bzr tree */
/* GNC_VCS is defined whenever we're building from a git work tree */
#ifdef GNC_VCS
constexpr int is_development_version = TRUE;
#else
Expand Down
30 changes: 0 additions & 30 deletions util/git-backport.sh

This file was deleted.

38 changes: 0 additions & 38 deletions util/glade-fixup

This file was deleted.

109 changes: 5 additions & 104 deletions util/gnc-vcs-info
Original file line number Diff line number Diff line change
Expand Up @@ -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]>
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
33 changes: 0 additions & 33 deletions util/src-count/count.dat

This file was deleted.

26 changes: 0 additions & 26 deletions util/src-count/count.gplot

This file was deleted.

Loading

0 comments on commit fbb08c9

Please sign in to comment.