Permalink
Browse files

remove error pipes to /dev/null for hg commands and only check return…

… state for hg clone, hg pull returns 1 when there are no changes...
  • Loading branch information...
1 parent a13cbda commit a56ca67e4c8bc25a6673cb474fa6d3290063bbee @thomasdziedzic committed Feb 4, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/tag_fetcher.rb
View
@@ -91,11 +91,12 @@ def fetch_tags url
# if the directory doesn't exist, clone it first, otherwise pull upstream changes
if File.directory? local_path
- `hg pull -u -R #{local_path} 2> /dev/null`
+ `hg pull -u -R #{local_path}`
else
- `hg clone #{url} #{local_path} 2> /dev/null`
+ `hg clone #{url} #{local_path}`
+ # put this here since hg returns a 1 when it didn't pull anything (no changes)
+ raise TagFetchError unless $?.success?
end
- raise TagFetchError unless $?.success?
raw_tags = `hg tags -R #{local_path}`
raw_tags
end

0 comments on commit a56ca67

Please sign in to comment.