You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/05/13 05:04:18 UTC

svn commit: r1337757 - /subversion/trunk/subversion/libsvn_ra_serf/blame.c

Author: gstein
Date: Sun May 13 03:04:17 2012
New Revision: 1337757

URL: http://svn.apache.org/viewvc?rev=1337757&view=rev
Log:
Lay out an initial sketch for blame to use the v2 parsing mechanism.
This cannot be enabled, however, since the cdata in the report is
unbounded (yet the current code buffers into memory).

Checkpiont the (unused) sketch for a transition table.

* subversion/libsvn_ra_serf/blame.c:
  (blame_state_e): add INITIAL, per convention
  (blame_ttable): new transition table; unused

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/blame.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/blame.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/blame.c?rev=1337757&r1=1337756&r2=1337757&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/blame.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/blame.c Sun May 13 03:04:17 2012
@@ -47,6 +47,7 @@
  */
 typedef enum blame_state_e {
   NONE = 0,
+  INITIAL = 0,
   FILE_REVS_REPORT,
   FILE_REV,
   REV_PROP,
@@ -109,6 +110,42 @@ typedef struct blame_context_t {
   void *file_rev_baton;
 } blame_context_t;
 
+
+#if 0
+/* ### we cannot use this yet since the CDATA is unbounded and cannot be
+   ### collected by the parsing context. we need a streamy mechanism for
+   ### this report.  */
+
+#define D_ "DAV:"
+#define S_ SVN_XML_NAMESPACE
+static const svn_ra_serf__xml_transition_t blame_ttable[] = {
+  { INITIAL, S_, "file-revs-report", FILE_REVS_REPORT,
+    FALSE, { NULL }, FALSE, FALSE },
+
+  { FILE_REVS_REPORT, S_, "file-rev", FILE_REV,
+    FALSE, { "path", "rev", NULL }, FALSE, TRUE },
+
+  { FILE_REV, D_, "rev-prop", REV_PROP,
+    TRUE, { "name", "?encoding", NULL }, FALSE, TRUE },
+
+  { FILE_REV, D_, "set-prop", SET_PROP,
+    TRUE, { "name", "?encoding", NULL }, FALSE, TRUE },
+
+  { FILE_REV, D_, "remove-prop", REMOVE_PROP,
+    FALSE, { "name", "?encoding", NULL }, FALSE, TRUE },
+
+  { FILE_REV, D_, "merged-revision", MERGED_REVISION,
+    FALSE, { NULL }, FALSE, FALSE },
+
+  { FILE_REV, D_, "txdelta", TXDELTA,
+    TRUE, { NULL }, FALSE, TRUE },
+
+  { 0 }
+};
+
+#endif
+
+
 
 static blame_info_t *
 push_state(svn_ra_serf__xml_parser_t *parser,