You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2013/05/28 06:00:11 UTC

svn commit: r1486733 - in /subversion/branches/1.8.x: ./ STATUS tools/server-side/svnpubsub/commit-hook.py

Author: svn-role
Date: Tue May 28 04:00:11 2013
New Revision: 1486733

URL: http://svn.apache.org/r1486733
Log:
Merge r1486457 from trunk:

 * r1486457
   svnpubsub: make the example commit hook work with 1.8 libsvn_repos.
   Justification:
     Examples should work.
   Votes:
     +1: brane (via dev@), breser, danielsh

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/tools/server-side/svnpubsub/commit-hook.py

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1486457

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1486733&r1=1486732&r2=1486733&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue May 28 04:00:11 2013
@@ -105,10 +105,3 @@ Approved changes:
 # blocking issues.  If in doubt see this link for details:
 # http://subversion.apache.org/docs/community-guide/releasing.html#release-stabilization
 
- * r1486457
-   svnpubsub: make the example commit hook work with 1.8 libsvn_repos.
-   Justification:
-     Examples should work.
-   Votes:
-     +1: brane (via dev@), breser, danielsh
-

Modified: subversion/branches/1.8.x/tools/server-side/svnpubsub/commit-hook.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/tools/server-side/svnpubsub/commit-hook.py?rev=1486733&r1=1486732&r2=1486733&view=diff
==============================================================================
--- subversion/branches/1.8.x/tools/server-side/svnpubsub/commit-hook.py (original)
+++ subversion/branches/1.8.x/tools/server-side/svnpubsub/commit-hook.py Tue May 28 04:00:11 2013
@@ -19,6 +19,9 @@
 SVNLOOK="/usr/local/svn-install/current/bin/svnlook"
 #SVNLOOK="/usr/local/bin/svnlook"
 
+HOST="127.0.0.1"
+PORT=2069
+
 import sys
 import subprocess
 try:
@@ -28,9 +31,6 @@ except ImportError:
 
 import urllib2
 
-HOST="127.0.0.1"
-PORT=2069
-
 def svncmd(cmd):
     return subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
 
@@ -86,8 +86,8 @@ def main(repo, revision):
     do_put(body)
 
 if __name__ == "__main__":
-    if len(sys.argv) != 3:
-        print "invalid args"
+    if len(sys.argv) not in (3, 4):
+        sys.stderr.write("invalid args\n")
         sys.exit(0)
 
-    main(sys.argv[1], sys.argv[2])
+    main(*sys.argv[1:3])