Changeset 276

Show
Ignore:
Timestamp:
01/19/2007 06:37:38 PM
Author:
luedi
Message:
  • fixed a missing utf8 conversion on labels
  • added the ability to specify a trunk directory. This is very the VSS Project Root is mapped. see #45
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/script/Vss2Svn/ActionHandler.pm

    r273 r276  
    4040         physname_seen => '', 
    4141         verbose => 0, 
     42         trunkdir => '', 
    4243        }; 
    4344 
     
    715716        # End of recursion; all items must go back to 'AAAAAAAA', which was so 
    716717        # named because that's what most VSS users yell after using it much. :-) 
    717         return '/'; 
     718        return $self->{trunkdir} . '/'; 
    718719    } 
    719720 
     
    848849        # End of recursion; all items must go back to 'AAAAAAAA', which was so 
    849850        # named because that's what most VSS users yell after using it much. :-) 
    850         return ['/']; 
     851        return [$self->{trunkdir} . '/']; 
    851852    } 
    852853 
  • trunk/script/Vss2Svn/Dumpfile.pm

    r262 r276  
    539539 
    540540    my $label = $data->{info}; 
    541      
     541    $label = Encode::decode_utf8( $label ); 
     542 
    542543    # It is possible that the label was deleted later, so we see here a label 
    543544    # action, but no label was assigned. In this case, we only need to track 
     
    545546    # as a valid share source. 
    546547    if (defined ($label)) { 
    547         my $uniquepath = join('.', @$data{ qw(physname version) })
    548         my $labelpath = "$main::gCfg{labeldir}/$data->{info}$itempath"; 
     548        $itempath =~ s/^$main::gCfg{trunkdir}//
     549        my $labelpath = "$main::gCfg{labeldir}/$label$itempath"; 
    549550 
    550551        $self->_create_svn_path ($nodes, $labelpath); 
  • trunk/script/vss2svn.pl

    r275 r276  
    705705        $handler = Vss2Svn::ActionHandler->new($row); 
    706706        $handler->{verbose} = $gCfg{verbose}; 
     707        $handler->{trunkdir} = $gCfg{trunkdir}; 
    707708        $physinfo = $handler->physinfo(); 
    708709 
     
    15721573sub Initialize { 
    15731574    GetOptions(\%gCfg,'vssdir=s','tempdir=s','dumpfile=s','resume','verbose', 
    1574                'debug','timing+','task=s','revtimerange=i','ssphys=s','encoding=s'); 
     1575               'debug','timing+','task=s','revtimerange=i','ssphys=s','encoding=s','trunkdir=s'); 
    15751576 
    15761577    &GiveHelp("Must specify --vssdir") if !defined($gCfg{vssdir}); 
     
    16031604 
    16041605    $gCfg{starttime} = scalar localtime($^T); 
     1606 
     1607    # trunkdir should (must?) be without leading slash 
     1608    $gCfg{trunkdir} = '' unless defined $gCfg{trunkdir}; 
     1609    $gCfg{trunkdir} =~ s:\\:/:g; 
     1610    $gCfg{trunkdir} =~ s:/$::; 
    16051611 
    16061612    $gCfg{junkdir} = '/lost+found'; 
     
    17141720    --encoding        : Specify the encoding used in VSS; 
    17151721                        Default is windows-1252 
     1722    --trunkdir        : Specify where to map the VSS Project Root in the 
     1723                        converted repository (default = "/") 
    17161724EOTXT 
    17171725 

These ads are automatically generated by Google based on the content of this page. Revenue from these ads helps to pay for hosting fees of this site; however, these ads do not constitute an endorsement by PumaCode.org.