Well, I can't see really your trouble-point here
- Any (almost any) operation in pre-commit hook with transaction (and local repo) can be performed with
svnlook
- svnlook have subcommand propget, with can operate on transaction level and extract any property from any path inside repo (transaction in this case), and you must already know, there you can meet externals inside repo-tree
- you can identify correct|needed format of externals from any previous revision inside repo
Edit
OK, I see: additional details is needed here. For tests and experimenting I used open repository Proving Ground for externals on Assembla, which have PEG-ed revision in tags and not PEG-ed in trunk. In order to use svnlook locally I just svnrdump'ed it into local repository.
- Nearest equivalent to getting property from transaction is getting it from committed revision.
Tag 1.0.1 was created with r7
>svnlook pg rep svn:externals tags/1.0.1/ -r 7
-r 2 https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib@2 lib
where:
rep
is relative path to repository on local filesystem
tags/1.0.1/
is path inside repository, for which I previously know, that it should have definition
-r 7
is revision, which I want to test
Tag was created from trunk, in which external is not binded to specific revision
>svnlook pg rep svn:externals trunk/ -r 6
https://subversion.assembla.com/svn/subversion-trouble-shooting/trunk/lib lib
You'll have to see difference in specification now
WARNING: format of externals-definition will be different in case of using ancient (pre 1.4) SVN-clients and can be slightly different (can't recall exact details) in case of using CLI-version of SVN or SVN-integration from IDE (definitions above I created with TortoiseSVN), but it will be your part of job
- I order to apply business logic of hook only when it needed (for commits in /tags only) and finish commits faster, you have also check in hook (at early stages) additional condition - is this commit tag-related or not. It's again svnlook and
dirs-changed
subcommand
dirs-changed
for commit into tags
>svnlook dirs-changed rep -r 7
tags/
tags/1.0.1/
dirs-changed
for commit into other location
>svnlook dirs-changed rep -r 6
trunk/
you can |grep tags
in good OS, do some tricks in Windows, operate according to results
PS: Don't forget replace -r
with -t
on production and store transaction-id+repo-path, which you'll get as parameters for hook