Changeset 7478
- Timestamp:
- 08/23/09 03:23:38 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Padre-Plugin-SVN-waxhead/lib/Padre/Plugin/SVN.pm
r7432 r7478 14 14 use SVN::Class; 15 15 16 #use Capture::Tiny qw(capture_merged); 17 #use File::Basename (); 18 #use File::Spec; 19 20 #use VCI; 21 22 # because I need a change to commit 23 24 our $VERSION = '0.01'; 16 our $VERSION = '0.02'; 25 17 our @ISA = 'Padre::Plugin'; 26 18 … … 48 40 =head2 Configuring the SVN client for cached authentication. 49 41 50 Bec uase this module uses the installed SVN client actions that require authentication from the server will fail and leave Padre looking as though it's hung.51 52 The way to address this is to run the svn client from the command line when asked for the login and password enter as required.53 54 Once done you should now have your authentication details stored.42 Because this module uses the installed SVN client, actions that require authentication from the server will fail and leave Padre looking as though it has hung. 43 44 The way to address this is to run the svn client from the command line when asked for the login and password details, enter as required. 45 46 Once done you should now have your authentication details cached. 55 47 56 48 More details can be found here: http://svnbook.red-bean.com/nightly/en/svn.serverconfig.netmodel.html#svn.serverconfig.netmodel.credcache … … 103 95 104 96 sub padre_interfaces { 105 'Padre::Plugin' => 0. 24;97 'Padre::Plugin' => 0.43; 106 98 } 107 99 … … 178 170 my ( $self, $path ) = @_; 179 171 my $main = Padre->ide->wx->main; 180 # my $status = qx{svn status $path};181 172 182 173 my $file = svn_file( $path ); … … 237 228 my ( $self, $path ) = @_; 238 229 my $main = Padre->ide->wx->main; 239 #my $out = qx{svn log $path};230 240 231 my $file = svn_file($path); 241 232 $self->{_busyCursor} = Wx::BusyCursor->new(); … … 277 268 my ( $self, $path ) = @_; 278 269 my $main = Padre->ide->wx->main; 279 #my $status = qx{svn diff $path};270 280 271 my $file = svn_file($path); 281 272 #print $file->stderr; … … 305 296 #my $doc = Padre::Document->new(); 306 297 my $diff_str = join( "\n", @{$file->stdout} ); 307 $main->on_new(); 298 $main->new_document_from_string($diff_str); 299 #$main->on_new(); 308 300 # get the last id created - assume new is created at the end 309 my @ids = $main->pageids;310 my @docs = $main->documents;301 #my @ids = $main->pageids; 302 #my @docs = $main->documents; 311 303 #print "pageids: " . join( ",", @ids ) . "\n"; 312 304 #print "docs: " . join( ",", @docs ) . "\n"; 313 305 #print "last element is: " . $ids[-1] . "\n"; 314 my $doc = $docs[$ids[-1]];315 $doc->text_set($diff_str);306 #my $doc = $docs[$ids[-1]]; 307 #$doc->text_set($diff_str); 316 308 return 1; 317 309 } … … 370 362 # come after the $message. 371 363 $file->commit_with_message($message); 372 373 374 364 375 365 my @commit = @{$file->stdout}; … … 382 372 } 383 373 384 #system qq(svn commit "$path" -m"$message");374 385 375 $self->{_busyCursor} = undef; 386 376 } … … 418 408 my $msg = "$path scheduled to be added to " . $file->info->{_url}; 419 409 $main->message( $msg ); 420 421 #system "svn add $path"; 410 422 411 return; 423 412 } … … 432 421 } 433 422 434 435 #sub vci {436 # my ($self, $path) = @_;437 # my $main = Padre->ide->wx->main;438 # # TODO: connect to SVN repo without this workaround439 # my @info = qx{svn info $path};440 # if (not @info) {441 # $main->error("$path does not seem to be under SVN");442 # return;443 # }444 # chomp @info;445 # my ($repo) = grep { $_ =~ /^Repository Root: / } @info;446 # $repo =~ s/^Repository Root:\s*//;447 # $main->message("'$repo'", "File");448 # my $repository = VCI->connect(type => 'Svn', repo => $repo);449 # print "$repository\n";450 # print "---\n";451 # print $repository->projects, "\n";452 #453 # return;454 #}455 #456 457 423 1; 458 424
Note: See TracChangeset
for help on using the changeset viewer.
