Skip to content
Browse files

Handle error on git commands, and ask user if he wants to continue.

  • Loading branch information...
1 parent 1c8cccb commit eecc16c37e90d91d32e01e70d249a9939bfb731f @vincentg vincentg committed Feb 2, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 darcs-to-git
View
4 darcs-to-git 100755 → 100644
@@ -357,6 +357,10 @@ class DarcsPatch
commit_id = output_of("git", "log", "-n1", "--no-color").scan(/^commit ([a-z0-9]+$)/).flatten.first
COMMIT_HISTORY.record_git_commit(commit_id, identifier)
end
+ rescue RuntimeError => error
+ STDERR.write "An error occurred: " + error + "\n"
+ STDERR.write "Do you want to continue ? (y/N): "
+ exit unless (STDIN.getc.chr.downcase == "y")
end
def darcs_date_to_git_date(utc,local)

0 comments on commit eecc16c

Please sign in to comment.
Something went wrong with that request. Please try again.