/bzr-feed

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/bzr-feed/

« back to all changes in this revision

Viewing changes to bzr-feed.py

  • Committer: Jacques Distler
  • Date: 2007-03-11 16:12:55 UTC
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: distler@golem.ph.utexas.edu-20070311161255-nkf90f9gw13fntyi
Added BZR log  to the entry <content>.
Fixed baseuri.

Show diffs side-by-side

added added

removed removed

67
67
        print "    <link href='" + self._e(self.baseuri + "/#" + revno) + "'/>"
68
68
        print "    <id>" + self._e(self.feedid + ":" + revno) + "</id>"
69
69
        print "    <updated>" + self._e(time.strftime("%Y-%m-%dT%H:%M:%SZ",time.gmtime(rev.timestamp))) + "</updated>"
70
 
        print "    <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'><dl>"
 
70
        print "    <content type='xhtml'><div xmlns='http://www.w3.org/1999/xhtml'>"
 
71
        print "    <p>" + self._e(rev.message.rstrip()) + "</p>"
 
72
        print "    <dl>"
71
73
        self.show_files(delta.added, "Added")
72
74
        self.show_files(delta.removed, "Remove")
73
75
        self.show_files(delta.renamed, "Renamed")
114
116
if os.path.basename(os.path.dirname(os.environ['REQUEST_URI'])) == dir:
115
117
    baseuri += os.path.dirname(os.environ['REQUEST_URI'])
116
118
else:
117
 
    baseuri += re.sub(r'\.\w+$', '', os.environ['REQUEST_URI'])
 
119
    baseuri += re.sub(r'/\w+\.\w+$', '', os.environ['REQUEST_URI'])
118
120
 
119
121
if os.environ.get('SCRIPT_NAME',None):
120
122
    print "Last-Modified: " + time.ctime(last_rev.timestamp) + " GMT"