summaryrefslogblamecommitdiff
path: root/edit_changelog_sarge.py
blob: 3772a36637247e72c1ce063b0f535401cd574f17 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                 
                                                            
                                               
                          
 
                         



                                                      
                         

                              
                                                                                           
 
                                              
                                                
                                               

                                  
                                                              


                         
                                                                     

                                                                                                  

                         


                               
#!/usr/bin/python
# SVN: $Id: edit_changelog.py 5 2006-12-20 14:08:52Z ranke $
# Author: Johannes Ranke <jranke@uni-bremen.de>
# Last Change: 2007 Feb 05

from time import strftime
from debian_bundle.changelog import Changelog, Version

author = 'Johannes Ranke <jranke@uni-bremen.de>'

chlg = "debian/changelog"
content = file(chlg).read()
changelog = Changelog(content)
newVersion = changelog.upstream_version  + "-" + changelog.debian_version  + "~sargecran.1"

changelog.new_block(package=changelog.package,
                    version=Version(newVersion),
                    distributions='sarge-cran',
                    urgency='low',
                    author=author,
                    date=strftime("%a, %e %b %Y %H:%M:%S %z"),
                    )

changelog.add_change('');
changelog.add_change('  * Backport to sarge for repository on CRAN');
changelog.add_change('  * Also replaces r-recommended (= 2.4.0-0sarge2) for smooth upgrade from');
changelog.add_change('    earlier backport by Christian Steigies');
changelog.add_change('');

f = open(chlg, 'w')
changelog.write_to_open_file(f)
f.close()

Contact - Imprint