【发布时间】:2017-04-30 14:22:20
【问题描述】:
如何从命令行检查远程存储库中是否存在本地标记 mytag 并指向同一个变更集?
我相信只要解决以下子问题,我就能解决这个问题:
【问题讨论】:
如何从命令行检查远程存储库中是否存在本地标记 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})
【讨论】: