info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS is mangling some text files


From: Larry Jones
Subject: Re: CVS is mangling some text files
Date: Mon, 6 Dec 2010 00:43:29 -0500

Harvey writes:
> 
> I just went to some lengths to import and update some code of mine into 
> CVS.  This is on a Windows Vista machine.  CVS client 1.12.12 (client), 
> 1.12.13 (Ubuntu server).

On Windows, it's critically important to distinguish between text and
binary when creating a file, either by adding it or importing it.

> There are about 90 files in the project.  When I checkout the project 
> files, there are 4 files that are mangled and I can't seem to get them 
> unmangled:
> 
>   xxx/res/MFCPCons.ico
>   xxx/res/MFCPCons.rc2
>   xxx/resource.h
>   xxx/MFCPCons.rc
> 
> The .ico file is binary and correctly set up to be stored as binary in 
> the repository.

Make sure it's really set in the repository and not just in your working
directory.  cvs log will show you the repository setting (keyword
substitution), cvs status will show you your working directory setting. 
The best thing to do is to use cvs admin to set the repository file
correctly and then do cvs up -A to synchronize the working file.

> The other 3 are text.

Windows has some strange ideas about what "text" means.  Those files are
likely Unicode encoded rather than ASCII -- Windows may consider that
text, but it's binary as far as CVS is concerned.  One way to find out
is to open the file in Notepad and then do File -> Save As: there's an
Encoding field that will tell you how the file is encoded.  Saving the
files as ASCII and then committing them should fix the problem.

You might want to consider using WinCVS as your client -- it does a very
good job of automatically detecting text vs. binary so you can fix up
the files as needed before committing them rather than trying to clean
up afterwards.
-- 
Larry Jones

This sounds suspiciously like one of Dad's plots to build my character.
-- Calvin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]