$ id $命令仅指定修订号。有没有办法获取提交的标签名称或最新的标签?
如果您能解释如何使用TortoiseSVN,我感激不尽,如果可能的话。
答案 0 :(得分:1)
目前的Subversion 1.9版本中没有这样的关键字。
来自评论:
@WillyG所以关键字扩展只能在例如 /tags/release-1.2/myversion.txt,对吧?
@bahrep是的,这就足够了。
既然你说这种方法就足够了,我可以猜测,你可以手动或使用脚本来代替使用关键字,而不是使用关键字。例如。在标记版本之前,创建或修改文件myversion.txt以包含标记的名称。
BTW,正如@rup已经建议的那样,你可以在users@ SVN mailing list提出这个问题。
答案 1 :(得分:1)
但
你可以考虑在其中使用SubWCrev魔法,即:
BEGIN Declare StartRow int; set StartRow = ((PageNumber - 1) * PageSize); set @sql1=( SELECT t.qid, t.title, t.vote, t.answer_count, t.creation_date, t.uid, t.username, MAX(CASE WHEN t.constantTagNumber = 1 THEN t.tag END) AS tag1, MAX(CASE WHEN t.constantTagNumber = 1 THEN t.tid END) AS tid1, MAX(CASE WHEN t.constantTagNumber = 2 THEN t.tag END) AS tag2, MAX(CASE WHEN t.constantTagNumber = 2 THEN t.tid END) AS tid2, MAX(CASE WHEN t.constantTagNumber = 3 THEN t.tag END) AS tag3, MAX(CASE WHEN t.constantTagNumber = 3 THEN t.tid END) AS tid3, MAX(CASE WHEN t.constantTagNumber = 4 THEN t.tag END) AS tag4, MAX(CASE WHEN t.constantTagNumber = 4 THEN t.tid END) AS tid4, MAX(CASE WHEN t.constantTagNumber = 5 THEN t.tag END) AS tag5, MAX(CASE WHEN t.constantTagNumber = 5 THEN t.tid END) AS tid5 FROM ( SELECT questions.id as qid, title, creation_date, vote, answer_count, tags.id as tid, tag, username, users.id as uid, IF (@prev = qid ,@c := @c + 1,@c := 1) constantTagNumber, @prev := qid FROM ( SELECT @prev := 0 ,@c := 1) var,question_tags INNER JOIN tags ON question_tags.tid = tags.id RIGHT JOIN questions ON question_tags.qid = questions.id INNER JOIN users ON users.id=owner_id ORDER BY qid,tid ) t GROUP BY t.qid); set @sql=CONCAT(@sql1," ORDER BY ",filter," desc LIMIT", StartRow,",",PageSize); PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt; END
$WCISTAGGED$
如果替换为TText 存储库URL包含标记分类模式,或FText if 不
关键字,模板文件中的$WCISTAGGED?TText:FText$
被需要的tag-name(部署前)替换为手工或其他一些自动化脚本