如何从命令行检查远程存储库中是否存在本地标记mytag
并指向相同的变更集?
我相信一旦解决了以下子问题,我就能解决这个问题:
答案 0 :(得分:0)
根据上述子问题,我相信以下内容可行:
// 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})