[英]svn externals check for new revisions
We have some externals definitions in our project. 我们的项目中有一些外部定义。 The externals are defined with a revision number (we want to keep it that way and don't want to use the head-revision).
外部定义有修订版本号(我们希望保持这种方式,并且不希望使用起始修订版)。
What we are looking for is some kind of notification that is triggered when a newer revision for an external of that project is available. 我们正在寻找的是某种通知,当该项目的外部有较新的修订版本时将触发该通知。 So that we know when we could (if we wanted to) switch to a newer revision of that external.
这样我们就知道何时可以(如果需要)切换到该外部设备的较新版本。
At the moment we're using the TortoiseSVN command line tools in a script, but that has some drawbacks. 目前,我们正在脚本中使用TortoiseSVN命令行工具,但这有一些缺点。
Is there a tool or script that does what we want? 是否有我们想要的工具或脚本?
In case there is not which one is the better approch: 如果没有哪个是更好的方法:
Just concepts, which you can translate into code 只是概念,您可以将其转化为代码
If you have PEG-definition of external in form URL/OF/EXTERNAL@RevNo
, you know URL of the latest revision: it will be URL/OF/EXTERNAL@HEAD
or just URL/OF/EXTERNAL
如果您具有
URL/OF/EXTERNAL@RevNo
形式的PEG外部定义,则您知道最新版本的URL/OF/EXTERNAL@HEAD
:它将是URL/OF/EXTERNAL@HEAD
或仅仅是URL/OF/EXTERNAL
In order to monitor changes, you can diff two URLs 为了监视更改,您可以区分两个URL
Because you want to know fact of changes, you can call diff with --summarize
option 因为您想知道更改的事实,所以可以使用
--summarize
选项调用diff。
>svn diff https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk@5 https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk@HEAD --summarize
M https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk
Here trunk@5
is revision from definition, not-empty output - sign of existing additional commits in linked repo, which you have to identify additionally, maybe with default diff 这里
trunk@5
是来自定义的修订版,不是空输出-链接存储库中现有其他提交的标志,您必须额外标识,也许使用默认差异
>svn diff https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk@5 https://subversion.assembla.com/svn/subversion-troubleshoot-b/trunk@HEAD
Index: .
===================================================================
--- . (revision 5)
+++ . (revision 7)
...
started with +++ string contain numeric value of HEAD 以+++字符串开头的字符串包含HEAD的数值
Another approach 另一种方法
If you have externals definition, fe 如果您具有外部定义,则
>svn pl https://subversion.assembla.com/svn/subversion-troubleshoot-b/tags/1.0.1 -v
Properties on 'https://subversion.assembla.com/svn/subversion-troubleshoot-b/tags/1.0.1':
svn:externals
-r 2 https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib@2 lib
you can ls external and get revision of head (and compare it with definition's value) 您可以通过外部获取head的修订版(并将其与定义值进行比较)
>svn ls -v https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib
2 teno окт 17 2012 ./
2 teno 23 окт 17 2012 lib01.txt
first column of string ./
contain HEAD-revision 字符串
./
第一列包含HEAD-revision
No-coding way 无编码方式
Install CommitMonitor (for http-type repos), add all externals into it, control Monitor activity, check, check commit-logs 安装CommitMonitor (用于http型存储库),将所有外部组件添加到其中,控制Monitor的活动,检查并检查提交日志
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.