cmd = ['/usr/bin/git', 'commit', '-a', '-m', 'add new changelog entry']
subprocess.check_call(cmd)
- # let me see the whole changelog now:
+ # let me see the first two changelog entries:
+ counter=0
for line in fileinput.input('debian/changelog'):
- print('debian/changelog: %s' %(line.strip()))
+ if line.startswith(' --'):
+ counter+=1
+ if counter<3:
+ print('debian/changelog: %s' %(line.strip()))
# set pb_suite which GitBuildPackage() will turn into PB_SUITE
# if we wrote a changelog entry, use that one