I am new using perlmodule functions.By using svn:client i am trying to read a file from working directory and copy a file to same directory and add a new file then update and commit it. but i am geeting problems with add function and update -- Is this what i am doing right or wrong if not please help me with right code.

use SVN::Client; use SVN::Wc; use SVN::Core; use SVN::Repos; use SVN::Fs; my $ctx = new SVN::Client( auth => [SVN::Client::get_simple_provider(), SVN::Client::get_simple_prompt_provider(\&simple_prompt, +2), SVN::Client::get_username_provider()] ); my $target ='https://xxxxxxxxxx.org/svn/sandbox/trunk/'; $ctx->cat (\*STDOUT, $target.'script1.txt','HEAD'); #reading a file this is working perfect $ctx->add ("$target.newfile");# i am unable to add a file $ctx->copy("$target".'script1.txt',32,"$target".old6);# it is creating + a copy of file but i am unable to see in working directory. when i d +o "svn update" manually from CMD it gets updated and i can see a copy + of file. #$ctx->update("/home/xxxx/trunk/"); my $res = $ctx->commit(["/home/xxxx/trunk/"], 1); $ctx->update("/home/xxxx/trunk/"); sub simple_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"; print "Username: "; my $username = <>; chomp($username); $cred->username($username); print "Password: "; my $password = <>; chomp($password); $cred->password($password); }

In reply to SVN:Client update, commit error by naresh777

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.