Greg Stein wrote on Mon, Jan 14, 2013 at 02:22:02 -0500: > -1 > > What the hell? The XML feature is used by the ASF. > > Why do you feel you can unilaterally remove features like this? Or create > such incompatible changes in a system that is/has already been deployed? >
http://subversion.tigris.org/issues/show_bug.cgi?id=4285#desc1 I _asked_ to make any incompatible changes before svnpubsub appears in an svn release tarball. The compat breakage is pretty specific: - Server and client must cross r1432778 in lockstep - svnwcsub.conf format changes incompatibly at r1432778 - r1432778 changes the wire protocol (drops XML and changes JSON) The benefits are the bullet points in Ben's commit message --- for starters, extensible protocol and no need to maintain two disjoint server-side code paths (json and xml). I'm aware of three consumers of this code, two of them already adjusted and a third is pinned to an old revision of the code (and will have to make the trivial config file changes next time he upgrades). Daniel > Ridiculous. > > Unhappy, > -g > On Jan 13, 2013 7:17 PM, <bre...@apache.org> wrote: > > > Author: breser > > Date: Mon Jan 14 01:16:57 2013 > > New Revision: 1432778 > > > > URL: http://svn.apache.org/viewvc?rev=1432778&view=rev > > Log: > > Rework svnpubsub to reduce a lot of complexity and generalize. > > > > In particular the following significant changes have been made: > > - XML support has been removed. > > - svnpubsub.client now takes URLs instead of host/port tuples. > > - svnpubsub.client has been updated to use JSON. > > - The JSON stream when connecting to the server no longer starts an object > > that never gets finished. > > - The server provides a JSON object with the key svnpubsub that > > contains a version key. This is intended to identify the format > > the server will be sending, it can be used to make clients backwards > > compatable to protocol changes. > > - Each JSON record is separated with a null character. > > - The input JSON is now identical to the object in the commit field > > of the output object. > > - A type and format field have been added to the JSON object. type > > can be used to distinguish say a git commit from a svn commit. > > format is a integer format similar to what SVN uses all over the place. > > - The following fields have been renamed to allow the same fields to be > > used across version control systems: > > revision -> id, author -> committer (author could be used for what > > other systems use author for), repos -> repository. > > - The following fields are required by the server on the input: > > repository, id, type and format, everything else is optional. > > - The dirs_changed field has been removed, it can be calculated from > > changed. > > - The Revision classes have been renamed Commit and in general no longer > > hard code certain fields. > > - There is only one type of output stream now, the dirs-changed output > > type has been removed. > > - The URLs used by the server have changed. All PUTs go to /commits. > > Clients no longer pass a format since the only format is JSON. > > Clients can still filter by repository, but can also filter by type now. > > > > [in tools/server-side/svnpubsub] > > > > * svnpubsub/server.py > > (*): Update documentation to reflect changes. > > (twisted.web.static, xml.etree): No longer used don't import. > > (Commit): Remove and replace with... > > (Revision): which has very little in the way of requirements on the > > incoming JSON. > > (Client.init): Remove format and add type as a filter. > > (Client.interested_in): Handle both repository and type. Takes > > the commit object rather than the uuid as input now. > > (Client.write_data): Data is just a string rather than a dictionary > > since there is only one format JSON and records are separated by a > > null character. > > (JSONClient): Merged into Client since only JSON is supported. > > (Client.write_start): Start with a svnpubsub object that has a version > > field rather than starting a commits object we never close. > > (Client.write_heartbeat): Separate records with null character. > > (XMLClient): Removed. > > (SvnPubSub.clients): Is just a list not a dictionary of clients by > > type. > > (SvnPubSub.cc, SvnPubSub.remove): Adjust for clients being just a list. > > (SvnPubSub.render_GET): Adjust for new URI format and single format. > > (SvnPubSub.notifyAll): Adjust for single format, move log formatting to > > new Commit class and adjust for changes in Client.interested_in(). > > (SvnPubSub.render_PUT): Handle format errors and object validation. Also > > use the new Commit class. > > (svnpubsub_server): Don't reference /dev/null as empty resource just > > create an empty Resource. Remove dirs-changed and commit URI paths. > > > > * svnpubsub/client.py > > (urlparse): Adjust import to deal with Python 3 rename. > > (xml.sax): No longer import, since we no longer support XML. > > (json): New import. > > (Client.__init__): Accept a URL instead of host and port. Use JSON > > instead of XML. Deal with bytes vs strings for Python 3. > > (Client.handle_connect, Client.handle_close, Client.handle_error): > > Pass None for the new event_arg parameter on the event_callback. > > (Client.found_terminator): bytes vs strings, Use \0 as the record > > separator and let async_chat split the records for us. > > (Client.collect_incoming_data): Just buffer incoming data, when the > > separator is found it'll call the parser from found_terminator(). > > (XMLStreamHandler, Revision): Remove > > (JSONRecordHandler, Commit): Add > > (MultiClient.__init__): Take a list of urls instead of hostports. > > (MultiClient._reconnect, MultiClient._reconnect_later, > > MultiClient._add_channel, MultiClient._check_stale): > > Use a URL instead of host and port as incoming arguments and on > > callbacks. Add event_arg to the event_callbacks. > > > > * README.txt: Remove svnwcsub todos (moved to svnwcsub.py) and update > > example. > > > > * commit-hook.py > > (svncmd_dirs): Remove function > > (do_put): PUT to /commits instead of /dirs-changed > > (main): Change format of posted JSON to match changes to the server, > > remove debug print. > > > > * daemonize.py > > (daemonize_exit, daemonize): Change to the newer/clearer except Foo as e > > syntax. Makes this Python 3 compatible. > > > > * example.conf, > > * svnwcsub.conf.example: > > Rename example.conf to svnwcsub.conf.example. Fix the example stream and > > fix the interpolation syntax. > > > > * irkerbridge.py > > (*): Update documentation to reflect changes. > > (Daemon.run, BigDoEverythingClass.__init__): Give MultiClient a list of > > urls > > instead of list of host port tuples. > > (BigDoEverythingClass.locate_matching_configs, > > BigDoEverythingClass.fill_in_extra_args, BigDoEverythingClass.commit): > > Commit callback gets a url and commit object instead of host, port and > > Revision object. > > (BigDoEverythingClass._generate_dirs_changed): New function to calculate > > the > > dirs_changed field from the new changed field. > > (BigDoEverythingClass.fill_in_extra_args): Use _generate_dirs_changed() > > and > > fix a bug where dirs_root was an empty string. > > (BigDoEverythignClass.event): Event receives a url, event_name and > > event_arg > > now. > > > > * svnwcsub.py > > (*): Moved TODOs from README.txt here. > > (ConfigParser, Queue, urlparse): Adjust import for Python 3 rename. > > (posixpath): New import. > > (BigDoEverythingClasss.__init__): svnpubsub.client uses urls directly > > now. > > (BigDoEverythingClasss._normalize_path, BigDoEverythingClasss.commit): > > Use > > posixpath instead of os.path when working on fspaths. > > (BigDoEverythingClasss.commit, Daemon._event): Adjust for changed > > callback params. > > (Daemon.run): Use a list of urls instead of a list of hostport tuples. > > > > * test.conf: Delete > > > > * testserver.py > > (TEST_BODY): Change XML to JSON. > > > > * watcher.py > > (urlparse): Adjust import for Python 3 rename. > > (_commit, _event): Adjust for callback parameter changes. > > (main): svnpubsub.client uses URLs now instead of hostports. > > (*): Take a list of URLs on the command line instead of pulling in > > svnwcsub > > and using its config class. > > > > Added: > > subversion/trunk/tools/server-side/svnpubsub/notes/ > > subversion/trunk/tools/server-side/svnpubsub/svnwcsub.conf.example > > - copied, changed from r1428993, > > subversion/trunk/tools/server-side/svnpubsub/example.conf > > Removed: > > subversion/trunk/tools/server-side/svnpubsub/example.conf > > subversion/trunk/tools/server-side/svnpubsub/test.conf > > Modified: > > subversion/trunk/tools/server-side/svnpubsub/README.txt > > subversion/trunk/tools/server-side/svnpubsub/commit-hook.py > > subversion/trunk/tools/server-side/svnpubsub/daemonize.py > > subversion/trunk/tools/server-side/svnpubsub/irkerbridge.py > > subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py > > subversion/trunk/tools/server-side/svnpubsub/svnpubsub/server.py > > subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py > > subversion/trunk/tools/server-side/svnpubsub/testserver.py > > subversion/trunk/tools/server-side/svnpubsub/watcher.py