Adding support for perforce vcs.
This commit is contained in:
@@ -349,6 +349,17 @@ function is_in_svn() {
|
|||||||
echo false
|
echo false
|
||||||
fi
|
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).
|
# Add a file to the repo (but don't commit it).
|
||||||
@@ -367,6 +378,10 @@ function vcs_add_git() {
|
|||||||
function vcs_add_svn() {
|
function vcs_add_svn() {
|
||||||
svn add --parents """$@"""
|
svn add --parents """$@"""
|
||||||
}
|
}
|
||||||
|
# Perfoce
|
||||||
|
function vcs_add_p4() {
|
||||||
|
p4 add """$@"""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Commit a file to the repo
|
# Commit a file to the repo
|
||||||
@@ -385,6 +400,10 @@ function vcs_commit_git() {
|
|||||||
function vcs_commit_svn() {
|
function vcs_commit_svn() {
|
||||||
svn commit -m"""$@"""
|
svn commit -m"""$@"""
|
||||||
}
|
}
|
||||||
|
# Perforce
|
||||||
|
function vcs_commit_p4() {
|
||||||
|
p4 submit -d """$@"""
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Remove file from repo, even if it was deleted locally already.
|
# Remove file from repo, even if it was deleted locally already.
|
||||||
@@ -404,3 +423,7 @@ function vcs_remove_git() {
|
|||||||
function vcs_remove_svn() {
|
function vcs_remove_svn() {
|
||||||
svn delete """$@"""
|
svn delete """$@"""
|
||||||
}
|
}
|
||||||
|
# Perforce
|
||||||
|
function vcs_remove_svn() {
|
||||||
|
p4 delete """$@"""
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user