Re: Type-specific diff & patch

Mark Flacy <[email protected]>
Newsgroups gmane.comp.version-control.arch.user
Message-ID <1146636399l.3190l.0l@flacy>
On 2006.05.02 12:51, Thomas Lord wrote:
> 
>    I'd nearly always want to use, say, an XML-specific diff/patch   
> for some kinds of file -- so per-file is a good idea.

It's been my colleagues' experiences that the ClearCase's XML diff is  
more often confusing than enlightening.  That may be more of a  
comment on the specific tool than the idea itself.

It isn't far-fetched, however, for an XML tool which is aware of the  
schema to conclude that even though *you* think you changed merely  
the beginning and end tags of an XML block, you *actually* removed  
the entire block with the old name and inserted a replacement block  
with the new name.  That can be pretty confusing for the human who is  
told that he changed 300 lines instead of only 2.  Especially the  
human who used a simple text editor to make the change.


If you are going to analyze files for semantic content, then you may  
wish to look at ANTLR (http://www.antlr.org/) and consider using  
diffs of abstract symbol trees for version control.  You won't get  
back out exactly what you put in but you should be able to get back  
out something that *means* exactly the same thing that you put in.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.