[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Remove excess elements from Atom 1.0 feeds

From: Bhuvaneswaran Arumugam <bhuvan_at_collab.net>
Date: 2006-07-21 16:55:44 CEST

Hello,

Please find attached the patch.

[[
Patch by: Bhuvaneswaran Arumugam <bhuvan@collab.net>

Insert the "entry" element before all other "entry" elements and remove
the elements from the feed file if it reaches --max-items.

* contrib/hook-scripts/svn2feed.py
  (Svn2Atom.add_revision_item): Locate the "author" element (last
  non-entry element) and insert the new element after it's next sibling.

  Calculate the total "entry" elements and remove the last child if the
  total is greater than the --max-items.
]]

Design: Locate the "author" element (last non-entry element) and insert
the "entry" element before its next sibling. I'm unsure if it is the
efficient way, but feel free to change if you find a better way.

-- 
Regards,
Bhuvaneswaran

Received on Fri Jul 21 16:56:24 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.