【问题标题】:How to check if remote repository contains tag?如何检查远程存储库是否包含标签?
【发布时间】:2017-04-30 14:22:20
【问题描述】:

如何从命令行检查远程存储库中是否存在本地标记 mytag 并指向同一个变更集?

我相信只要解决以下子问题,我就能解决这个问题:

  1. How do I find out which changeset added a tag?
  2. How to find out whether a remote repository contains a changeset?

【问题讨论】:

    标签: command-line mercurial


    【解决方案1】:

    基于上述子问题,我相信以下方法会起作用:

    // Get the changeset that the tag points to
    def referenced = $(hg id -q -r ${tag})
    
    // Get the changeset that added the tag
    def addedTag = $(hg log -r children(${referenced}) --template {node})
    
    // Check whether the remote repository contains the changeset
    def tagFound = $(hg outgoing -r ${addedTag})
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-01-03
      • 1970-01-01
      • 2012-12-31
      • 2020-02-09
      • 2016-05-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多