setting execute bits on new files in patches

Christian Ebert blacktrash at gmx.net
Sat Apr 5 10:11:09 UTC 2008


* Adrian Buehlmann on Saturday, April 05, 2008 at 10:36:48 +0200
> On 05.04.2008 02:38, Mads Kiilerich wrote:
>> Adrian Buehlmann wrote, On 04/05/2008 02:09 AM:
>>> How do I set the execute bit(s) in a new file of a patch
>>> I send to the list?
>> 
>> You can use the git diff format as in
>> hg email --git
> 
> Argh. On my Windows PC I do have
> 
> [diff]
> git = 1
> 
> in mercurial.ini, but I prepared said patch on my FreeBSD box, where git
> diff format is *not* set in any hgrc.
> 
> Next mystery is: why isn't the git format used as the default format
> for patch output if the non-git format apparently is lossy with regards
> to permission/execute bits?

AFAIR, this has been discussed before, and (one of the) reason(s)
was that git format patches can't be applied eg. outside hg
(export). I configured it for all mq commands in the [defaults]
hgrc section. Otherwise I explicitly add it.

> BTW: What is the official name for the "non-git" patch format?
> 
> BTW2: In case I would want to have the output for example of "hg export"
> in non-git and I have git = 1 in my hgrc, how would I do that?

$ hg --config 'diff.git=0' export

> What is the option for "non-git"?

Admittedly, something like --nogit|-G would be helpful ;)
 
>> The question is not in the wiki, but the answer is:
>> http://www.selenic.com/mercurial/wiki/index.cgi/FAQ#head-4511b915649bb52d37f24163377be04cf4f5a19f
>> 
>> (Sorry for the ugly unreadable link. And having browsed to the FAQ entry 
>> it is hard to link to it. Wiki wink ;-)
> 
> Yep. I've been there.

<http://ln-s.net/home/> ;)

c
-- 
Patch queue to improve Mercurial's handling of non-ascii chars in mails:
<http://www.blacktrash.org/hg/hg-mail-mq/>
Mercurial crew repo, with mail improvement patch queue applied:
<http://www.blacktrash.org/hg/hg-crew-mq/>



More information about the Mercurial mailing list