Commits

Marcin Kuzminski  committed 5498f86 Merge
  • Participants
  • Parent commits dddd938, a988889

Comments (0)

Files changed (1)

File rhodecode/lib/__init__.py

     return cs
 
 
-def get_current_revision():
+def get_current_revision(quiet=False):
     """
     Returns tuple of (number, id) from repository containing this package
     or None if repository could not be found.
+    
+    :param quiet: prints error for fetching revision if True
     """
 
     try:
         tip = repo.get_changeset()
         return (tip.revision, tip.short_id)
     except (ImportError, RepositoryError, VCSError), err:
-        print ("Cannot retrieve rhodecode's revision. Original error "
-               "was: %s" % err)
+        if not quiet:
+            print ("Cannot retrieve rhodecode's revision. Original error "
+                   "was: %s" % err)
         return None
+