Merge lp:~verterok/ols-jenkaas/detect-changes-on-git-heads-take-2 into lp:~ols-jenkaas-admins/ols-jenkaas/trunk

Proposed by Guillermo Gonzalez
Status: Rejected
Rejected by: Guillermo Gonzalez
Proposed branch: lp:~verterok/ols-jenkaas/detect-changes-on-git-heads-take-2
Merge into: lp:~ols-jenkaas-admins/ols-jenkaas/trunk
Diff against target: 25 lines (+6/-2)
1 file modified
project/detect-changes (+6/-2)
To merge this branch: bzr merge lp:~verterok/ols-jenkaas/detect-changes-on-git-heads-take-2
Reviewer Review Type Date Requested Status
Online Services Jenkaas Administrators Pending
Review via email: mp+343198@code.launchpad.net

Commit message

same as before, but if the old_tip doesn't match current HEAD, overrite it with current tip.

Description of the change

same as before, but if the old_tip doesn't match current HEAD, overrite it with current tip.

To post a comment you must log in.
Revision history for this message
Adam Collard (adam-collard) wrote :

Guillermo and I talked and agreed that https://code.launchpad.net/~adam-collard/ols-jenkaas/better-git-changes/+merge/343199 was a better approach

Unmerged revisions

579. By Guillermo Gonzalez

same as before, but if the old_tip doesn't match current HEAD, overrite it with current tip.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project/detect-changes'
2--- project/detect-changes 2018-04-13 13:31:06 +0000
3+++ project/detect-changes 2018-04-13 13:54:12 +0000
4@@ -11,6 +11,10 @@
5 VCS=$1
6 TRUNK=$2
7 JOB_NAME=$3
8+REFS="HEAD"
9+if [ "$4" != "" ]; then
10+ REFS=refs/heads/$4
11+fi
12
13 # To get JENKINS_URL
14 . /etc/default/jenkins-slave
15@@ -45,8 +49,8 @@
16 if [ "${VCS}" = "bzr" ] ; then
17 bzr version-info --custom --template ${INFO} "{revision_id}" ${TRUNK} > ${TIP}
18 else
19- # FIXME: Assuming 'master' -- vila 2016-11-28
20- git ls-remote ${TRUNK} refs/heads/master > ${TIP}
21+ git ls-remote ${TRUNK} $REFS > ${TIP}
22+ grep $REFS ${OLD_TIP} || cp ${TIP} ${OLD_TIP}
23 fi
24
25 # Succeed if a new tip appears

Subscribers

People subscribed via source and target branches