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

b7dc9d
#!/bin/bash
b7dc9d
#
3b9515
# subversion_deleteRepoFile.sh -- This function standardizes the way
b7dc9d
# centos-art.sh script deletes files and directories inside the
b7dc9d
# working copy.
b7dc9d
#
b7dc9d
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
b7dc9d
#
b7dc9d
# This program is free software; you can redistribute it and/or modify
b7dc9d
# it under the terms of the GNU General Public License as published by
b7dc9d
# the Free Software Foundation; either version 2 of the License, or (at
b7dc9d
# your option) any later version.
b7dc9d
#
b7dc9d
# This program is distributed in the hope that it will be useful, but
b7dc9d
# WITHOUT ANY WARRANTY; without even the implied warranty of
b7dc9d
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b7dc9d
# General Public License for more details.
b7dc9d
#
b7dc9d
# You should have received a copy of the GNU General Public License
b7dc9d
# along with this program; if not, write to the Free Software
b7dc9d
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
b7dc9d
#
b7dc9d
# ----------------------------------------------------------------------
b7dc9d
# $Id$
b7dc9d
# ----------------------------------------------------------------------
b7dc9d
3b9515
function subversion_deleteRepoFile {
b7dc9d
b7dc9d
    local TARGET=$(cli_checkRepoDirSource ${1})
b7dc9d
b7dc9d
    # Print action reference.
b7dc9d
    cli_printMessage "${TARGET}" --as-deleting-line
b7dc9d
875c88
    # Verify target existence. Be sure it is under version control.
875c88
    cli_checkFiles "${TARGET}" --is-versioned
b7dc9d
b7dc9d
    # Revert changes before deleting related files.
3b9515
    ${COMMAND} revert ${TARGET} --quiet --recursive
b7dc9d
b7dc9d
    # Delete source location.
3b9515
    ${COMMAND} delete ${TARGET} --quiet --force
b7dc9d
b7dc9d
}