Blame Scripts/Bash/Functions/Vcs/Subversion/subversion.sh

3b9515
#!/bin/bash
3b9515
#
3b9515
# subversion.sh -- This function standardizes Subversion tasks inside
3b9515
# the repository.
3b9515
#
e6bbbf
# Copyright (C) 2009-2013 The CentOS Project
3b9515
#
3b9515
# This program is free software; you can redistribute it and/or modify
3b9515
# it under the terms of the GNU General Public License as published by
3b9515
# the Free Software Foundation; either version 2 of the License, or (at
3b9515
# your option) any later version.
3b9515
#
3b9515
# This program is distributed in the hope that it will be useful, but
3b9515
# WITHOUT ANY WARRANTY; without even the implied warranty of
3b9515
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3b9515
# General Public License for more details.
3b9515
#
3b9515
# You should have received a copy of the GNU General Public License
3b9515
# along with this program; if not, write to the Free Software
3b9515
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3b9515
#
3b9515
# ----------------------------------------------------------------------
3b9515
# $Id$
3b9515
# ----------------------------------------------------------------------
3b9515
3b9515
function subversion {
3b9515
3b9515
    # Redefine positional parameters using ARGUMENTS. At this point,
3b9515
    # option arguments have been removed from ARGUMENTS variable and
3b9515
    # only non-option arguments remain in it. 
3b9515
    eval set -- "$ARGUMENTS"
3b9515
3b9515
    # Don't realize action value verification here. There are actions
3b9515
    # like `copy' and `rename' that require two arguments from which
3b9515
    # the last one doesn't exist at the moment of executing the
3b9515
    # command. This will provoke the second action value verification
3b9515
    # to fail when indeed is should not. Thus, go to action names
3b9515
    # processing directly.
3b9515
3b9515
    # Execute action names. This is required in order to realize
3b9515
    # actions like copy and rename which need two values as argument.
3b9515
    # Otherwise, it wouldn't be possible to execute them because
3b9515
    # action values would be processed one a time. Thus, lets work
3b9515
    # with `$@' instead.
3b9515
    for ACTIONNAM in $ACTIONNAMS;do
3b9515
        $ACTIONNAM "$@"
3b9515
    done
3b9515
3b9515
}