【问题标题】:How can I switch to a tag/branch in hg?如何切换到 hg 中的标签/分支?
【发布时间】:2011-01-10 16:54:45
【问题描述】:

我遵循https://developer.mozilla.org/En/Developer_Guide/Source_Code/Mercurial 中的文档 并下载 FF 源代码:

hg clone http://hg.mozilla.org/mozilla-central/ src

如何切换到 FF3.6 的“分支”或“标签”?文档说

hg clone http://hg.mozilla.org/releases/mozilla-1.9.2/ 192src

但我不想克隆 FF main 和 FF3.6 两次?

【问题讨论】:

    标签: mercurial


    【解决方案1】:

    一旦你克隆了 repo,你就拥有了一切:然后你可以hg up branchnamehg up tagname 来更新你的工作副本。

    UP:hg uphg update的快捷方式,对于有git习惯的人也有hg checkout别名。

    【讨论】:

    • crazyscot - 必须克隆和结帐吗?是否不可能在 1 步中获取您想要的内容(即,hg clone http://hg.nginx.org/nginx -r "1.4.4" 签出项目的 1.4.4 版本)。
    • hg branch 仅列出 default,但 repo 有标签!要列出标签,请使用 hg tags
    • 克隆后可以使用hg clone -u 更新
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-25
    • 2011-06-12
    • 2020-10-17
    • 2011-06-20
    • 1970-01-01
    • 2018-05-17
    相关资源
    最近更新 更多