You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mathias Froehlich <M....@science-computing.de> on 2005/05/30 16:04:22 UTC

Unable to query the md5 sum from python.

Hi,

I need to extract the md5 sum of a file in the repository from python.
There is a swig python binding to the svn_fs_file_md5_checksum function 
available.
But whan I call the function in a way I would expect it to work like soutless 
other swig translations of svn functions

sum = fs.file_md5_checksum(root, path, pool)

function from a win32 environment using the current subversion-1.2.0 python 
binding binaries, it complains that file_md5_checksum has 4 arguments not 3.

But calling it like

sum = '                 ' # room for 16 chars
fs.file_md5_checksum(sum, root, path, pool)

results in

TypeError: Type error. Got , expected _p_unsigned_char

which tells me that I there is no type conversion for that datatype available.

Looking into svn_types.i there are only type conversions for perl available 
for those unsigned char[ANY] types.

Can anybody help my to include similar type conversions for the python 
bindings?

     Greetings

           Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Unable to query the md5 sum from python.

Posted by Mathias Froehlich <M....@science-computing.de>.
Hi,

On Monday 30 May 2005 23:53, Max Bowsher wrote:
> Turned out to be fairly easy, so done in trunk r14885.
> Proposed for backport to 1.2.x.
Great, thanks!!!!
And yes a backport to 1.2.x would be great too!

I expected that somebody who knows swig better than me will have that solved 
in a few minutes ...
:)

      Greetings

                Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Unable to query the md5 sum from python.

Posted by Max Bowsher <ma...@ukf.net>.
Mathias Froehlich wrote:
> Hi,
>
> I need to extract the md5 sum of a file in the repository from python.
> There is a swig python binding to the svn_fs_file_md5_checksum function
> available.
> But whan I call the function in a way I would expect it to work like
> soutless other swig translations of svn functions
>
> sum = fs.file_md5_checksum(root, path, pool)
>
> function from a win32 environment using the current subversion-1.2.0 
> python
> binding binaries, it complains that file_md5_checksum has 4 arguments not 
> 3.
>
> But calling it like
>
> sum = '                 ' # room for 16 chars
> fs.file_md5_checksum(sum, root, path, pool)
>
> results in
>
> TypeError: Type error. Got , expected _p_unsigned_char
>
> which tells me that I there is no type conversion for that datatype
> available.
>
> Looking into svn_types.i there are only type conversions for perl 
> available
> for those unsigned char[ANY] types.
>
> Can anybody help my to include similar type conversions for the python
> bindings?

Turned out to be fairly easy, so done in trunk r14885.
Proposed for backport to 1.2.x.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org