在 Mercurial / Hg 中查看文件
我用 Subversion 学习了版本控制,现在我正在尝试使用 Mercurial。在 Subversion 中,我在存储库中拥有一个项目,我可以将其签入我的 Visual Studio 项目文件夹并在那里进行处理。现在,我不仅仅在我的项目中使用 Mercurial 存储库。我有一个单独的本地副本和中央副本。修改本地副本的标准方法是直接修改存储库中的文件,但我不喜欢那样,因为如果需要,我无法重新定位任何内容。有没有办法在我想要的任何地方查看我的项目?我不喜欢编辑-复制-粘贴-提交的方法。
I learned version control with Subversion, and now I am trying to use Mercurial. In Subversion, I had one project in a repository by itself, and I could check it out into my Visual Studio Projects folder and work on it there. Now I am using a Mercurial repo with more than just my project. I have a separate local copy and central copy. The standard way of modifying the local copy is to modify the files directly in the repo, but I don't like that, because I can't relocate anything if need be. Is there a way to check out my project to wherever I want? I don't like the edit-copy-paste-commit approach.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的问题是这样的:
自 "Mercurial 不能做什么“ 在 Mercurial 文档中:
-->当您使用像 Mercurial 这样的分布式版本控制系统时,您应该尝试为每个项目创建一个存储库。
如果您这样做,您的问题就会消失,因为如果您需要修改 Project X,您只需将 Project X 的完整存储库克隆到您的计算机即可,仅此而已!
来自 Subversion,也许您应该阅读一个解释 SVN 和 HG 之间差异的教程,例如其中之一:
Your problem is this:
Quote from "What Mercurial can't do" in the Mercurial documentation:
--> When you use a distributed version control system like Mercurial, you should try to create one repository per project.
If you do it like this, your problem just goes away because if you need to modify Project X, you just clone Project X's complete repository to your machine, and that's it!
Coming from Subversion, maybe you should read a tutorial that explains the difference between SVN and HG, for example one of these:
您是否在寻找
hg pull -u /path/to/central/repo
?Are you looking for
hg pull -u /path/to/central/repo
?