-1
如何從命令行局部變量mytag
是否存在於遠程倉庫,並指向相同的變更檢查?如何檢查遠程存儲庫包含的標籤?
我相信,一旦我解決以下幾個子問題,我可以解決這個問題:
- How do I find out which changeset added a tag?
- How to find out whether a remote repository contains a changeset?
如何從命令行局部變量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})