Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4574DC994 for ; Wed, 19 Jun 2013 11:03:39 +0000 (UTC) Received: (qmail 17977 invoked by uid 500); 19 Jun 2013 11:03:39 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 17965 invoked by uid 500); 19 Jun 2013 11:03:39 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 17958 invoked by uid 99); 19 Jun 2013 11:03:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jun 2013 11:03:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jun 2013 11:03:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2DB312388847; Wed, 19 Jun 2013 11:03:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1494548 - /subversion/trunk/tools/server-side/svnpubsub/svnwcsub.py Date: Wed, 19 Jun 2013 11:03:16 -0000 To: commits@subversion.apache.org From: danielsh@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130619110316.2DB312388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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