hg克隆是否等效于hg(init→pull) [英] Is hg clone equivalent to hg (init→pull)

查看:80
本文介绍了hg克隆是否等效于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>,则还必须:

  1. 运行hg update default签出工作副本
  2. 手动设置pushpull
  3. 的默认路径

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:

  1. Run hg update default to checkout a working copy
  2. Manually set up your default path for push and pull

hg clone does all this in one command.

这篇关于hg克隆是否等效于hg(init→pull)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆