本文介绍了如何使用Mercurial(hg)拥有多个工作空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想绕过Mercurial,所以这可能是一个愚蠢的问题.

I am just trying to my head round Mercurial, so this may be a daft question..

打开,我希望在我的机器上编译一个程序的多个版本,例如,我可能需要在调试器中单步执行工作版本"和蕨菜"版本,直到我发现行为方式不一样.

Open I wish to have more than one version of a program compiled on my machine, for example, I may need to single step both the "working versions" and the "bracken" version in a debugger until I find way the behave differently.

我还喜欢在完成检查后签出到干净的工作区,因此我可以(通过构建)来检查我是否忘记添加文件.

I also like to checkout to a clean workspace after I have done a check, so I can check (by doing a build) that I have not forgot to add a file.

在大多数源代码控制系统中,这很容易做到,但是Mercurial似乎不支持此功能.我想念什么?

This is easy to do in most source code control system, but Mercurial does not seem to support this. What am I missing?

推荐答案

Mercurial比大多数版本控制系统更好地支持此模型.

Mercurial supports this model better than most Version Control Systems.

诀窍在于,您的计算机上可以具有相同代码的多个存储库.每个存储库都支持一个工作目录,您可以在其中保存代码.

The trick is that you can have multiple repositories of the same code on your machine. Each repository supports one working directory, where you will keep your code.

您可以在存储库之间移动更改,也可以将更改从其他计算机(例如中央存储库)移动到存储库.

You can move changes between the repositories, or from these to repositories on other machines, such as a central repo.

Mercurial用户可能会读到我在完成检查后也想签出到干净的工作区....",这是因为我想在提交检查后克隆存储库的新副本."代码."这很容易做到.

A Mercurial user might read your statement "I also like to checkout to a clean workspace after I have done a check...." as "I would like to clone a new copy of the repository after I have committed my checked code." And this is easily done.

这篇关于如何使用Mercurial(hg)拥有多个工作空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 20:04