# HG changeset patch # User Jeff Hammel # Date 1307930475 25200 # Node ID 7a11a25da2e8c4ae398cbf0caf0d786336c5daee # Parent f3878c2f7032c058016b413d38a6febdb16630c0 better assertion message diff -r f3878c2f7032 -r 7a11a25da2e8 buttercup/source.py --- 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: