/[Apache-SVN]
ViewVC logotype

Revision 1486500


Jump to revision: Previous Next
Author: brane
Date: Mon May 27 02:52:10 2013 UTC (10 years, 11 months ago)
Changed paths: 4
Log Message:
In SvnPubSub, extract wrapper for subprocess.check_output into a common utility
module. And make problems in the server hooks more visible by exiting with an
error if the hook fails to run.

[in tools/server-side/svnpubsub]
* svnpubsub/util.py: New module.
  (check_output): Wrapper for subprocess.check_output to make it available
   on versions of Python older than 2.7.

* svnwcsub.py (check_output): Removed. Imported from svnpubsub.util instead.
  (svn_info): Updated call to check_output.

* commit-hook.py: Do 'import svnpubsub.util' and do not 'import subprocess'.
  (svnlook): Renamed from svncmd; calls svnpubsub.util.check_output and
   expects the command to be a list, not a string. All callers updated.
  (svnlook_uuid): Renamed from svncmd_uuid. All callers updated.
  (svnlook_info): Renamed from svncmd_info. All callers updated.
  (svnlook_changed): Renamed from svncmd_changed. All callers updated.
  At top level: Exit with an error code if the number of arguments is wrong.

* revprop-change-hook.py: Same changes as in commit-hook.py, except that the
   renamed functions are: svnlook (from svncmd), svnlook_uuid (from svncmd_uuid)
   and svnlook_revprop (from svncmd_revprop).


Changed paths

Path Details
Directorysubversion/trunk/tools/server-side/svnpubsub/commit-hook.py modified , text changed
Directorysubversion/trunk/tools/server-side/svnpubsub/revprop-change-hook.py modified , text changed
Directorysubversion/trunk/tools/server-side/svnpubsub/svnpubsub/util.py added
Directorysubversion/trunk/tools/server-side/svnpubsub/svnwcsub.py modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26