source: trunk/test/check_repo_status.sh.in @ 570

Last change on this file since 570 was 570, checked in by Peter Johansson, 14 years ago

fixing issues when builddir!=srcdir

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
RevLine 
[568]1#!@SHELL@
2# @configure_input@
3
[328]4# $Id: check_repo_status.sh.in 570 2008-03-14 15:12:40Z peter $
5
[492]6# Copyright (C) 2007 Jari Häkkinen, Peter Johansson
[570]7# Copyright (C) 2008 Peter Johansson
[328]8#
[519]9# This file is part of svndigest, http://trac.thep.lu.se/svndigest
[328]10#
11# svndigest is free software; you can redistribute it and/or modify it
12# under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# svndigest is distributed in the hope that it will be useful, but
17# WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24# 02111-1307, USA.
25
26# assume test repository and svndigest repository are synchronized
27repository_status=1
28
29# retrieve last revision in test repository
[570]30rev=`cat @srcdir@/repo/db/current`
[328]31rev=${rev%% *}
32
33# check if the last test revision is a part of the svndigest repository
[570]34status_return=`svn status -v @srcdir@/repo/db/revs/$rev`
[328]35# logic: (file does not exist) || (file exists but not in revision control)
36if [[ ${#status_return} -eq 0 || ${status_return:0:1} = "?" ]]; then
37    repository_status=0
38    echo "ERROR: test repository and svndigest repository are not synchronized:"
39    echo "ERROR: test repository has entries not added to svndigest repository"
40    echo "ERROR:"
41    echo "ERROR: Please resolve issues before committing to svndigest repository"
42    echo "ERROR: test revision(s) needs to be added the svndigest repository."
43    echo "ERROR:"
44    echo "ERROR: Issue these commands:"
45fi
46
47# loop until a test repository revision that is a part of svndigest
48# repository is found, or break the test repository revision 0 is
49# reached.
50while [[ ${#status_return} -eq 0 || ${status_return:0:1} = "?" ]] && [ $rev -ge 0 ]; do
51    echo "ERROR:    svn add test/repo/db/revs/$rev test/repo/db/revprops/$rev"
52    let rev--
[570]53    status_return=`svn status -v @srcdir@/repo/db/revs/$rev`
[328]54done
55
56if [ $repository_status -eq 0 ]; then
57    exit -1;    # test failed.
58fi
Note: See TracBrowser for help on using the repository browser.