大网数据广告活动
服务器运维问答

Get last modification date on many SVN repos

· 52CE 我爱测

I'm hosting svn server for my developers. From server I see all configured dirs with svn repos. I want to get last modification date on all of them(obout 30 different projects). I don't want to connect to all of them make checkou…

问题原文

原帖链接 · B14D3 · CC BY-SA 3.0

I'm hosting svn server for my developers. From server I see all configured dirs with svn repos. I want to get last modification date on all of them(obout 30 different projects). I don't want to connect to all of them make checkout and then with svn command on each check last modification. I want use only bash to extract that info but have no idea how and even is it possible in that way.

EDIT1: it looks like this that a have for example 10 project in different repos on the same server (no branches)... all project sits in one directory configured as different svn repos:

/svn_repos/project1

/svn_repos/project2

/svn_repos/project3

...

/svn_repos/project10

已采纳解答

原帖链接 · 200_success · CC BY-SA 3.0

svnlook tree --full-paths "$REPO" | grep '/branches/[^/]*/$' | \
while read branch ; do
    svnlook history -l 1 "$REPO" "$branch"
done | while read revision path ; do
    # Input looks like the following, in a loop...
    #
    # REVISION   PATH
    # --------   ----
    #       20   /path/to/branch
    case "$revision" in
      REVISION|--------) : ;;  # Skip headers
      *) echo "$path" `svnlook date -r "$revision" "$REPO"`
         ;;
    esac
done

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-08-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。