SVN::Deploy::Utils - utility functions for SVN::Deploy


SVN-Deploy documentation  | view source Contained in the SVN-Deploy distribution.

Index


SYNOPSIS

Top

  use SVN::Deploy::Utils;

  my $rev = import_synch(
    dir => '/my/local/dir',
    url => 'svn://myrepo/trunk/mypath',
    log => 'my import logmessage',
  ) or die $SVN::Deploy::Utils::LastErr;

DESCRIPTION

Top

SVN::Deploy::Utils provides two high level utility functions encapsuling SVN::Client methods.

FUNCTIONS

Top

All functions return undef on error. $SVN::Deploy::Utils::LastErr will contain a printable error message.

connect_cached

  my $ctx = connect_cached(
    [username => <name>,]
    [password => <password>,]
    [pwd_sub  => <code_ref>,]
  );

Returns an SVN::Client context object caching the authorization information for later use. pwd_sub must reference a sub returning username and password for e.g. user interaction.

import_synch

  my $rev = import_synch(
      dir => <local_dir>,
      url => <repo URL>,
      [log => <log message>,]
      [ctx => <SVN::Client context>,]
  )

Imports a local directory into a subversion repository. Adds or deletes files and directories when neccessary, so that repeating calls after changes in the local unversioned directory will result in corresponding changes in the repository path.

If ctx is specified import_synch will use this context, otherwise it will call connect_cached() without parameters.

AUTHOR

Top

Thomas Kratz <tomk@cpan.org>

Copyright (c) 2008 Thomas Kratz. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.


SVN-Deploy documentation  | view source Contained in the SVN-Deploy distribution.