summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b>2006-12-15 23:43:18 +0000
committerranke <ranke@f247ebf9-aa24-0410-a698-f940e971ad2b>2006-12-15 23:43:18 +0000
commit320f139b4cdb92361e45947ffbe15d69b5b61e62 (patch)
treea0a26caf953ed18a5833585c476257dfe1f4adc2
parente811fbc3d227fc704004e94d0cb70f7575f21e65 (diff)
First trials with Python and debian_bundle.Changelog()
git-svn-id: svn+ssh://stiller/home/schatz/reps/r-backports@2 f247ebf9-aa24-0410-a698-f940e971ad2b
-rw-r--r--edit_changelogs.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/edit_changelogs.py b/edit_changelogs.py
index 15b85fc..e5929af 100644
--- a/edit_changelogs.py
+++ b/edit_changelogs.py
@@ -1,22 +1,28 @@
#!/usr/bin/python
# edit_changelogs.py
+import glob
+from time import strftime
from debian_bundle.changelog import Changelog, Version
author = 'Johannes Ranke <jranke@uni-bremen.de>'
-changelog = Changelog(r-base/r-base-)
+path = glob.glob("r-base/r-base-*")[0]
+chlg = path + "/debian/changelog"
+content = file(chlg).read()
+changelog = Changelog(content)
+newVersion = changelog.upstream_version() + "-" + changelog.debian_version() + "~cran.1"
-changelog.new_block(package='python-debian',
- version=Version('0.1'),
- distributions='unstable',
+changelog.new_block(package=changelog.package(),
+ version=Version(newVersion),
+ distributions='etch-backports',
urgency='low',
author=author,
- date='Thu, 3 Aug 2006 19:16:22 +0100',
+ date=strftime("%a, %e %b %Y %H:%M:%S %z"),
)
changelog.add_change('');
-changelog.add_change(' * Welcome to changelog.py');
+changelog.add_change(' * Backport to etch for CRAN repository');
changelog.add_change('');
-print changelog
+file(chlg,"w+").write(changelog)

Contact - Imprint