Author: danielsh
Date: Wed Jun 19 11:03:15 2013
New Revision: 1494548
URL: http://svn.apache.org/r1494548
Log:
[in tools/server-side/svnpubsub]
svnwcsub: tell pre-update what revision it will be updatin gto.
* svnwcsub.py
(BackgroundWorker._update): Determine HEAD before updating to it, pass that
to the pre-update/pre-boot hook.
Modified:
subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
Modified: subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py?rev=1494548&r1=1494547&r2=1494548&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py (original)
+++ subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py Wed Jun 19
11:03:15 2013
@@ -299,11 +299,12 @@ class BackgroundWorker(threading.Thread)
logging.info("updating: %s", wc.path)
## Run the hook
+ HEAD = svn_info(self.svnbin, self.env, wc.url)['Revision']
if self.hook:
hook_mode = ['pre-update', 'pre-boot'][boot]
logging.info('running hook: %s at %s',
wc.path, hook_mode)
- args = [self.hook, hook_mode, wc.path, wc.url]
+ args = [self.hook, hook_mode, wc.path, HEAD, wc.url]
rc = check_call(args, env=self.env, __okayexits=[0, 1])
if rc == 1:
# TODO: log stderr
@@ -322,12 +323,13 @@ class BackgroundWorker(threading.Thread)
'--config-option',
'config:miscellany:use-commit-times=on',
'--',
- wc.url,
+ wc.url + '@' + HEAD,
wc.path]
check_call(args, env=self.env)
### check the loglevel before running 'svn info'?
info = svn_info(self.svnbin, self.env, wc.path)
+ assert info['Revision'] == HEAD
logging.info("updated: %s now at r%s", wc.path, info['Revision'])
## Run the hook