Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits

[3772] cherokee/trunk: Couple of fixes so the ChangeLog can be handled without Internet

 

 

Cherokee commits RSS feed   Index | Next | Previous | View Threaded


cherokee at cherokee-project

Nov 2, 2009, 9:23 AM

Post #1 of 1 (31 views)
Permalink
[3772] cherokee/trunk: Couple of fixes so the ChangeLog can be handled without Internet

Revision: 3772
http://svn.cherokee-project.com/changeset/3772
Author: alo
Date: 2009-11-02 18:23:29 +0100 (Mon, 02 Nov 2009)

Log Message:
-----------
Couple of fixes so the ChangeLog can be handled without Internet
connection. Previously it was printing a non-sense warning.

Modified Paths:
--------------
cherokee/trunk/changelog-update.sh
cherokee/trunk/svnlog2changelog.py

Modified: cherokee/trunk/changelog-update.sh
===================================================================
--- cherokee/trunk/changelog-update.sh 2009-11-01 18:55:00 UTC (rev 3771)
+++ cherokee/trunk/changelog-update.sh 2009-11-02 17:23:29 UTC (rev 3772)
@@ -22,19 +22,19 @@
touch ChangeLog
fi

-if [ -z $CHANGELOG_VERSION ]; then
+if [ x$CHANGELOG_VERSION = x ]; then
CHANGELOG_VERSION=$FIRST_REV
fi

# Find the latest revision in the SVN
SVN_VERSION=`svnversion -c . | sed -e 's/^[^:]*://;s/[A-Za-z]//'`
-if [ -z $SVN_VERSION ]; then
+if [ x$SVN_VERSION = x ]; then
echo
echo "WARNING: Couldn't get svn revision number."
echo " Is svn or the .svn directories missing?"
echo
else
- if [ $SVN_VERSION -eq $CHANGELOG_VERSION ]; then
+ if [ x$SVN_VERSION = x$CHANGELOG_VERSION ]; then
echo "ChangeLog is already up-to-date."
else
echo "Updating ChangeLog from version $CHANGELOG_VERSION to $SVN_VERSION..."

Modified: cherokee/trunk/svnlog2changelog.py
===================================================================
--- cherokee/trunk/svnlog2changelog.py 2009-11-01 18:55:00 UTC (rev 3771)
+++ cherokee/trunk/svnlog2changelog.py 2009-11-02 17:23:29 UTC (rev 3772)
@@ -49,25 +49,36 @@
txt += "\t%s %s\n"%(action, get_text(path.childNodes))
return txt

-dom = xml.dom.minidom.parseString (stdin.read())
-log = dom.getElementsByTagName('log')[0]
+def do_parse():
+ try:
+ dom = xml.dom.minidom.parseString (stdin.read())
+ except xml.parsers.expat.ExpatError, e:
+ print "ERROR: Could update ChangeLog. The XML arser reported: "
+ print ' "%s2"' %(e)
+ print
+ raise SystemExit

-for entry in log.getElementsByTagName('logentry'):
- revision = entry.getAttribute('revision')
- date = entry_get_val (entry, 'date').split('T')[0]
- time = entry_get_val (entry, 'date').split('T')[1].split('.')[0]
- dev = entry_get_val (entry, 'author')
- msg = reformat_msg(entry_get_val (entry, 'msg'))
- author = DEVELOPERS[dev]
- paths = render_paths(entry)
+ log = dom.getElementsByTagName('log')[0]
+
+ for entry in log.getElementsByTagName('logentry'):
+ revision = entry.getAttribute('revision')
+ date = entry_get_val (entry, 'date').split('T')[0]
+ time = entry_get_val (entry, 'date').split('T')[1].split('.')[0]
+ dev = entry_get_val (entry, 'author')
+ msg = reformat_msg(entry_get_val (entry, 'msg'))
+ author = DEVELOPERS[dev]
+ paths = render_paths(entry)

- print "%s %s" % (date, author)
- print " "*12 + "SVN: r%s, %s - %s" % (revision, dev, time)
- print
- if msg:
- print msg.encode("utf-8"),
-
- if paths:
+ print "%s %s" % (date, author)
+ print " "*12 + "SVN: r%s, %s - %s" % (revision, dev, time)
print
- print paths
+ if msg:
+ print msg.encode("utf-8"),

+ if paths:
+ print
+ print paths
+
+if __name__ == "__main__":
+ do_parse()
+

Cherokee commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.