def __init__(self, config_dir=None):
     core.svn_config_ensure(config_dir)
     self.ctx = client.ctx_t()
     self.ctx.auth_baton = core.svn_auth_open([
         client.get_simple_provider(),
         client.get_username_provider(),
         client.get_ssl_server_trust_file_provider(),
         client.get_ssl_client_cert_file_provider(),
         client.get_ssl_client_cert_pw_file_provider(),
         ])
     self.ctx.config = core.svn_config_get_config(config_dir)
     if config_dir is not None:
         core.svn_auth_set_parameter(self.ctx.auth_baton,
                                     core.SVN_AUTH_PARAM_CONFIG_DIR,
                                     config_dir)
     self.ra_callbacks = ra.callbacks_t()
     self.ra_callbacks.auth_baton = self.ctx.auth_baton
     self.base_optrev = make_optrev('BASE')
 def __init__(self, config_dir=None):
     core.svn_config_ensure(config_dir)
     self.ctx = client.ctx_t()
     self.ctx.auth_baton = core.svn_auth_open([
         client.get_simple_provider(),
         client.get_username_provider(),
         client.get_ssl_server_trust_file_provider(),
         client.get_ssl_client_cert_file_provider(),
         client.get_ssl_client_cert_pw_file_provider(),
     ])
     self.ctx.config = core.svn_config_get_config(config_dir)
     if config_dir is not None:
         core.svn_auth_set_parameter(self.ctx.auth_baton,
                                     core.SVN_AUTH_PARAM_CONFIG_DIR,
                                     config_dir)
     self.ra_callbacks = ra.callbacks_t()
     self.ra_callbacks.auth_baton = self.ctx.auth_baton
     self.base_optrev = make_optrev('BASE')
Example #3
0
    sys.stderr.write("""Usage: %s URL[@PEG-REV] [START-REV[:END-REV]]

Trace the history of URL@PEG-REV, printing the location(s) of its
existence between START-REV and END-REV.  If START-REV is not
provided, the entire history of URL@PEG-REV back to its origin will be
displayed.  If provided, START-REV must not be younger than PEG-REV.
If END-REV is provided, it must not be younger than START-REV.

(This is a wrapper around Subversion's svn_ra_get_location_segments() API.)

ERROR: %s
""" % (os.path.basename(sys.argv[0]), str(e)))
    sys.exit(1)

  core.svn_config_ensure(None)
  ctx = client.ctx_t()
  providers = [
    client.get_simple_provider(),
    client.get_username_provider(),
    client.get_ssl_server_trust_file_provider(),
    client.get_ssl_client_cert_file_provider(),
    client.get_ssl_client_cert_pw_file_provider(),
    ]
  ctx.auth_baton = core.svn_auth_open(providers)
  ctx.config = core.svn_config_get_config(None)

  ra_callbacks = ra.callbacks_t()
  ra_callbacks.auth_baton = ctx.auth_baton
  ra_session = ra.open(url, ra_callbacks, None, ctx.config)
  ra.get_location_segments(ra_session, "", peg_revision,
                           start_revision, end_revision, printer)
Example #4
0
    sys.stderr.write("""Usage: %s URL[@PEG-REV] [START-REV[:END-REV]]

Trace the history of URL@PEG-REV, printing the location(s) of its
existence between START-REV and END-REV.  If START-REV is not
provided, the entire history of URL@PEG-REV back to its origin will be
displayed.  If provided, START-REV must not be younger than PEG-REV.
If END-REV is provided, it must not be younger than START-REV.

(This is a wrapper around Subversion's svn_ra_get_location_segments() API.)

ERROR: %s
""" % (os.path.basename(sys.argv[0]), str(e)))
    sys.exit(1)

  core.svn_config_ensure(None)
  ctx = client.ctx_t()

  # Make sure that these are at the start of the list, so passwords from
  # gnome-keyring / kwallet are checked before asking for new passwords.
  # Note that we don't pass our config here, since we can't seem to access
  # ctx.config.config (ctx.config is opaque).
  providers = core.svn_auth_get_platform_specific_client_providers(None, None)
  providers.extend([
    client.get_simple_provider(),
    client.get_username_provider(),
    client.get_ssl_server_trust_file_provider(),
    client.get_ssl_client_cert_file_provider(),
    client.get_ssl_client_cert_pw_file_provider(),
  ])

  ctx.auth_baton = core.svn_auth_open(providers)