Skip to content
Browse files

Add consistency check after import.

  • Loading branch information...
1 parent 9d5a90f commit a6b9f7ef58761f9b6baf82baa8131d172ecc0e5d @nominolo nominolo committed May 7, 2008
Showing with 14 additions and 1 deletion.
  1. +14 −1 darcs-to-git
View
15 darcs-to-git
@@ -254,5 +254,18 @@ end
patches_to_pull.each { |patch| patch.pull_and_apply }
-puts "\ndarcs import successful. You may now want to run `git gc' to
+def check_consistent()
+ puts "Checking for consistency ..."
+ system("diff", "-ur", "-x", "_darcs", "-x", ".git", ".", SRCREPO)
+ if $? == 0 then
+ puts "\nDarcs import successful! You may now want to run `git gc' to
improve space usage the git repo"
+ else
+ puts "!!! There were differences! See diff above for details."
+ puts "!!! It maybe that the source repository was dirty."
+ puts "!!! Run \"cd #{SRCREPO} && darcs whatsnew\" to check."
+ end
+end
+
+check_consistent()
+

0 comments on commit a6b9f7e

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