有时我想重新审视我在短时间内对SVN做出的更改,但不要回想起涉及的具体文件或版本号。所以我想看一个最近提交消息的列表,理想情况下包括每个提交中包含的文件。
我想到了我工作副本的根目录并输入如下内容,以查看与最近5次提交相关的消息和文件:
svn log -l5 -v *
不幸的是,此命令需要单个目标,并且不接受'*'。我知道SVN有我想要的信息。有一种简单的方法来检索它吗?
答案 0 :(得分:71)
您可以使用svn log -l5 -v <URL of your repository>
。 svn info
可用于获取工作副本所连接的存储库的根URL。
答案 1 :(得分:19)
svn log -q -v --limit N
内部工作副本(你有WC,不是吗?!)会显示最近提交的短提交提交 -message (mea culpa,-q supress commit-message输出)和仅文件
日志输出示例 - repo
>svn log -q -v http://mayorat.ursinecorner.ru:8088/svn/Hello/ -l 5
------------------------------------------------------------------------
r33 | lazybadger | 2012-02-28 16:10:41 +0600 (Вт, 28 фев 2012)
Changed paths:
M /trunk/Hello.en.txt
------------------------------------------------------------------------
r32 | lazybadger | 2011-12-27 17:37:31 +0600 (Вт, 27 дек 2011)
Changed paths:
M /trunk/Hello.de.txt
M /trunk/Hello.en.txt
------------------------------------------------------------------------
r31 | lazybadger | 2011-12-27 17:29:00 +0600 (Вт, 27 дек 2011)
Changed paths:
M /trunk/Hello.de.txt
M /trunk/Hello.en.txt
M /trunk/Hello.fr.txt
------------------------------------------------------------------------
r30 | lazybadger | 2011-10-19 16:23:52 +0600 (Ср, 19 окт 2011)
Changed paths:
M /trunk
------------------------------------------------------------------------
r29 | lazybadger | 2011-10-19 16:18:43 +0600 (Ср, 19 окт 2011)
Changed paths:
M /trunk
------------------------------------------------------------------------
提交消息的secong日志(已删除-q -v)
>svn log http://mayorat.ursinecorner.ru:8088/svn/Hello/ -l 5
------------------------------------------------------------------------
r33 | lazybadger | 2012-02-28 16:10:41 +0600 (Вт, 28 фев 2012) | 1 line
One more change
------------------------------------------------------------------------
r32 | lazybadger | 2011-12-27 17:37:31 +0600 (Вт, 27 дек 2011) | 1 line
Cleanups
------------------------------------------------------------------------
r31 | lazybadger | 2011-12-27 17:29:00 +0600 (Вт, 27 дек 2011) | 1 line
Purification
------------------------------------------------------------------------
r30 | lazybadger | 2011-10-19 16:23:52 +0600 (Ср, 19 окт 2011) | 1 line
Try fix FS #2
------------------------------------------------------------------------
r29 | lazybadger | 2011-10-19 16:18:43 +0600 (Ср, 19 окт 2011) | 1 line
如果我从根结帐回购并且在WC-rot中登录svn,结果将完全没有差异
Hello>svn log -q -v -l 5
------------------------------------------------------------------------
r33 | lazybadger | 2012-02-28 16:10:41 +0600 (Вт, 28 фев 2012)
Changed paths:
M /trunk/Hello.en.txt
------------------------------------------------------------------------
r32 | lazybadger | 2011-12-27 17:37:31 +0600 (Вт, 27 дек 2011)
Changed paths:
M /trunk/Hello.de.txt
M /trunk/Hello.en.txt
------------------------------------------------------------------------
r31 | lazybadger | 2011-12-27 17:29:00 +0600 (Вт, 27 дек 2011)
Changed paths:
M /trunk/Hello.de.txt
M /trunk/Hello.en.txt
M /trunk/Hello.fr.txt
------------------------------------------------------------------------
r30 | lazybadger | 2011-10-19 16:23:52 +0600 (Ср, 19 окт 2011)
Changed paths:
M /trunk
------------------------------------------------------------------------
r29 | lazybadger | 2011-10-19 16:18:43 +0600 (Ср, 19 окт 2011)
Changed paths:
M /trunk
答案 2 :(得分:2)
对于TortoiseSVN用户:
TortoiseSVN
&gt; Show log
出现日志窗口。
Shift
并选择您感兴趣的上一个日志(Ctrl
+ A
以全部选择。或者您可以使用Ctrl
选择法)。Copy to clipboard
&gt; Messages
提交消息的日志将复制到剪贴板。
Ctrl
+ v
)。保存文件,如您所愿。答案 3 :(得分:-1)
svn log -l5 -v http://99.9.9.999/repos/reposName
// This will show you only last 5 commit records
svn log -q -v http://99.9.9.999/repos/reposName
// This will show you all the commit records