Mercurial命令结合汞拉;拥抱 [英] Mercurial command to combine hg pull; hg up

查看:97
本文介绍了Mercurial命令结合汞拉;拥抱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Mercurial命令hg pullhg update合并为一个?

How can I combine the Mercurial commands hg pull and hg update into one?

推荐答案

很显然,hg pull -u是这里的答案.

Obviously, hg pull -u is the answer here.

但是,有一个警告值得一提:hg pull -u并不完全等同于hg pull&& hg update.文档中简要提到了这一点,但是如果您初次接触它,可能会感到惊讶.如果没有什么要提取的内容(例如没有新的变更集进来),则hg pull -u不会更新.如果您在发出该命令之前还不为所动,这可能会造成一些混乱.

However, there's a caveat that deserves mentioning: hg pull -u is not exactly equivalent to hg pull && hg update. This is briefly mentioned in the documentation, but it can be surprising if you first run into it; if there's nothing to pull (e.g. no new changesets came in), then hg pull -u doesn't update. This can be slightly confusing if you weren't on a head before issuing the command.

这篇关于Mercurial命令结合汞拉;拥抱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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