projects
/
mdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e1a686
)
Use longer hashes when generating compare URLs. Fixes #120
author
Frederic Massart
<fred@moodle.com>
Tue, 26 Jul 2016 07:31:15 +0000
(15:31 +0800)
committer
Frederic Massart
<fred@moodle.com>
Tue, 26 Jul 2016 07:31:15 +0000
(15:31 +0800)
mdk/moodle.py
patch
|
blob
|
history
diff --git
a/mdk/moodle.py
b/mdk/moodle.py
index
16fde31
..
92513be
100644
(file)
--- a/
mdk/moodle.py
+++ b/
mdk/moodle.py
@@
-254,7
+254,7
@@
class Moodle(object):
try:
# Trying to smart guess the last commit needed
if smartSearch:
try:
# Trying to smart guess the last commit needed
if smartSearch:
- commits = self.git().log(since=branch, count=C.get('smartHeadCommitLimit'), format='%s_____%
h
').split('\n')[:-1]
+ commits = self.git().log(since=branch, count=C.get('smartHeadCommitLimit'), format='%s_____%
H
').split('\n')[:-1]
# Looping over the last commits to find the commit messages that match the MDL-12345.
candidate = None
# Looping over the last commits to find the commit messages that match the MDL-12345.
candidate = None
@@
-273,7
+273,7
@@
class Moodle(object):
if not headcommit:
upstreamremote = C.get('upstreamRemote')
stablebranch = self.get('stablebranch')
if not headcommit:
upstreamremote = C.get('upstreamRemote')
stablebranch = self.get('stablebranch')
- headcommit = self.git().hashes(ref='%s/%s' % (upstreamremote, stablebranch), limit=1, format='%
h
')[0]
+ headcommit = self.git().hashes(ref='%s/%s' % (upstreamremote, stablebranch), limit=1, format='%
H
')[0]
except GitException:
logging.warning('Could not resolve the head commit')
except GitException:
logging.warning('Could not resolve the head commit')
@@
-749,7
+749,7
@@
class Moodle(object):
logging.info('Searching for the head commit...')
if ref:
try:
logging.info('Searching for the head commit...')
if ref:
try:
- headcommit = self.git().hashes(ref=ref, limit=1, format='%
h
')[0]
+ headcommit = self.git().hashes(ref=ref, limit=1, format='%
H
')[0]
except GitException:
logging.warning('Could not resolve a head commit using the reference: %s' % (ref))
headcommit = None
except GitException:
logging.warning('Could not resolve a head commit using the reference: %s' % (ref))
headcommit = None
@@
-763,6
+763,7
@@
class Moodle(object):
logging.error('Head commit not resolved, aborting update of tracker fields')
return False
logging.error('Head commit not resolved, aborting update of tracker fields')
return False
+ headcommit = headcommit[:10]
logging.debug('Head commit resolved to %s' % (headcommit))
J = Jira()
logging.debug('Head commit resolved to %s' % (headcommit))
J = Jira()