Permalink
Browse files

Fix repository cleanup after pull

  • Loading branch information...
1 parent d0ff451 commit 39f0e062794843f6693c6ef7d11ddbe15fc70e57 @smcv smcv committed with Jul 10, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 darcs-to-git
View
@@ -285,10 +285,14 @@ class DarcsPatch
run("darcs revert --all")
run("find . -name '*-darcs-backup0'|xargs rm") # darcs2 creates these
end
+ unless darcs_reports_clean_repo?
+ system("darcs whatsnew -sl")
+ raise "Failed to clean repo, see above"
+ end
end
def darcs_reports_clean_repo?
- `darcs whatsnew -sl` =~ /^No changes!$/
+ `darcs whatsnew -sl | egrep -v '^a (\./)?\.git(/|$)'` =~ /^(No changes!)?$/
end
def commit_to_git_repo

0 comments on commit 39f0e06

Please sign in to comment.