[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: python and ctx.log_msg_func

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2003-10-15 22:56:57 CEST

This code will checkout using 0.31.0. 0.31.0 contains fixes that makes this
possible. There are still a lot of problems with the python bindings still to
fix so don't be surprised if you run into types that you cannot create or
manipulate. (I have only tried on Windows, I'd assume unix will work).

Barry

import sys
import svn.core
import svn.client

def main(argv):
     url = argv[1]
     path = argv[2]
     print 'svn checkout %s %s' % (url, path)

     try:
         pool = svn.core.svn_pool_create(None)
         svn.core.svn_config_ensure( None, pool )

         ctx = svn.client.svn_client_ctx_t()

         config = svn.core.svn_config_get_config( None, pool )
         ctx.config = config

         rev = svn.core.svn_opt_revision_t()
         rev.kind = svn.core.svn_opt_revision_head
         rev.number = 0

         ctx.auth_baton = svn.core.svn_auth_open( [], pool )

         svn.client.svn_client_checkout( #svn_client_checkout (
             url, #const char *URL,
             path, #const char *path,
             rev, #const svn_opt_revision_t *revision,
             0, #svn_boolean_t recurse,
             ctx, #svn_client_ctx_t *ctx,
             pool) #apr_pool_t *pool);

     finally:
         svn.core.svn_pool_destroy(pool)

     return 0

if __name__ == '__main__':
     sys.exit( main( sys.argv ) )

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 15 22:58:15 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.