CVSNT 2.5.05 sets the output code page to 65001 (UTF-8) and does not set it back.
Unfortunately, Windows' handling of that code page is broken so bad things happen (including the inability to run batch files).
One workaround is to reset the code page (both input and output) to a known working one (437, 850, 1252 or others) using CHCP
, preferably on the same line as the CVS
command. For example:
> cvs update & chcp 1252
Or, if you feel more fancy, you can actually save the current code page and restore it.
For example, here's a batch file that I use to update all the modules in my work directory:
@echo off
setlocal enableextensions
for /f "tokens=4" %%i in ('chcp') do set hack=chcp %%i
for /d %%i in (*) do (
if exist %%i\cvs (
echo.
echo *** updating %%i
pushd %%i
cvs -q update -A -P -d | find /V "?" & %hack% >NUL
popd
))
echo.
echo *** STATUS ***
cvs -q status -q | find /V "?" & %hack% >NUL
endlocal
pause
The importance of invoking CHCP on the same line is that the next line of the batch file will not be processed if the code page is UTF.
Of course, fixing the bug will be a better solution.
whence.pl
script that I can run which shows me which directory in the path a file is in. I can see that vim isC:\Windows\vim.BAT
. For some reason, the command doesn't run and I just get a new prompt. – HaskinsC:\Windows\vim.BAT
contain? Does a simpletest.bat
file that contains onlyecho hello world
also fail to do anything? Does it matter whether thetest.bat
file is in the current directory or that it's found by a search of thePATH
? – Aviationcvs up
orcvs commit
. – HaskinsC:\Windows\system32\cmd.exe /c test.bat
? – Aviation