Skip Menu |

This queue is for tickets about the ClearCase-SyncTree CPAN distribution.

Report information
The Basics
Id: 14010
Status: resolved
Priority: 0/
Queue: ClearCase-SyncTree

People
Owner: Nobody in particular
Requestors: hans.pype [...] scansoft.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.38
Fixed in: (no value)



Subject: fail to extract vob name from dstbase if dstbase contains nothing but mountpoint and vob-name
Hi, Running ActiveState Perl v5.8.4 on Windows XP using ClearCase-SyncTree-0.38. Dynamic view on 'v:', mounting a vob 'myvob'. Sample code: my $cc = new ClearCase::SyncTree; $cc->dstbase('v:/myvob'); # will fail in analyze() call. $cc->dstbase('v:/myvob/mydir'); # works fine [...] $cc->analyze(); In the failure case, analyze reports: "Error: must specify dest vob before analyzing at C:/Perl/site/lib/ClearCase/SyncTree.pm line 513." Diving into SyncTree.pm, line 293: my $dirpart = (File::Spec->splitpath($dbase))[1]; splitpath assumes the last piece of $dbase to be a filename. In the failure case, this results in a $dirpart set to '/', where this realy should be '/myvob'. When using a deeper $dbase path, splitpath will still make a wrong assumption, but that is masked as we only need the first dir from the path. Suggested sollution. Tell splitpath we are dealing with a directory. This is always correct, as "$dbase = getcwd;" (line 271). The following change seems to fix the problem for me: my $dirpart = (File::Spec->splitpath($dbase, 1))[1]; Other than that, great functionality! SyncTree saved me from a lot of ClearCase intefacing! Thanks, Hans.
Date: Thu, 04 Aug 2005 08:26:25 -0400
To: bug-ClearCase-SyncTree [...] rt.cpan.org
From: David Boyce <dsb [...] boyski.com>
Subject: Re: [cpan #14010] fail to extract vob name from dstbase if dstbase contains nothing but mountpoint and vob-name
RT-Send-Cc:
Hans, Thanks. Looks good and I have applied the fix. -David Boyce At 04:40 AM 8/4/2005, you wrote: Show quoted text
>This message about ClearCase-SyncTree was sent to you by guest <> >via rt.cpan.org > >Full context and any attached attachments can be found at: ><URL: https://rt.cpan.org/Ticket/Display.html?id=14010 > > >Hi, > >Running ActiveState Perl v5.8.4 on Windows XP >using ClearCase-SyncTree-0.38. >Dynamic view on 'v:', mounting a vob 'myvob'. > >Sample code: > my $cc = new ClearCase::SyncTree; > $cc->dstbase('v:/myvob'); # will fail in analyze() call. > $cc->dstbase('v:/myvob/mydir'); # works fine > [...] > $cc->analyze(); > >In the failure case, analyze reports: > "Error: must specify dest vob before analyzing at > C:/Perl/site/lib/ClearCase/SyncTree.pm line 513." > >Diving into SyncTree.pm, line 293: > my $dirpart = (File::Spec->splitpath($dbase))[1]; > >splitpath assumes the last piece of $dbase to be a filename. >In the failure case, this results in a $dirpart set to '/', where this >realy should be '/myvob'. When using a deeper $dbase path, splitpath >will still make a wrong assumption, but that is masked as we only >need the first dir from the path. > >Suggested sollution. Tell splitpath we are dealing with a directory. >This is always correct, as "$dbase = getcwd;" (line 271). > >The following change seems to fix the problem for me: > my $dirpart = (File::Spec->splitpath($dbase, 1))[1]; > >Other than that, great functionality! SyncTree saved me from a lot >of ClearCase intefacing! >Thanks, >Hans.
Fixed long ago.