Get First Commit with SVN Hook

325 views Asked by At

HI... Im trying to make a svn hook to check the first commit in repository. SVN Hook dont support "Add". So if i get the first commit, i can simulate the first entery of file in repository. I dont have any ideias, please help.

1

There are 1 answers

0
khmarbaise On

I assume you are in the pre-commit hook. You can use svnlook command like the following

svnlook changed -t TXN REPOS_PATH

to get the information about files/folders which have been added etc. Furthermore you can check by

svnlook youngest REPOS_PATH

which revision does the repository have at the moment so the combination of the svnlook youngest and the above svnlook changed should solve your problem.