CVS change revision of file to a newer one

46 Views Asked by At

simple question. I got a file xy.c that has a repository revision 1.1. Its on a branch. In head there is a newer version with version 1.4 . Now i want the file xy.c point to version 1.4.

I already tried cvs update -A xy.c and it updates the file and cvs status show revision 1.4 but i cant commit that file and when I check it out its still revision 1.1 . What am I doing wrong?

1

There are 1 best solutions below

0
Mort On

I think you need to somewhat bypass CVS and send the file to stdout (-p) and then back into the file.

cvs update -r 1.4 -p xy.c > xy.c

I know that sounds crazy or like overkill, but some seemingly-simple things are difficult in CVS.

(Note that if this file has+needs an execute bit set this will be lost and you'll need to chmod +x xy.c. Probably not necessary if .c is indeed the extension, but if it's something else you might need it.)