我使用 Eclipse 为 Android 开发 Java。我已经安装了 Mercurial 来与其他程序员一起控制源文件。 但我不喜欢 Mercurial 的工作方式,没有在有人修改文件时锁定文件的选项。 我知道 Mercurial 是这样工作的,但我们更喜欢锁“方法”。 除了带有锁定文件的 Mercurial 之外,还有其他选择吗? 有没有办法配置 Eclipse 以避免写入只读文件?如果我有一个只读源文件,我可以使用 Eclipse 打开它并在其中写入。
谢谢。
最佳答案
引自Mercurial: The Definitive Guide :
For instance, a distributed revision control system cannot, by its nature, offer a file locking facility. There is thus no built-in mechanism to prevent two people from making conflicting changes to a binary file. If you have a team where several people may be editing binary files frequently, it may not be a good idea to use Mercurial—or any other distributed revision control system—to manage those files.
但是,在该段落的正下方,有一个对您可以使用的扩展的引用,名为“锁定/解锁扩展”。快速搜索位于a page描述了该扩展,但我还没有使用它。链接的页面还暗示存在另一个同名的旧扩展。
最后一点,我个人同意书中的引用。如果您需要在工作流程中锁定文件或目录,尝试使用分布式版本控制系统只会给您带来问题。使用更传统的版本控制系统可能会更好。
关于android - 带锁文件的 Mercurial 替代方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12192963/