List Info

Thread: how do we change root of a client view




how do we change root of a client view
user name
2006-08-02 11:59:49
Please ignore my previous email. I had replied to the wrong thread.....
==================================================
 
I use this set of subroutines to display any p4perl warnings or errors. Just call command Status() immediately after any important p4perl calls. Warnings will warn and errors will exit.
 
#------------------------------------------------
# Error handling subroutines
#------------------------------------------------
sub commandStatus {
 
    if ( $p4->WarningCount() )
    {
        displayWarnings();
    }
 
    if ( $p4->ErrorCount() )
    {
        displayErrors();
       exit;
    }
}
 
sub displayWarnings {
    my $warnings = $p4->Warnings();
 
    foreach $warning ( {$warnings} )
    {
     ;   print "\nWarnings: $warning\n\n";
 ;   }
 
    return $warnings;
}
 
sub displayErrors {
    my $errors = $p4->Errors();
 
    foreach $error ( {$errors} )
    {
     ;   print "\nError: $error\n\n";
    }
 
    return $errors;
}
 
Later.....Scott...
-----Original Message-----
From: mehta suman [mailto:sumanmehtainyahoo.com]
Sent: Wednesday, August 02, 2006 6:28 AM
To: Tony Smith; p4perlperforce.com
Cc: mehta suman; Scott Lavender
Subject: Re: [p4perl] how do we change root of a client view

Thanks very much..

Tony Smith <tonysmee.org&gt; wrote:
On Wednesday 02 August 2006 06:21, mehta suman wrote:
>; that worked in perl.. but when I go to command line and run following
> command
&gt;
> p4 client SumanWin
&gt;
> then it still shows me the old root path. Not the updated one.
> what could be the possible reason?

I don't know, but you should check the contents of the $p4->Errors() array
after calling SaveClient() to see if it's failing. Also, the example you gave
was missing a '->' so maybe that's the reason.

$client = $p4->FetchClient("SumanWin");
$client-&gt;{'Root'} = "c:\\work12";
$p4->;SaveClient($client);

foreach my $e ( $p4->Errors() )
{
printf( "ERROR: %s\n", $e );
}

Tony


Want to be your own boss? Learn how on Yahoo! Small Business.
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )