[darcs-users] DARCS changes XSLT stylesheet
Sean E. Russell
ser at germane-software.com
Wed Nov 19 15:56:59 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 19 November 2003 09:42, David Roundy wrote:
> I'd definitely be interested in including it if it could be used as the
> basis of a viable alternative to darcs_cgi (which I detest). That would
> require two more sorts of pages (and symlinks between them)--one listing
> the files in the repo at a given time, and one showing either a file diff
> or file contents with modifications marked up. These might be achievable
> via one more darcs command, "showpatch", which would accept a few flags
> (presumably including --xml-output), and would show some information about
> the selected patch (selected via -m or -t or something like that--perhaps
> we'd want to add a --hash flag to select the patch via its hash).
> I'm picturing something like
> darcs showpatch --contents -m patchname
I've been wanting this for a while, actually, but not for this reason. I keep
finding myself wanting a way to just dump a particular patch. The reason is
because I currently have a project for which I'm maintaining versions in
three repositories. One in CVS, which is somebody else's source tree; one in
Subversion, which is my main development tree; and one in darcs, which is my
public contrib tree. It'd be nice to be able to dump a single patch so that
I can 'patch' the other repositories by hand.
> Would you be interested in doing the XML output if I created such a
> command? On the other hand, perhaps it would be a better idea to see about
> getting ViewCVS working with darcs (which unfortunately requires some
> python hacking).
I've never liked ViewCVS, but it is robust and well known.
If you do add a showpatch command, it would certainly be useful, and you could
do some interesting things with it. For a web interface, you'd still need a
CGI to answer requests and return the results from showpatch, but that would
be easy to write.
Marking up existing code would be a job; displaying the diff would not.
However, if you're suggesting that 'darcs showpatch --file=filename -m
patchname' would actually generate the file with the diffs somehow marked-up
inline, then I'm all for it -- especially if I can hook into that and change
the markup to XML. Then I can write XSL to generate Timothy's inline-style
display, or side-by-side display, or interactive SVG display...
What I don't want to do is have to rewrite 'patch'.
If you're thinking of doing what I'm hoping your thinking, the interface I'd
like to see is something like this:
displayBlock old_code_block new_code_block
where new_code_block can be  if there was no change. At best, the blocks
would not be context blocks, but strictly the lines that changed.
I'm assuming that darcs uses the diff algorithm, and is unable to detect fine
granularity changes; we won't be able to produce Timothy's
character-by-character markup, but this would still be useful.
### http://www.germane-software.com/~ser jabber.com:ser ICQ:83578737
### GPG: http://www.germane-software.com/~ser/Security/ser_public.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the darcs-users