[PATCH 1 of 2] diff: add the --output option

Kevin Bullock kbullock+mercurial at ringworld.org
Sat Jun 29 14:19:14 CDT 2013


On 28 Jun 2013, at 5:28 PM, Ahmed S. Darwish wrote:

> Hi,
> 
> On Fri, Jun 28, 2013 at 11:06:31PM +0200, Ahmed S. Darwish wrote:
>> diff: add the --output option
>> 
>> For all shells which cannot save a command standard output correctly,
>> this option is now introduced.
>> 
>> The most common example is Microsoft PowerShell, where the piped
>> output gets corrupted if saved using the standard, unix-like, stdout
>> rediction '>' operator. By transforming the piped output to a
>> different encoding, PowerShell saves 'hg diff' patch output to a
>> format __not understandable__ by GNU patch and 'hg patch' commands.
>> 
>> Windows PowerShell is installed by default on all Windows 7+
>> machines (Windows 7, 8, Server 2008, and Server 2012). An easily
>> invokable 'hg diff > temp.patch' command should thus be available
>> on these systems.
>> 
> 
> Would a patch that adds the above warning to `$ hg diff --help'
> be acceptable?

Something shorter and more general in the help that describes why the -o/--output option exists is probably warranted, yes.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock

> 
> Thanks,
> 
> --
> Darwish
> http://darwish.chasingpointers.com
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list