Feature request in 'hg diff'

dhruva dhruvakm at gmail.com
Tue Jan 22 03:53:30 CST 2008


Hi,

On Jan 20, 2008 10:49 PM, Thomas Arendsen Hein <thomas at intevation.de> wrote:
> * dhruva <dhruvakm at gmail.com> [20080120 05:20]:
> >  Since I keep working with HG on top of a CVS repo, I keep getting
> > into EOL differences. I would like to ignore them. Basically, if the
> > diff is only in EOL, I (and mercurial) would like to treat the file as
> > not changed.
> >  I am currently using the external diff (GNU diff) with the option
> > '--strip-trailing-cr' but this does not affect the way mercurial
> > treats changes. I can use if only to view the changes.
>
> +1 on adding this to diff, export, log -p etc.

I have implemented it for 'diff'. With this, I no longer need to have
an external diff configured for ignoring eol changes. I am sending a
patch on current crew tip. I am not sure if it is a better idea to
have a 'diff' extension. Since it touches the core of and VCS system,
I am not sure where it belongs. 'diff' is also something that users
may want to extend.
For example:
 1. The is a tool that generates log files with a date stamp in the header
2. The execution of tool at various times will (or may) generate the
same logs with different timestamps.
3. I would like to extend diff to strip those time stamps so that
logically there is no difference in the contents (as I intentionally
want to ignore the timestamp)

Well, I could use an external diff but if I could just massage the
input for the internal diff, I will be able to realize my requirement.
The above scenario happens more in real life when I handle files in
CVS through hg (and CVS). The CVS specific fields like author, rev,
date gets modified on each new checkout. I would like to ignore those
fields.


-dky

-- 
Contents reflect my personal views only!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eol.patch
Type: application/octet-stream
Size: 2331 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20080122/d395c514/attachment.obj 


More information about the Mercurial-devel mailing list