Search code examples
version-controlaccurev

How to retrieve correct filesize from accurev?


I am writing a utility to compare accurev files against a local file system using stat files. Inside the stat file is a size value for every element. I am trying to compare the accurev reported size against the local file size.

However, accurev is reporting file size using Unix convention (line ending = LF) while my Windows machine is reporting file size using line ending = CR+LF. This is causing the difference to be almost the same as the number of lines per file.

While I could count the number of lines in every file (its accurate to within 1), is there a way to force accurev to show file sizes correctly? Accurev must do somehow as it is able to tell when a file is modified even if the modified time is the same as the server.


Solution

  • Are you in an AccuRev workspace on your windows machine? If so, create the workspace and have it configured to use Unix EOL. This way, you are comparing unix to unix and not unix to windows. BTW, accurev does chksum to determine if a file is modified.