0

I am writing some pre commit hook script to modify files and commit it. While I was going through internet I found we can use "svn st" command to get list of files. But this will give all files which I don't want to commit right now.

So i need list of files which are being committed to svn for current commit.

This one I think we can get from transaction_id but not sure how to take?

Any help on this please?

Thanks.

I need one command to get list of files being committed so that we can pass that as argument to pre commit hook and get list of files.

peterjohn
  • 1
  • 1
  • You should never modify contents of an incoming transaction using a pre-commit hook. – bahrep Apr 19 '23 at 13:57
  • I need to format code while committing files, so using pre commit hooks. To do so i need list of file which are being comming. Is there any way to do so? – peterjohn Apr 19 '23 at 14:05
  • Commit hooks can be used for validation and verification, not for modifying the code you are committing. – bahrep Apr 19 '23 at 14:42
  • Yes, either modifying or validating code. Need command to get list of files which are being committed. how to get list of files being committed in pre-commit hook ? – peterjohn Apr 19 '23 at 19:07
  • Use ‘svnlook changed’. – bahrep Apr 19 '23 at 19:39

0 Answers0