Changeset 9353238 in lab.git for Dev/github/GitHubBackup.pm
- Timestamp:
- Aug 21, 2013 11:36:58 AM (11 years ago)
- Branches:
- master
- Children:
- f7f894d
- Parents:
- f38b66d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/github/GitHubBackup.pm
rf38b66d r9353238 201 201 if (-d "$dir") { 202 202 local $CWD = $dir; 203 print "fetch ", $dir, "\n";203 print "fetch $dir\n"; 204 204 Git::Repository->run(fetch => '--all'); 205 205 return $self; 206 206 } 207 207 208 print "clone ", $dir, "\n";208 print "clone $dir\n"; 209 209 mkpath $dir; 210 210 Git::Repository->run(clone => '--mirror' => $url => $dir); … … 252 252 253 253 foreach my $fork (@fetch) { 254 print "fetch ", $fork, "\n";254 print "fetch $fork\n"; 255 255 Git::Repository->run(fetch => $fork); 256 256 } … … 264 264 my $dir = $self->directory . '.wiki.git'; 265 265 my $url = 'https://github.com/' . $self->full_name . '.wiki.git'; 266 267 my $ua = LWP::UserAgent->new(max_redirect => 0); 268 my $res = $ua->head( 269 'https://github.com/' . $self->full_name . '/wiki' 270 ); 271 if ($res->code != 200) { 272 print "$dir does not exist\n"; 273 return $self; 274 } 266 275 267 276 $self->sync($url => $dir);
Note: See TracChangeset
for help on using the changeset viewer.