简体   繁体   中英

Mercurial command to combine hg pull; hg up

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

Obviously, hg pull -u is the answer here.

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 (eg 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.

键入hg help pull ,你会看到-u开关

You can use:

hg pull -u

Read the documentation for more options.

The hg fetch extension will do the same once enabled. However, it has fallen out of favor and is noted as an "unloved feature" by the Mercurial team.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM