My favorites | Sign in
Google
             
New issue | Search
for
| Advanced search | Search tips
Issue 558: googlecode_upload.py broken on OSX Leopard
13 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  andy.chooooo
Closed:  Feb 2009
Cc:  sussman
Type-Defect
Priority-Medium
Milestone-2009
Component-Downloads


Sign in to add a comment
 
Reported by hendriko, Nov 15, 2007
What steps will reproduce the problem?
Step 1. Download googlecode_upload.py
Step 2. Run googlecode_upload.py using the default python install that
comes with OSX 10.5

What is the expected output? What do you see instead?
It should work.
It seems that the syntax for a command in libsvn changed:

Traceback (most recent call last):
  File "/Users/hendrik/scripts/googlecode_upload.py", line 312, in <module>
    sys.exit(main())
  File "/Users/hendrik/scripts/googlecode_upload.py", line 300, in main
    options.config_dir, options.user)
  File "/Users/hendrik/scripts/googlecode_upload.py", line 227, in
upload_find_auth
    (svn_username, password) = get_svn_auth(project_name, config_dir)
  File "/Users/hendrik/scripts/googlecode_upload.py", line 93, in get_svn_auth
    auth = svn_config_read_auth_data(SVN_AUTH_CRED_SIMPLE, realm, config_dir)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/libsvn/core.py",
line 2652, in svn_config_read_auth_data
    return apply(_core.svn_config_read_auth_data, args)
TypeError: svn_config_read_auth_data() takes at least 4 arguments (3 given)


What version of the product are you using? On what operating system?
OSX 10.5, Python 2.5, svn 1.4.4

 
Comment 1 by fitz, Nov 15, 2007
Hmm.  I'm wondering if something changed with svn_config_read_auth somewhere...

You can just tweak svn_get_auth to return (None, None) for a quick fix, but this is a
bug that should be fixed
Labels: Milestone-2007 Component-Downloads
Comment 2 by hendriko, Nov 15, 2007
This is the doc string from svn_config_read_auth_data
"""
    svn_config_read_auth_data(apr_hash_t hash, char cred_kind, char realmstring, 
        char config_dir, apr_pool_t pool) -> svn_error_t
"""
Comment 3 by richard.quirk, Nov 17, 2007
Same problem on Ubuntu 7.10.

There was a patch to fix this posted on the hosting group a while back (pass a
apr_hash_t as the first argument) but I haven't been able to get it to work. It made
use of "csvn", which doesn't seem to be provided by Ubuntu in the any of the python
subversion bindings, or in the ctypes module. Here's the message anyway:

http://groups.google.com/group/google-code-hosting/browse_thread/thread/fe42b81d6864d9e3/eb667e69eca64612

Comment 4 by hendriko, Nov 17, 2007
Thanks for the pointer. 
Maybe the csvn is a typo? Because it only seems to be used in the import statement. 
I'll give this a try.
Comment 5 by hendriko, Dec 01, 2007
The patched script works for me (on OSX 10.5). 
It looks like the csvn import is supposed/expected to fail. 

Comment 6 by richard.quirk, Feb 19, 2008
Attached is the patch from that google groups message, since the one there is messed
up for copy-paste-patch by the formatting of the email. I'm not the patch author BTW,
credit to Zhang Le.

Indeed the csvn thing is a red herring. It is only their in lieu of the csvn bindings
being written by a summer of code project at some point in the future.

The proposal here is to do as fitz said in comment 2, plus pass the updated params to
the new svn bindings. Also a --password option is added as a workaround for the lack
of auth directory reading, so upload is possible without user intervention. e.g.
grep/awk values from ~/.subversion/auth/simple in a non portable way ;) and pass them
on to the upload program.

It might be nice if something like this (--password, extra try: except:) was added
"officially" to the support script, even if it were only to stop the current version
from crashing out on newer builds of the svn python bindings.
0001-Add-password-option-as-a-workaround-for-changes-in-s.patch
6.3 KB Download
Comment 7 by jrobbins, Feb 19, 2008
(No comment was entered for this change.)
Owner: piaw.na
Comment 8 by per.abrahamsen, Mar 17, 2008
I have the same problem in Cygwin.
Comment 9 by azmatalipasha, May 21, 2008
(No comment was entered for this change.)
Status: Accepted
Owner: tonyzale
Labels: -Milestone-2007 Milestone-2008-Q3
Comment 10 by simon75j, Jun 10, 2008
I have the same problem on Debian testing.
Comment 11 by azmatalipasha, Dec 17, 2008
(No comment was entered for this change.)
Labels: -Milestone-2008-Q3 Milestone-2009-Q1
Comment 12 by r1chardj0n3s, Jan 14, 2009
Problem persists, Ubuntu Hardy.
Comment 13 by r1chardj0n3s, Jan 15, 2009
I have implemented a hackish solution to fix it under Ubuntu Hardy for my use-case.
Instructions are at:
http://www.mechanicalcat.net/richard/log/Python/Sane_Python_application_packaging__conclusion__for_now
Comment 14 by azmatalipasha, Jan 21, 2009
Please take a look and see if you can reproduce this issue. 
Status: Reviewed
Labels: -Milestone-2009-Q1 Milestone-2009
Comment 15 by azmatalipasha, Feb 06, 2009
(No comment was entered for this change.)
Status: Accepted
Comment 16 by mwhdev, Feb 12, 2009
(No comment was entered for this change.)
Status: Started
Owner: mwhdev
Comment 17 by mwhdev, Feb 13, 2009
Tony, can you review the change using the code review tool?
http://code.google.com/p/support/source/detail?spec=svn177&r=177
Status: FixPending
Owner: tonyzale
Cc: sussman
Comment 18 by mwhdev, Feb 20, 2009
(No comment was entered for this change.)
Status: Fixed
Comment 19 by epg, May 20, 2009
This patch restores the svn bindings usage for accessing the authn cache and also
adds a fallback for systems which don't have the bindings or don't have a new enough
version (you need 1.5 or newer).

It also removes the command-line password option, which was introduced as a workaround.
upload.diff
6.3 KB Download
Comment 20 by mwhdev, May 21, 2009
Andy, since you were reviewing this patch while it was being developed, can you
verify/submit this fix?
Owner: andy.chooooo
Comment 21 by andy.chooooo, May 21, 2009
OK sure, there's still a thread about adding tests for the new functionality.  I'll
take care of this bug.

Sign in to add a comment