[p4] Reconcile seems to need to have something added in order to work ?

daveg <[email protected]>
Newsgroups gmane.comp.version-control.perforce
Message-ID <[email protected]>
Posted on behalf of forum user 'daveg'.

Hi:

New to P4, so please bear with...

I have a workspace that was populated with P4 sync and client
created.  No changes were made.

- I go there and do a "p4 reconcile -n".   It seems to find
everything in the workspace as needing to be "add"ed. 
- If I create a simple test file somewhere and rerun, I get the same thing
(except now it finds the test file too). 
- If I "p4 add" this test file and rerun, it reports there are no
differences.
- If I create another test file and rerun, it identifies the 2nd test file as
needing to be added.

It's like it's initially lost, not knowing where I am or what to compare
to, so it finds that everything needs to be added.  But once I add
something, it's now grounded and works fine.

I guess I'm trying to understand what's happening, and then I need to
know what to do to get it to work without having to "p4 add"
something.

One caveat.... The client is old and doesn't support
reconcile.  But my perl script (using P4) does
work.  Here's the script I'm using to test this...

#!/usr/bin/env
perl                                                                                                                    
use P4;      

$p4 = new
P4;                                


my $client = $p4->GetClient();
print "client: $client \n";
$p4->SetClient($client);
$p4->Connect() or die "-F- Failed to p4->Connect to client
\"$client\"\n";            

      
      
my @arr = $p4->Run("reconcile","-n");
if($p4->ErrorCount()) {
    foreach $err ($p4->Errors) {
        print "<<<P4
ERROR>>> $err\n";
    }
    print "\n";
    exit;
}

my $x = 0;
foreach my $hsh_ (@arr) {
    $action = $clientFile = $depotFile =
"";
    $action = $hsh_->{action};
    $clientFile = $hsh_->{clientFile};
    $depotFile = $hsh_->{depotFile};

    print "$action : ${depotFile} -
${clientFile}\n";
    $x++;
}  

print "\n Total Num Discrepencies Found: $x\n";

exit;



--
Please click here to see the post in its original format:
  http://forums.perforce.com/index.php?/topic/5598-reconcile-seems-to-need-to-have-something-added-in-order-to-work
_______________________________________________
perforce-user mailing list  -  [email protected]
http://maillist.perforce.com/mailman/listinfo/perforce-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.