cvs2svn 更改二进制文件
转换完成后,我注意到我的二进制文件存在问题。
我正在使用自动道具文件,这非常有帮助。
转换后,我从 CVS 获取该文件,并将其与 SVN 中的同一文件进行比较。 该文件是二进制的。使用 WinMerge,我发现这些文件之间存在差异。
可能是什么问题?
I'm using cvs2svn to migrate from CVS to SVN.
I've noticed a problem with my binary file after the conversion was completed.
I'm using auto-props file, which is very helpful.
After the conversion I took the file from CVS and compared it to the same file from SVN.
The file is binary. Using WinMerge, I see that there is a difference between the files.
What can be the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你用的是cvsnt吗?如果这样做,cvs2svn 不会理解您的文件是二进制文件,因为 cvs 和 cvsnt 标记二进制文件不同。编写一个程序来转换它很简单。我必须这么做。
现在,如果您有一个未在 cvs 中标记为二进制的二进制文件,或者使用 cvsnt 语法标记的二进制文件,并且该文件包含“$Id”或“$Date”等模式,则 Subversion 将在以下情况下替换这些模式:你检查一下文件。通常这意味着您的二进制文件将被损坏。
如何转换:如果文件包含“kopt b;”假设它是二进制的,尽管从技术上讲,文件在某些版本中可能是二进制的,而在其他版本中则不是。对于所有二进制文件,插入“expand @b@;”在文件顶部附近的“符号”之前,因此标题看起来像这样:
执行此操作时,请小心不要更改文件其余部分中的任何内容,例如行结尾。
Are you using cvsnt? If you do, cvs2svn doesn't understand that your file is binary, because cvs and cvsnt flag binary files differently. It is simple enough to write a program that converts this. I had to do that.
Now, if you have a binary file that isn't marked as binary in cvs, or it is marked using the cvsnt syntax, and the file contains patterns like "$Id" or "$Date", then Subversion will substitute those patterns when you check out the files. Usually that means your binary file will get corrupted.
How to convert: If the file contains "kopt b;" assume it is binary, although technically a file may be binary in some revisions and not in others. For all binary files, insert "expand @b@;" before "symbols" near the top of the file, so the header looks something like this:
When you do this, be careful not to change anything in the rest of the file, e.g. line endings.