#!/usr/bin/perl -w use strict; use warnings; use SVN::Client; use Term::ReadLine; use Data::Dumper; my $term = new Term::ReadLine 'MQ Package'; my $path = "/home/boger_d/lib/tmp/svn/repo"; my $svn = SVN::Client->new( auth => [SVN::Client::get_simple_provider(), # set the callback to get the username/password, if needed SVN::Client::get_simple_prompt_provider(\&prompt, 2), SVN::Client::get_username_provider() ]); # log message callback $svn->log_msg(sub {$$_[0] = "testing mkdir"}); # check the current layout print "Before mkdir:\n"; print join "\n", keys %{$svn->ls("$path", "HEAD", 0)}; # create a new directory $svn->mkdir("$path/mkdir"); # and commit it my $res = $svn->commit(["$path/mkdir"], 1); # check new layout print "\n\nAfter mkdir:\n"; print join "\n", keys %{$svn->ls("$path", "HEAD", 0)}; # and the return value of the commit print "\n\nReturn value of commit\n", Dumper $res; sub prompt { my $cred = shift; my $realm = shift; my $default_username = shift; my $may_save = shift; my $pool = shift; print "Enter authentication info for realm: $realm\n"; my $username = $term->readline("Username: "); chomp $username; $cred->username($username); my $password = $term->readline("Password: "); chomp $password; $cred->password($password); } #### Before mkdir: mq_check After mkdir: mq_check Return value of commit $VAR1 = undef;