How to fix file permission in CVS?

Jim Meyering jim@meyering.net
Fri Feb 26 15:08:00 GMT 2010


H.J. Lu wrote:

> On Fri, Feb 26, 2010 at 5:13 AM, Mike Frysinger <vapier@gentoo.org> wrote:
>> On Fri, Feb 26, 2010 at 7:33 AM, Eirik Byrkjeflot Anonsen wrote:
>>> "Doug Kwan (ОП©ІТе)" writes:
>>>>     I checked in a shell script in src/gold/testsuite but forgot the
>>>> set the execution permission.  Now the file is checked out as a
>>>> non-executable shell script.  What is a good way to fix it?  Thanks.
>>>
>>> If I remember correctly, CVS stores the executable bit for files by
>>> setting the executable bit on the ,v file on the server.  So I think the
>>> only way to fix this is to log on to the CVS server itself and chmod +x
>>> the correct ,v file in the repository.
>>
>> that is the nicest way of doing it, but does require talking to a
>> server admin.  you can also abuse the system by removing the file,
>> committing the removal, then re-adding the file with the +x bits set.
>> obvious downside here is that the cvs log has two entries added to it
>> (one removal and one restore).
>> -mike
>
> I prefer something which will keep git mirror in sync.

IMHO, taking Mike's suggestion is best (remove, then re-add with execute bit set)
since it ensures that the git mirror stays in sync.  In addition, if you
ever rerun the cvs-to-git conversion, there will be no need for a manual
correction.



More information about the Binutils mailing list