This commit is contained in:
tlimoncelli@stackexchange.com
2015-04-01 11:41:06 -04:00
2 changed files with 28 additions and 4 deletions

View File

@@ -349,6 +349,17 @@ function is_in_svn() {
echo false
fi
}
# Perforce
function is_in_p4() {
local filename
filename="$1"
if p4 list "$filename" ; then
echo true
else
echo false
fi
}
# Add a file to the repo (but don't commit it).
@@ -367,6 +378,10 @@ function vcs_add_git() {
function vcs_add_svn() {
svn add --parents """$@"""
}
# Perfoce
function vcs_add_p4() {
p4 add """$@"""
}
# Commit a file to the repo
@@ -385,6 +400,10 @@ function vcs_commit_git() {
function vcs_commit_svn() {
svn commit -m"""$@"""
}
# Perforce
function vcs_commit_p4() {
p4 submit -d """$@"""
}
# Remove file from repo, even if it was deleted locally already.
@@ -404,3 +423,7 @@ function vcs_remove_git() {
function vcs_remove_svn() {
svn delete """$@"""
}
# Perforce
function vcs_remove_svn() {
p4 delete """$@"""
}