Permalink
Browse files

update gitrb because github is now refusing its timezones

  • Loading branch information...
1 parent cc455b6 commit 26aa456419ec10276887b4565c8e70fd93499bab @bronson bronson committed Jun 23, 2011
Showing with 36 additions and 4 deletions.
  1. +1 −1 Gemfile
  2. +8 −2 Gemfile.lock
  3. +24 −0 TODO
  4. +3 −1 scraper
View
@@ -8,7 +8,6 @@ gem 'mimemagic' ,'= 0.1.7'
gem 'hpricot' ,'= 0.8.2'
gem 'json' ,'~> 1.4.6'
-gem 'gitrb' ,'~> 0.2.7'
gem 'bzip2-ruby' ,'~> 0.2.6'
gem 'mime-types' ,'~> 1.16'
gem 'octokit' ,'~> 0.5'
@@ -20,6 +19,7 @@ gem 'mail' ,'~> 2.2.7'
gem 'i18n' ,'~> 0.4.1'
gem 'retryable' , :git => 'git://github.com/bronson/retryable.git'
+gem 'gitrb' , :git => 'git://github.com/bronson/gitrb.git', :branch => 'patch-1'
group :test do
gem 'rspec' ,'~> 2.5'
View
@@ -1,4 +1,11 @@
GIT
+ remote: git://github.com/bronson/gitrb.git
+ revision: b026b6a45e95e36ff2759ba1d05ea6058a161dd0
+ branch: patch-1
+ specs:
+ gitrb (0.2.8)
+
+GIT
remote: git://github.com/bronson/retryable.git
revision: a21655fa16330382e54a9ddba583a566399ab3b1
specs:
@@ -39,7 +46,6 @@ GEM
loofah (>= 0.3.1)
nokogiri (> 0.0.0)
sax-machine (>= 0.0.12)
- gitrb (0.2.8)
hashie (1.0.0)
hpricot (0.8.2)
htmlentities (4.2.4)
@@ -88,7 +94,7 @@ DEPENDENCIES
bzip2-ruby (~> 0.2.6)
erubis (~> 2.6.6)
feedzirra (~> 0.0.24)
- gitrb (~> 0.2.7)
+ gitrb!
hashie (~> 1.0)
hpricot (= 0.8.2)
htmlentities (~> 4.2.1)
View
@@ -1,3 +1,18 @@
+push repos/dbext.vim
+ ~/vim-scraper/repos/dbext.vim.git$ git push origin master
+ Counting objects: 17, done.
+ Delta compression using up to 2 threads.
+ Compressing objects: 100% (8/8), done.
+ Writing objects: 100% (9/9), 4.05 KiB, done.
+ Total 9 (delta 4), reused 0 (delta 0)
+ error: object 03bd05f29539d9c266815fa431c48db2be715baf:invalid author/committer line - bad time zone
+ fatal: Error in object
+ error: unpack failed: unpack-objects abnormal exit
+ To git@vim-scripts.github.com:vim-scripts/dbext.vim
+ ! [remote rejected] master -> master (n/a (unpacker error))
+ error: failed to push some refs to 'git@vim-scripts.github.com:vim-scripts/dbext.vim'
+
+
Make retryable accept a string to log, it logs it with a retry count.
Factor into modules.
Store all scripts in a single gigantic scripts.json file.
@@ -11,6 +26,15 @@ Make more resilient against intermittent failures
(simple reload seems to fix it every time)
We should probably re-fetch the script at least once if hpricot dies with an error.
+ /home/bronson/.rvm/gems/ruby-1.9.2-p0/gems/gitrb-0.2.8/lib/gitrb/repository.rb:310:in `method_missing': git push failed (Gitrb::CommandError)
+ from ./scraper:1317:in `block in perform_push'
+ from /home/bronson/.rvm/gems/ruby-1.9.2-p0/bundler/gems/retryable-retryablea21655fa1633/lib/retryable.rb:38:in `retryable'
+ from ./scraper:1310:in `perform_push'
+ from ./scraper:1372:in `perform_all'
+ from ./scraper:1310593:in `block in <main>'
+ from ./scraper:1585:in `each'
+ from ./scrapers:1585:in `<main>'
+
Processing script 2685: zOS-Enterprise-Compiler-PLI
downloading http://www.vim.org/scripts/script.php?script_id=2686
./scraper:481:in `githubify': undefined method `gsub' for nil:NilClass (NoMethodError)
View
@@ -1308,7 +1308,9 @@ def perform_push repo_name
repo.git_remote('rm', 'origin') rescue nil
repo.git_remote('add', 'origin', remote_url(script))
retryable do |retries|
- # Gitrb::CommandError is as close to a network timeout error as we're going to get
+ # TODO: This is a problem, we get a Gitrb command error if there are
+ # local repo issues, AND when there's a network error. Don't want to
+ # retry local errors. Write our own push so we can differentiate?
puts " #{"force " if ENV['FORCE']}pushing #{script['script_id']} - #{script['name']}#{retries > 0 ? " RETRY #{retries}" : ""}"
args = ['--tags']
args << '--force' if ENV['FORCE']

0 comments on commit 26aa456

Please sign in to comment.