Changeset 7479
- Timestamp:
- 08/23/09 03:53:16 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Padre-Plugin-SVN-waxhead/lib/Padre/Plugin/SVN.pm
r7478 r7479 110 110 'Project' => sub { $self->svn_commit_project }, 111 111 ], 112 'Blame' => [ 113 'File' => sub { $self->svn_blame }, 114 ], 112 115 'Status...' => [ 113 116 'File' => sub { $self->svn_status_of_file }, … … 165 168 return; 166 169 } 170 } 171 172 sub svn_blame { 173 my( $self ) = @_; 174 my $filename = _get_current_filename(); 175 if ($filename) { 176 my $main = Padre::Current->main; 177 $self->{_busyCursor} = Wx::BusyCursor->new(); 178 my $file = svn_file($filename); 179 $file->blame(); 180 $self->{_busyCursor} = undef; 181 my $blame = join( "\n", @{$file->stdout} ); 182 require Padre::Plugin::SVN::Wx::SVNDialog; 183 my $dialog = Padre::Plugin::SVN::Wx::SVNDialog->new($main, $filename, $blame, 'Blame'); 184 $dialog->Show(1); 185 return 1; 186 } 187 188 return; 189 167 190 } 168 191 … … 293 316 my $file = svn_file($filename); 294 317 my $diff = $file->diff; 295 #$main->on_new();296 #my $doc = Padre::Document->new();297 318 my $diff_str = join( "\n", @{$file->stdout} ); 298 319 $main->new_document_from_string($diff_str); 299 #$main->on_new();300 # get the last id created - assume new is created at the end301 #my @ids = $main->pageids;302 #my @docs = $main->documents;303 #print "pageids: " . join( ",", @ids ) . "\n";304 #print "docs: " . join( ",", @docs ) . "\n";305 #print "last element is: " . $ids[-1] . "\n";306 #my $doc = $docs[$ids[-1]];307 #$doc->text_set($diff_str);308 320 return 1; 309 321 } … … 354 366 355 367 #$message = "\"" . $message . "\""; 356 print "This is the commit message: $message";368 # print "This is the commit message: $message"; 357 369 358 370 # here's how: … … 375 387 $self->{_busyCursor} = undef; 376 388 } 377 378 # show that the file was committed379 389 380 390 return;
Note: See TracChangeset
for help on using the changeset viewer.
