如何查找我的代码库是否是最新的?
我们的 svn 存储库的结构类似于
-- trunk
|
-- tags
|
- 4.0.0
|
- 4.0.1
|
- 4.0.2
|
- 4.0.2b
现在,如果我进入生产站点,进入带有标签 4.0.2b 的目录并执行 svn info
我会得到您在下面看到的内容。我的理解是,修订号(修订版:13107
和最后更改修订版:13104
)是不同的,因为有人在某处提交了某些内容。
我的问题是我如何知道 4.0.2b 是最新的 = 带有最新代码的标签?我可以在不执行 svn up 的情况下找到答案吗?
URL: svn+ssh://[email protected]/sever/lib/svne2/edumate2/tags/4.0.2b
Repository Root: svn+ssh://[email protected]/var/lib/svne2/edumate2
Repository UUID: edccd8aa-08f3-0310-ac9a-cddb71435de8
Revision: 13107
Node Kind: directory
Schedule: normal
Last Changed Author: kon
Last Changed Rev: 13104
Last Changed Date: 2012-02-17 13:31:43 +1100 (Fri, 17 Feb 2012)
注意: 我们致力于标记错误的快速修复。
We have svn repository with a structure like
-- trunk
|
-- tags
|
- 4.0.0
|
- 4.0.1
|
- 4.0.2
|
- 4.0.2b
Now if I go to production site into a directory with the tag 4.0.2b and do svn info
I get what you can see below. What I understood is that the revision numbers (Revision: 13107
and Last Changed Rev: 13104
) are different because somebody committed something somewhere.
My question is how can I know that the 4.0.2b is upto date = tag with the latest code? Can I find out without doing svn up
?
URL: svn+ssh://[email protected]/sever/lib/svne2/edumate2/tags/4.0.2b
Repository Root: svn+ssh://[email protected]/var/lib/svne2/edumate2
Repository UUID: edccd8aa-08f3-0310-ac9a-cddb71435de8
Revision: 13107
Node Kind: directory
Schedule: normal
Last Changed Author: kon
Last Changed Rev: 13104
Last Changed Date: 2012-02-17 13:31:43 +1100 (Fri, 17 Feb 2012)
NOTE:
We commit to tags quick fix of bugs.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您只是想知道自己是否是最新的,
svn update
有点太多了,因为它实际上执行更新(这是一个更改,而不仅仅是信息) 。尝试 svn status -u ,您将获得没有副作用的信息。
现在,如果您想知道标签是否是“最新代码”,请记住标签只不过是复制到特殊目录中,因此不应允许它们进行后续更新。
If you are just looking to find out if you are up-to-date, a
svn update
is just a bit too much because it actually performs the update (which is a change, and not just information).Try
svn status -u
and you will get the information without the side-effects.Now, if you want to find out if a tag is the "latest code" remember that tags are nothing more than copies into special directories, and as such they shouldn't be allowed subsequent updates.
svn status --show-updates
(或简称svn stat -u
)将显示分支/标签的服务器版本上的任何更改svn update
将拉取。svn status --show-updates
(orsvn stat -u
for short) will show any changes that are on the server version of your branch/tag that ansvn update
would pull.您可以使用 svn status -u ,它显示存储库中当前工作副本中不存在的更改列表。
它基本上向您展示了
svn up
在不将更改拉入工作副本的情况下会做什么。You could use
svn status -u
, which shows a list of changes in the repository that don't exist in your current working copy.It basically shows you what a
svn up
would do without pulling the changes into the working copy.