From b3fcac5ae34508419f753707a16707b466e5be38 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 21 Oct 2010 17:34:12 -0400 Subject: [PATCH] Added release withdrawal. --- freshmeat-submit | 5 +++-- freshmeat-submit.spec | 6 ++++-- freshmeat-submit.xml | 8 ++++++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/freshmeat-submit b/freshmeat-submit index 43dc884..6af37f2 100755 --- a/freshmeat-submit +++ b/freshmeat-submit @@ -76,6 +76,7 @@ class FreshmeatSession: content = json.loads(handle.read()) self.project_data = content['project'] self.permalink = self.project_data['permalink'] + self.id = self.project_data['id'] def edit_request(self, url, method, request): "Wrap a JSON object with the auth code and ship it as a request" @@ -114,8 +115,8 @@ class FreshmeatSession: "Withdraw a specified release from the current project." if self.verbose: print "Withdrawing %s release: %s" % (self.project, release) - # When this is implemented, it will require a DELETE method - raise FreshmeatSessionException("Release removal is not yet implemented in the 3.0 API.") + deletelink = "projects/%s/releases/%s.json" % (self.permalink, self.id) + self.edit_request(deletelink, "DELETE", {}) def update_core(self, coredata): "Update the core data for a project." diff --git a/freshmeat-submit.spec b/freshmeat-submit.spec index e961cef..c6a0776 100644 --- a/freshmeat-submit.spec +++ b/freshmeat-submit.spec @@ -39,8 +39,10 @@ cp freshmeat-submit.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/ %changelog * Wed Oct 20 2010 Eric S. Raymond - 2.1-1 -- Now has a query mode thatr can retrieve project metadata in editable form. -- Properly deletes URLs not present in an update list. +- Now has a query mode that can retrieve project metadata in editable form. +- Properly deletes URLs not present in your update list. +- Request withdrawal is implemented. +- License changed to BSD. * Mon Oct 17 2010 Eric S. Raymond - 2.0-1 - Updated to work with the JSON-based 3.0 freshmeat.net API. diff --git a/freshmeat-submit.xml b/freshmeat-submit.xml index 7dcd9a6..972b396 100644 --- a/freshmeat-submit.xml +++ b/freshmeat-submit.xml @@ -60,8 +60,8 @@ the most recent release. Delete the specified release rather than submitting it. With this option, all data other than Project and Release are -ignored. Note: This is not yet -implemented in the 3.0 API; until it is, invoking +ignored. Note: only works if the release has been submitted but not +yet passed by a moderator; if the release is already posted, invoking this mode will throw an error. @@ -268,6 +268,10 @@ of how to set frequently-used URL types: +Note that the list of URLs you ship does not merely add to the +existing list but overwrites it - thjat is how you delete old URLs +which are no longer valid. + The Summary, Description, License-List, Project-Tag-List and all URL fields, when specified, actually change the record for the project. Only the Tag-List, Changes, Version, Release-Focus, and Hide -- 2.43.0