changeset 34:7a11a25da2e8

better assertion message
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 12 Jun 2011 19:01:15 -0700
parents f3878c2f7032
children 052ee8a2ebde
files buttercup/source.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/buttercup/source.py	Sun Jun 12 18:46:05 2011 -0700
+++ b/buttercup/source.py	Sun Jun 12 19:01:15 2011 -0700
@@ -36,7 +36,8 @@
     def update(self):
         """updates a checkout or does one if it does not exist"""
         if os.path.exists(self.directory()):
-            assert os.path.exists(os.path.join(self.directory(), '.hg'))
+            hgdir = os.path.join(self.directory(), '.hg'))
+            assert os.path.exists(hgdir), "Not an hg directory: %s" % hgdir
             call(['hg', 'pull'], cwd=self.directory())
             call(['hg', 'update'], cwd=self.directory())
         else: