开发者

SVN post commit hook: record number of pages in LaTeX document?

I would like to record how the number of pages of my LaTeX document grows over time.

I store the foo.tex file in my SVN repository, so I'm thinking I can use a post-commit script for that, which runs LaTeX automatically (whenever changes to foo.tex are committed), extracts the number of pages and writes it into the log file.

开发者_如何学JAVA

Is that the right approach? Any tips / suggestions on how to best implement it? For example, how do I set it up so that the script is only called when changes to foo.tex are committed?


For windows

@echo off
SET SVNLOOK=C:\Program Files\CollabNet Subversion Server\svnlook.exe
SET GREP=D:\SVN\Repo\hooks\grep.exe

("%svnlook%" changed -t %2 %1 | "%grep%" "^U.*/foo.tex") && (shell out to make the modification)

I'm not sure what command you would use to actually set the revprop... I'm still researching...

I think that during the transaction, the message is read-only. You may have to delay-execute

svn propset --revprop -r ## svn:log "MESSAGE"

if the prop needs updating.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜