[darcs-users] darcsweb - A gitweb-alike web interface for darcs

Alberto Bertogli albertogli at telpin.com.ar
Sun Aug 28 21:33:26 UTC 2005


On Wed, Aug 24, 2005 at 05:12:38PM -0400, David Roundy wrote:
> On Wed, Aug 24, 2005 at 04:08:14PM -0300, Alberto Bertogli wrote:
> > I have a question though: since it looks so simple, I'd like to extend
> > this to the file-specific views, and I need to do some small parsing and
> > leave only the hunks that affect a file. Do you have a list of the
> > different types that can appear, and what's the line format?
> 
> If you're using darcs annotate to generate the patch contents, you can give
> additional arguments to restrict the changes to specific files or
> directories.  There is some trickiness involved, however, if the file has
> been renamed, so you'd probably be better off using the file's "creation
> name" and "creation patch hash".
> 
> Or you could parse yourself as you were considering.  (I'll let someone
> else explain the patch format...)  Parsing yourself is definitely more
> fragile, as we *do* plan to extend the patch format.

I was thinking that I need some way to get the diff but not in diff format
but in darcs format, just like the one shown when you record or call
"changes -v".

However, I can't get darcs to output the patch in XML output (ie. "changes
--xml-output" shows the same with or without -v). Is this normal and
expected? Should I parse the output without XML? Or is there an
alternative way of getting the output in this format?

I certanly don't want to generate it by hand by parsing the annotate
output (I know I'll have to write the annotate XML parser eventually, but
not to generate a patch by hand). And as you say, parsing the raw patch
file is quite fragile.


Thanks,
		Alberto





More information about the darcs-users mailing list