]> thyrsus.com Git - freecode-submit.git/commitdiff
Added release withdrawal.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 21 Oct 2010 21:34:12 +0000 (17:34 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 21 Oct 2010 21:34:12 +0000 (17:34 -0400)
freshmeat-submit
freshmeat-submit.spec
freshmeat-submit.xml

index 43dc884dcd39380c8762d72f8d946a31be90a2cb..6af37f2418e42fdffc384ef06845731f178dae2e 100755 (executable)
@@ -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."
index e961cef11c5ff94dc9f0216cdf1ee315a08ea6c5..c6a07769ba438ba8f02537a57c33fc2261843c90 100644 (file)
@@ -39,8 +39,10 @@ cp freshmeat-submit.1 "$RPM_BUILD_ROOT"%{_mandir}/man1/
 
 %changelog
 * Wed Oct 20 2010 Eric S. Raymond <esr@snark.thyrsus.com> - 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 <esr@snark.thyrsus.com> - 2.0-1
 - Updated to work with the JSON-based 3.0 freshmeat.net API.
index 7dcd9a621989e43621e3e42a73de9a028d4ab878..972b396fb95e7a062b401a7c21b76de4ce53a513 100644 (file)
@@ -60,8 +60,8 @@ the most recent release.</para>
 <listitem>
 <para>Delete the specified release rather than submitting it.  With
 this option, all data other than Project and Release are
-ignored. Note: This is <emphasis role='bold'>not yet
-implemented</emphasis> 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.</para>
 </listitem>
 </varlistentry>
@@ -268,6 +268,10 @@ of how to set frequently-used URL types:</para>
 </tgroup>
 </informaltable>
 
+<para>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.</para>
+
 <para>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