You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@btopenworld.com> on 2005/01/19 21:31:51 UTC
Re: [PATCH] "--xml" option for "svn list", v2
Julian Foad wrote:
> I have made a small change to print "." instead of an empty path:
> "path", path[0] == '\0' ? "." : path,
Here is version 2 which is version 1 plus that change.
Log message:
[[[
Implement an XML output option for "svn list", similar to that for "svn log".
* doc/book/book/ch09.xml
Document the new options for "svn list".
* subversion/clients/cmdline/ls-cmd.c
(kind_str): New helper function.
(print_dirents_xml): New.
(svn_cl__ls): Output XML if requested.
* subversion/clients/cmdline/main.c
(svn_cl__cmd_table):
Add "--incremental" and "--xml" options to "list" command.
* tools/client-side/bash_completion
(_svn): Add "--incremental" and "--xml" options to "list" command.
]]]
The patch is attached.
Also attached is a DTD describing the XML output format. I don't yet have a
concrete proposal for what to do with this DTD; we might want to check it in to
the source tree somewhere and/or paste it into the book somewhere.
- Julian
Re: [PATCH] XML DTDs for "svn log" and "svn list" [was: "--xml" option
for "svn list", v2]
Posted by Julian Foad <ju...@btopenworld.com>.
Branko Čibej wrote:
> Works for me.
Thanks. Committed in r12842.
> You might want to make a separate DTD containing the common definitions
> (author, date, ...) use external references to those elements. But maybe
> that's overkill at this point.
Yes, that's overkill while there are only two common one-line definitions, but
if it were to grow to several I would do that.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] XML DTDs for "svn log" and "svn list" [was: "--xml" option
for "svn list", v2]
Posted by Branko Čibej <br...@xbc.nu>.
Julian Foad wrote:
> Branko Čibej wrote:
>
>> Julian Foad wrote:
>>
>>> The DTD is not included; I'll try to find somewhere to put it.
>>
>>
>> Try one of:
>>
>> doc/programmer/xml
>> notes/xml
>> subversion/clients/cmdline/dtd
>>
>> The last might actually be best.
>
>
> Thanks for the suggestion. How about this for a patch?
>
> - Julian
>
>
> [[[
> Add XML DTD files defining the XML output of "svn log" and "svn list".
>
> * subversion/clients/cmdline/dtd: New directory.
>
> * subversion/clients/cmdline/dtd/list.dtd: New file.
>
> * subversion/clients/cmdline/dtd/log.dtd: New file.
> ]]]
Works for me.
You might want to make a separate DTD containing the common definitions
(author, date, ...) use external references to those elements. But maybe
that's overkill at this point.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] XML DTDs for "svn log" and "svn list" [was: "--xml" option
for "svn list", v2]
Posted by Julian Foad <ju...@btopenworld.com>.
Branko Čibej wrote:
> Julian Foad wrote:
>> The DTD is not included; I'll try to find somewhere to put it.
>
> Try one of:
>
> doc/programmer/xml
> notes/xml
> subversion/clients/cmdline/dtd
>
> The last might actually be best.
Thanks for the suggestion. How about this for a patch?
- Julian
[[[
Add XML DTD files defining the XML output of "svn log" and "svn list".
* subversion/clients/cmdline/dtd: New directory.
* subversion/clients/cmdline/dtd/list.dtd: New file.
* subversion/clients/cmdline/dtd/log.dtd: New file.
]]]
Index: subversion/clients/cmdline/dtd/list.dtd
===================================================================
--- subversion/clients/cmdline/dtd/list.dtd (revision 0)
+++ subversion/clients/cmdline/dtd/list.dtd (revision 0)
@@ -0,0 +1,16 @@
+<!-- XML DTD for Subversion command-line client output. -->
+
+<!-- Common attributes and elements -->
+<!ELEMENT author (#PCDATA)> <!-- user name -->
+<!ELEMENT date (#PCDATA)> <!-- date as "yyyy-mm-ddThh:mm:ss.ssssssZ" -->
+
+<!-- For "svn list" -->
+<!ELEMENT lists (list+)>
+<!ELEMENT list (entry*)>
+<!ATTLIST list path CDATA #REQUIRED> <!-- local path or URL -->
+<!ELEMENT entry (name, size?, commit)>
+<!ATTLIST entry kind (dir | file) #REQUIRED>
+<!ELEMENT name (#PCDATA)> <!-- name of file or directory -->
+<!ELEMENT size (#PCDATA)> <!-- file size in bytes: integer -->
+<!ELEMENT commit (author, date)>
+<!ATTLIST commit revision CDATA #REQUIRED> <!-- revision number: integer -->
Property changes on: subversion/clients/cmdline/dtd/list.dtd
___________________________________________________________________
Name: svn:eol-style
+ native
Index: subversion/clients/cmdline/dtd/log.dtd
===================================================================
--- subversion/clients/cmdline/dtd/log.dtd (revision 0)
+++ subversion/clients/cmdline/dtd/log.dtd (revision 0)
@@ -0,0 +1,16 @@
+<!-- XML DTD for Subversion command-line client output. -->
+
+<!-- Common attributes and elements -->
+<!ELEMENT author (#PCDATA)> <!-- user name -->
+<!ELEMENT date (#PCDATA)> <!-- date as "yyyy-mm-ddThh:mm:ss.ssssssZ" -->
+
+<!-- For "svn log" -->
+<!ELEMENT log (logentry*)>
+<!ELEMENT logentry (author, date, paths?, msg?)>
+<!ATTLIST logentry revision CDATA #REQUIRED> <!-- revision number: integer -->
+<!ELEMENT paths (path*)>
+<!ELEMENT path (#PCDATA)> <!-- path within repository -->
+<!ATTLIST path action CDATA #REQUIRED <!-- action code: one character -->
+ copyfrom-path CDATA #IMPLIED <!-- path within repository -->
+ copyfrom-rev CDATA #IMPLIED> <!-- revision number: integer -->
+<!ELEMENT msg (#PCDATA)> <!-- log message -->
Property changes on: subversion/clients/cmdline/dtd/log.dtd
___________________________________________________________________
Name: svn:eol-style
+ native
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] "--xml" option for "svn list", v2
Posted by Branko Čibej <br...@xbc.nu>.
Julian Foad wrote:
> The DTD is not included; I'll try to find somewhere to put it.
Try one of:
doc/programmer/xml
notes/xml
subversion/clients/cmdline/dtd
The last might actually be best.
-- Brane
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [PATCH] "--xml" option for "svn list", v2
Posted by Julian Foad <ju...@btopenworld.com>.
Julian Foad wrote:
> Implement an XML output option for "svn list", similar to that for "svn
> log".
Committed in r12837. The DTD is not included; I'll try to find somewhere to
put it.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org