[cvsnt] Re: deleting a binary file revision

Bo Berglund bo.berglund at telia.com
Mon Mar 27 18:35:50 BST 2006


On Mon, 27 Mar 2006 14:31:51 +0200 (MEST), Real.Magic at gmx.de wrote:

>CVSNT 2.5.03.2260
>
>
>I've got a problem deleting a binary file revision. The file has got
>the options "-kb".
>
>First version of binary was 1.1. Then I committed a new version 1.2.
>After deleting version 1.2 with "Admin options -> Delete
>revisions...", the actual version is 1.1 again, but is different from
>the original version 1.1.
>As far as I see, all "0x0a" in the original file are changed
>to "0x0d", and "0xa0a0" are changed to "0x0d0d0a".
>
>Is deleting file revisions unusable for binary files?

Should not, but in this case yes!

I have now been able to test this on my test CVSNT server:
- Added a small (5 119 bytes) binary file in an existing sandbox
- Committed it to CVS
- Edited it with a hex editor (changed 3 bytes, same size still)
- Committed the file to get rev 1.2
- Now I graphed the file in WinCvs and selected rev 1.2
- In the rightclick menu I selected admin/delete revisions
- Ok to execute command.
- Now I updated the sandbox and the file went from 1.2 to 1.1
- New file size is 5 104 bytes, so there is a loss of 15 bytes!!!

So in order to see what has happened I used the hex editor again and
found this:

The original file had 16 0x0d bytes in a row followerd by 10 0x0a
bytes. The new rev 1.1 file has NO 0x0d bytes at all (!) but the last
0x0d byte immediately preceding the 0x0a stretch has been converted to
a 0x0a byte. So I have the original file minus all 0x0d bytes except
one such because it was immediately followed by a 0x0a byte and was
converted to a 0x0a.

Surely this is not correct...

I also did a second test:
- Added the binary file (new name)
- Modifiued and committed the file
- Put the original file back on top and committed
- Deleted the revision 1.2
- No effect on either 1.1 or 1.3 could be seen
- Now deleted revision 1.3 too
- Updated the sandbox
- Now the file has been corrupted again!


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list