I need to configure a post-commit hook that will identify a rename operation as Rename in the email.
The concern is that we are able to identify them as a Delete & Add operation, but we need to put it up as a single Rename operation.
Same is true with Move operation which is internally treated as Copy / Delete operation.
Any help on which svn property can be exploited for this purpose will be appreciated.
In post-commit hook you have two possibilities
Choice 1
Parse output of ordinary svn log
for commited revision
>svn log -v -q -r HEAD
------------------------------------------------------------------------
r3 | Badger | 2014-05-16 10:46:29 +0600 (Пт, 16 май 2014)
Changed paths:
D /trunk/A.txt
D /trunk/B.txt
A /trunk/C.txt (from /trunk/A.txt:2)
A /trunk/D.txt
------------------------------------------------------------------------
(here A.txt was renamed into C.txt using svn mv
, B.txt moved into D.txt using OS-command only)
Choice 1
Because it's repository-side operation, use svnlook
(more compact and noise-free output)
>svnlook changed --copy-info z:\Repo
D trunk/A.txt
D trunk/B.txt
A + trunk/C.txt
(from trunk/A.txt:r2)
A trunk/D.txt