hg克隆是否等效于hg(init→pull) [英] Is hg clone equivalent to hg (init→pull)
问题描述
在工作中,我正在使用一个由7个人共享的svn
存储库.
为了避免在提交时困扰我的错误并破坏所有人的构建,并避免在svn
中分支,我在当前正在使用的svn
目录的一部分中创建了一个hg
存储库. /p>
我在工作时会在hg上执行本地提交,并且由于我已经在虚拟机上进行了所有设置,所以我什至会将我的hg
存储库推送到私有的集中位置.
最近我迁移到破坏了我的虚拟机的Mac OS X lion
,因此我不得不重新设置它.所以我从svn trunk
中签出了项目,现在想在我正在处理的目录中找回hg更改集.
我有两个选择:
-
$ hg clone <remote repo>
-
$ hg init && hg pull <remote repo>
这等效吗?
唯一的区别是,如果您运行hg init && hg pull <remote>
,则还必须:
- 运行
hg update default
签出工作副本 - 手动设置
push
和pull
的默认路径
hg clone
只需一个命令即可完成所有这些操作.
At work I am using a svn
repository shared among 7 people.
To avoid plaguing my mistakes with commits and breaking the builds for everyone and to avoid branching in svn
, I have a created a hg
repository in a part of the svn
directory I am currently working on.
I perform local commits on hg as I work and since I have this all setup on a virtual machine, I am even pushing my hg
repository to a private centralized location.
Recently I migrated to Mac OS X lion
which broke my virtual machine, so I had to set it up again. So I checked out the project from my svn trunk
and now want to get back hg change sets in the directory I was working on.
I have two options:
$ hg clone <remote repo>
$ hg init && hg pull <remote repo>
Is this equivalent?
The only difference is that if you run hg init && hg pull <remote>
, then you must also:
- Run
hg update default
to checkout a working copy - Manually set up your default path for
push
andpull
hg clone
does all this in one command.
这篇关于hg克隆是否等效于hg(init→pull)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!