mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-26 04:02:11 +01:00
support of added .changes in commit message template
This commit is contained in:
parent
004ca3cafe
commit
af5259b387
3
NEWS
3
NEWS
@ -1,3 +1,6 @@
|
||||
0.118:
|
||||
- support of added .changes in commit message template
|
||||
|
||||
0.117:
|
||||
- support checkout of single package via "osc co PACKAGE" when local dir is project
|
||||
- allow to specify target project and package on osc branch (requires server version 1.6)
|
||||
|
10
osc/core.py
10
osc/core.py
@ -3695,14 +3695,20 @@ def get_commit_message_template(pac):
|
||||
return template
|
||||
|
||||
for file in files:
|
||||
diff += get_source_file_diff(pac.absdir, file, pac.rev)
|
||||
if pac.status(file) == 'M':
|
||||
diff += get_source_file_diff(pac.absdir, file, pac.rev)
|
||||
elif pac.status(file) == 'A':
|
||||
f = open(file, 'r')
|
||||
for line in f:
|
||||
diff += '+' + line
|
||||
f.close()
|
||||
|
||||
if diff:
|
||||
index = 0
|
||||
diff = diff.split('\n')
|
||||
|
||||
# The first four lines contains a header of diff
|
||||
for line in diff[4:]:
|
||||
for line in diff[3:]:
|
||||
# this condition is magical, but it removes all unwanted lines from commit message
|
||||
if not(line) or (line and line[0] != '+') or \
|
||||
date_re.match(line) or \
|
||||
|
Loading…
x
Reference in New Issue
Block a user