summaryrefslogtreecommitdiff
path: root/t/lib-git-p4.sh
diff options
context:
space:
mode:
authorJan Durovec <jan.durovec@gmail.com>2016-04-19 19:49:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-04-19 20:41:00 (GMT)
commit26e6a27d6965c9c5ee4f59ae9a97cef893b52686 (patch)
tree344a17b938461d9e8bfd85475ba8d0759f45b035 /t/lib-git-p4.sh
parenta98772c63fa666e9239b0cdbd790daf7af503b75 (diff)
downloadgit-26e6a27d6965c9c5ee4f59ae9a97cef893b52686.zip
git-26e6a27d6965c9c5ee4f59ae9a97cef893b52686.tar.gz
git-26e6a27d6965c9c5ee4f59ae9a97cef893b52686.tar.bz2
git-p4: add P4 jobs to git commit message
When migrating from Perforce to git the information about P4 jobs associated with P4 changelists is lost. Having these jobs listed on messages of related git commits enables smooth migration for projects that take advantage of e.g. JIRA integration (which uses jobs on Perforce side and parses commit messages on git side). The jobs are added to the message in the same format as is expected when migrating in the reverse direction. Signed-off-by: Jan Durovec <jan.durovec@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-git-p4.sh')
-rw-r--r--t/lib-git-p4.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/lib-git-p4.sh b/t/lib-git-p4.sh
index 0e59fd1..ce3536e 100644
--- a/t/lib-git-p4.sh
+++ b/t/lib-git-p4.sh
@@ -160,6 +160,15 @@ p4_add_user () {
EOF
}
+p4_add_job () {
+ p4 job -f -i <<-EOF
+ Job: $1
+ Status: open
+ User: dummy
+ Description:
+ EOF
+}
+
retry_until_success () {
timeout=$(($(time_in_seconds) + $RETRY_TIMEOUT))
until "$@" 2>/dev/null || test $(time_in_seconds) -gt $timeout