简体   繁体   English

Windows Vista中的CVS最佳实践?

[英]CVS in Windows Vista Best Practice?

I have to start using CVS at my new company so that I can play nicely with the developers who are all *nix users. 我必须在我的新公司开始使用CVS,以便我可以与所有* nix用户的开发人员很好地合作。 I happen to be a Windows Vista user and unfortunately do not have the ability to switch anytime soon. 我碰巧是Windows Vista用户,很遗憾没有能力很快切换。 I am also not exactly a command line guru yet, so any simplified method is ideal for me. 我也不是一个命令行大师,所以任何简化的方法对我来说都是理想的。

I discovered TortoiseCVS today and it seems pretty straight forward, even though it says it is not directly supported on Vista, which worries me a little. 我今天发现了TortoiseCVS并且看起来非常直接,尽管它说Vista上没有直接支持它,这让我有点担心。

My questions: 我的问题:

  1. Do you use CVS on Windows (Vista)? 你在Windows(Vista)上使用CVS吗?
  2. What method do you use? 你用什么方法? (Tortoise CVS? Another option?) (Tortoise CVS?另一种选择?)
  3. Does your method get along well with repositories setup on/by *nix machines? 您的方法与/ nix机器上的存储库设置相处得好吗?
  4. Any other advice for the noob? 对菜鸟的其他任何建议? (Thanks) (谢谢)

I know many people who required a gentle introduction to cvs and ended up using WinCVS with no real difficulty. 我知道很多人需要温和地介绍cvs并最终使用WinCVS并没有真正的困难。 I know many others who are using the cvs client in Eclipse. 我知道很多其他人在Eclipse中使用cvs客户端。 This usage includes projects which are not otherwise managed by Eclipse. 此用法包括Eclipse未管理的项目。 As for myself, I stick to the command-line myself because I feel the lack of GUI abstractions helps me to always understand exactly what CVS is doing. 至于我自己,我自己坚持使用命令行,因为我觉得缺乏GUI抽象让我总能理解CVS究竟在做什么。 All three solutions work well on Vista, 32 and 64 bit. 所有这三种解决方案都适用于Vista,32位和64位。 Our shop uses Mac, Linux, Solaris, and Windows, with the server on a Linux machine, and we never have any problems with compatibility. 我们的商店使用Mac,Linux,Solaris和Windows,在Linux机器上使用服务器,我们从不会遇到任何兼容性问题。

There's one issue you should be aware of regardless of your choice of cvs client for cross-platform goodness, though. 但是,无论您选择cvs客户端来实现跨平台优势,都应该注意一个问题。 Most cvs clients convert between Unix newlines (on the server) and Windows newlines (on the client) by default. 大多数cvs客户端默认情况下在Unix换行符(在服务器上)和Windows换行符(在客户端上)之间进行转换。 You should understand that this conversion is happening and be aware of the consequences. 您应该了解这种转换正在发生并且意识到后果。

  • This conversion will cause real problems if you try to commit a file with Unix newlines. 如果您尝试使用Unix换行提交文件,则此转换将导致实际问题。 So, you need to avoid, for example, copying files from a Unix repository to your Windows box, editing them, and committing them unless you've done the newline conversion. 因此,您需要避免,例如,将文件从Unix存储库复制到Windows框,编辑它们,并提交它们,除非您已完成换行转换。 We had some real problems with this in my shop, and I instituted a strict policy that people should only communicate files between machines by committing them to CVS. 我的商店里有一些真正的问题,我制定了严格的政策,人们只应该通过将文件提交给CVS来在机器之间传递文件。 Never, for example, by email, shared network directories, etc. 例如,从不通过电子邮件,共享网络目录等。
  • If your CVS repository has any binary files, some may not have been properly tagged as binary files. 如果您的CVS存储库包含任何二进制文件,则某些文件可能未正确标记为二进制文件。 In *nix-only shop, nobody would notice, as the binary flag won't affect most binary files. 在* nix-only商店,没有人会注意到,因为二进制标志不会影响大多数二进制文件。 But in a cross-platform shop, the binary flag routinely affects how cvs treats files, since it will disable any attempts at newline conversion. 但是在一个跨平台的商店中,二进制标志通常会影响cvs处理文件的方式,因为它会禁用任何新行转换的尝试。 Typically, any file which was committed from a Unix box will be correctly represented in the repository, so you can fix the problem on the Windows end by merely changing the tag and re-updating. 通常,从Unix框中提交的任何文件都将在存储库中正确表示,因此您只需更改标记并重新更新即可在Windows端修复问题。 Ie, 也就是说,
cvs admin -kb file
cvs update -A file

There are some other avenues you can take to interact with your *nix bretheren. 您可以采取其他一些途径与您的* nix bretheren进行互动。

  1. Install VirtualBox and a distribution of Linux so you can natively run the same toolset. 安装VirtualBox和Linux发行版,以便您可以本机运行相同的工具集。
  2. Install VirtualBox and a copy of Windows XP, which is known to work with TortoiseCVS. 安装VirtualBox和Windows XP的副本,已知可与TortoiseCVS一起使用。

You can find VMWare appliances pre-loaded with a linux distribution, which you can import into VMWare Player or VirtualBox. 您可以找到预先加载了Linux发行版的VMWare设备,您可以将其导入到VMWare Player或VirtualBox中。 From there you just need to connect up to your shared drive the same way that they do. 从那里,您只需要以与他们相同的方式连接到您的共享驱动器。

Please note that CVS is no longer being maintained. 请注意,不再维护CVS。 You should really be moving to SVN, git, or some other version control system. 您应该真正转向SVN,git或其他版本控制系统。

If you're using an IDE like Visual Studio or Eclipse, you should look for the appropriate plugin that integrates with your environment. 如果您使用的是像Visual Studio或Eclipse这样的IDE,那么您应该寻找与您的环境集成的相应插件。 Those might be better supported (though TortoiseCVS is likely just fine, even if the developers don't want to make any claims). 那些可能会得到更好的支持(尽管TortoiseCVS可能很好,即使开发人员不想提出任何索赔)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM