Skip to content

Commit fbb08c9

Browse files
committed
Clean up some obsolete tools and references to non-git vcs's
1 parent bd6e79b commit fbb08c9

11 files changed

+6
-474
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ gnucash/gnome/gnucash
150150
gnucash/gnome/gnucash.desktop
151151
gnucash/gnome/gnucash.desktop.in
152152
gnucash/gnome-utils/gnucash
153-
gnucash/gnome-utils/gnc-svninfo.h
154153
gnucash/gnome-utils/gnc-version.h
155154
gnucash/gnome-utils/gnucash
156155
gnucash/gnome-utils/test/test-gnc-dialog

gnucash/gnucash-core-app.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static QofLogModule log_module = GNC_MOD_GUI;
5959
#include <locale.h>
6060
#include <gnc-locale-utils.hpp>
6161

62-
/* GNC_VCS is defined whenever we're building from an svn/svk/git/bzr tree */
62+
/* GNC_VCS is defined whenever we're building from a git work tree */
6363
#ifdef GNC_VCS
6464
constexpr int is_development_version = TRUE;
6565
#else

util/git-backport.sh

-30
This file was deleted.

util/glade-fixup

-38
This file was deleted.

util/gnc-vcs-info

+5-104
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# With -t prints the vcs type that was detected to stdout and exits 0
1111
# on success.
1212
#
13-
# Exits with errorcode 1 if we're not in an bzr, svn, svk or git checkout
13+
# Exits with errorcode 1 if we're not in a git work tree
1414
#
1515
# Written By: Derek Atkins <[email protected]>
1616
# Updated By: Geert Janssens <[email protected]>
@@ -33,9 +33,9 @@ if [ "$BUILDING_FROM_VCS" = "0" -o \
3333
"$BUILDING_FROM_VCS" = "no" -o \
3434
"$BUILDING_FROM_VCS" = "false" ]; then
3535
# Something outside of the Gnucash build system knows that we
36-
# are NOT building from svn, svk or git checkout.
36+
# are NOT building from a git work tree.
3737
# We should believe it (needed by packagers that maintain the
38-
# packaging code in svn, svk or git too)
38+
# packaging code in git too)
3939
echo "Environment variable BUILDING_FROM_VCS=$BUILDING_FROM_VCS" >&2
4040
exit 1
4141
fi
@@ -72,39 +72,7 @@ else
7272
real_srcdir="$srcdir"
7373
fi
7474

75-
# Test if this code is an SVN Checkout
76-
# If this is an svn checkout we assume you have svnversion!
77-
if test -d "${real_srcdir}"/.svn
78-
then
79-
# If we're only interested in the vcs type, then we're done here
80-
if [ "$request" = "type" ]
81-
then
82-
echo "svn"
83-
exit 0
84-
fi
85-
86-
if [ "$request" = "date" ]
87-
then
88-
echo $(svn info "$real_srcdir}" | awk '/Last Changed Date/ { print $4 }')
89-
exit 0
90-
fi
91-
92-
# svnversion without options returns the most recent revision in the repo
93-
# at the time of the last svn update/checkout even if that revision
94-
# didn't hold any changes in the current path. Not very useful as a
95-
# reference. Better is to ask for the last changed revision with -c.
96-
# BUT: -c option for some reason always considers svn working copy
97-
# as having mixed sources. We're only interested in the last part so
98-
# we strip the beginning revision if it's there.
99-
# As a result if your WC really has mixed sources, that will not be
100-
# visible in the version number...
101-
svn_mixed_version=$(svnversion -c "$real_srcdir")
102-
echo ${svn_mixed_version#*:}
103-
exit $?
104-
fi
105-
106-
# If we get here then this is NOT an svn checkout.
107-
# Maybe it's git?
75+
# Test if this code is in a git worktree
10876
real_gitdir="${real_srcdir}"/.git
10977
if test -d "${real_gitdir}" || test -e "${real_gitdir}"
11078
then
@@ -145,73 +113,6 @@ then
145113
else
146114
exit 1
147115
fi
148-
fi
149-
150-
if test -d "${real_srcdir}"/.bzr ;
151-
then
152-
# If we're only interested in the vcs type, then we're done here
153-
if [ "$request" = "type" ]
154-
then
155-
echo "bzr"
156-
exit 0
157-
fi
158-
159-
if [ "$request" = "date" ]
160-
then
161-
# FIXME Don't know how to extract the commit's date from a bzr commit...
162-
echo $(date +%Y-%m-%d)
163-
exit 0
164-
fi
165-
166-
bzrhead=`(cd "${real_srcdir}"; bzr version-info --custom --template='{revno}\n')`
167-
if test $? = 0 ; then
168-
echo "$bzrhead";
169-
exit 0
170-
else
171-
exit 1
172-
fi
173-
fi
174-
175-
if test $OSTYPE -a $OSTYPE = "msys";
176-
then
177-
svk_name="svk.bat"
178-
svk_cmd="cmd \/c svk"
179116
else
180-
svk_name="svk"
181-
svk_cmd="svk"
182-
fi
183-
184-
# Maybe it's SVK? First, check if we've got 'svk' in the path. If not,
185-
# then exit with an error code of 1..
186-
which $svk_name >/dev/null 2>&1
187-
if test $? != 0 ; then exit 1 ; fi
188-
189-
# Okay, we have 'svk'. Now see if $real_srcdir is an svk checkout
190-
# Note that the 'echo n' is to protect against having svk installed
191-
# without having configured the depotmap.
192-
svkinfo=`echo n | $svk_cmd info "$real_srcdir" 2>&1`
193-
if test $? != 0 ; then exit 1 ; fi
194-
195-
# If we got here, then $real_srcdir is an svk checkout.
196-
# If we're only interested in the vcs type, then we're done here
197-
if [ "$request" = "type" ]
198-
then
199-
echo "svk"
200-
exit 0
201-
fi
202-
203-
if [ "$request" = "date" ]
204-
then
205-
# FIXME Don't know how to extract the commit's date from an svk commit...
206-
echo $(date +%Y-%m-%d)
207-
exit 0
117+
exit 1
208118
fi
209-
210-
211-
# Parse out the revision info, print it out, and then output 0. Just combine
212-
# all the revision numbers into a single string by combining them
213-
# with periods.
214-
svkinfo=`$svk_cmd info "$real_srcdir" | grep Rev | head -5 | sed -e 's/^.* \([0-9:]*\)$/\1/'`
215-
echo $svkinfo | sed -e 's/ /./g'
216-
217-
exit 0

util/src-count/count.dat

-33
This file was deleted.

util/src-count/count.gplot

-26
This file was deleted.

0 commit comments

Comments
 (0)