Mercurial command to combine hg pull; hg up

后端 未结 4 2019
别那么骄傲
别那么骄傲 2021-01-04 03:09

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

4条回答
  •  既然无缘
    2021-01-04 03:37

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

提交回复
热议问题