diff --git a/Distribution/VcsRevision/Git.hs b/Distribution/VcsRevision/Git.hs
--- a/Distribution/VcsRevision/Git.hs
+++ b/Distribution/VcsRevision/Git.hs
@@ -1,14 +1,19 @@
 module Distribution.VcsRevision.Git ( getRevision ) where
 
+import Control.Exception
 import System.Process
 import System.Exit
 
+tryIO :: IO a -> IO (Either IOException a)
+tryIO = try
+
 -- | Nothing if we're not in a git repo, Just (hash,modified) if we're in a repo.
 getRevision :: IO (Maybe (String, Bool))
 getRevision = do
-    (exit,commit,_) <- readProcessWithExitCode "git" ["log", "--format=%h", "-n", "1"] ""
-    case exit of
-        ExitSuccess -> do
-          (exit',_,_) <- readProcessWithExitCode "git" ["diff", "--quiet"] ""
-          return $ Just (init commit, exit' /= ExitSuccess)
-        _ -> return Nothing
+  res <- tryIO $ readProcessWithExitCode "git" ["log", "--format=%h", "-n", "1"] ""
+  case res of
+    Left ex -> return Nothing
+    Right (ExitSuccess, commit, _) -> do
+      (exit',_,_) <- readProcessWithExitCode "git" ["diff", "--quiet"] ""
+      return $ Just (init commit, exit' /= ExitSuccess)
+    _ -> return Nothing
diff --git a/Distribution/VcsRevision/Mercurial.hs b/Distribution/VcsRevision/Mercurial.hs
--- a/Distribution/VcsRevision/Mercurial.hs
+++ b/Distribution/VcsRevision/Mercurial.hs
@@ -1,13 +1,19 @@
 module Distribution.VcsRevision.Mercurial ( getRevision ) where
 
+import Control.Exception
 import System.Process
 import System.Exit
 
+tryIO :: IO a -> IO (Either IOException a)
+tryIO = try
+
 -- | Nothing if we're not in a mercurial repo, Just (hash,modified) if we're in a repo.
 getRevision :: IO (Maybe (String, Bool))
 getRevision = do
-    (exit,out,_) <- readProcessWithExitCode "hg" ["identify", "-i"] ""
-    case (exit,init out,last (init out)) of
-        (ExitSuccess,hash,'+') -> return $ Just (init hash, True)
-        (ExitSuccess,hash,_)   -> return $ Just (hash, False)
-        (ExitFailure _,_,_)    -> return Nothing
+  res <- tryIO $ readProcessWithExitCode "hg" ["identify", "-i"] ""
+  case res of
+    Left ex -> return Nothing
+    Right (exit,out,_) -> case (exit,init out,last (init out)) of
+      (ExitSuccess,hash,'+') -> return $ Just (init hash, True)
+      (ExitSuccess,hash,_)   -> return $ Just (hash, False)
+      (ExitFailure _,_,_)    -> return Nothing
diff --git a/Distribution/VcsRevision/Svn.hs b/Distribution/VcsRevision/Svn.hs
--- a/Distribution/VcsRevision/Svn.hs
+++ b/Distribution/VcsRevision/Svn.hs
@@ -1,17 +1,23 @@
 module Distribution.VcsRevision.Svn ( getRevision ) where
 
+import Control.Exception
 import System.Process
 import System.Exit
 import Data.List
 
+tryIO :: IO a -> IO (Either IOException a)
+tryIO = try
+
 -- | Nothing if we're not in a svn repo, Just (revision,modified) if we're in a repo.
 getRevision :: IO (Maybe (String, Bool))
 getRevision = do
-    (exit,info,_) <- readProcessWithExitCode "svn" ["info"] ""
-    case exit of
-        ExitSuccess -> do
-          let prefix = "Last Changed Rev: "
-          let rev = drop (length prefix) $ head $ filter (prefix `isPrefixOf`) (lines info)
-          (_,out,_) <- readProcessWithExitCode "svn" ["st", "-q"] ""
-          return $ Just (rev, out /= "")
-        _ -> return Nothing
+  res <- tryIO $  readProcessWithExitCode "svn" ["info"] ""
+  case res of
+    Left ex -> return Nothing
+    Right (exit,info,_) -> case exit of
+      ExitSuccess -> do
+        let prefix = "Last Changed Rev: "
+        let rev = drop (length prefix) $ head $ filter (prefix `isPrefixOf`) (lines info)
+        (_,out,_) <- readProcessWithExitCode "svn" ["st", "-q"] ""
+        return $ Just (rev, out /= "")
+      _ -> return Nothing
diff --git a/vcs-revision.cabal b/vcs-revision.cabal
--- a/vcs-revision.cabal
+++ b/vcs-revision.cabal
@@ -1,6 +1,6 @@
 Name: vcs-revision
 Category: System, Data, Parsing
-Version: 0.0.1
+Version: 0.0.2
 Cabal-version: >= 1.2
 Build-type: Simple
 Copyright: Eugene Kirpichov
