如何检查远程存储库是否包含标签?
How to check if remote repository contains tag?
如何从命令行检查本地标记 mytag
是否存在于远程存储库中并指向相同的变更集?
我相信只要我解决了以下子问题,我就能解决这个问题:
基于上述子问题,我认为以下内容可行:
// 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})
如何从命令行检查本地标记 mytag
是否存在于远程存储库中并指向相同的变更集?
我相信只要我解决了以下子问题,我就能解决这个问题:
基于上述子问题,我认为以下内容可行:
// 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})