##// END OF EJS Templates
r1572:5498f86b merge default
parent child Browse files
Show More
@@ -383,10 +383,12 b' def get_changeset_safe(repo, rev):'
383 383 return cs
384 384
385 385
386 def get_current_revision():
386 def get_current_revision(quiet=False):
387 387 """
388 388 Returns tuple of (number, id) from repository containing this package
389 389 or None if repository could not be found.
390
391 :param quiet: prints error for fetching revision if True
390 392 """
391 393
392 394 try:
@@ -399,6 +401,8 b' def get_current_revision():'
399 401 tip = repo.get_changeset()
400 402 return (tip.revision, tip.short_id)
401 403 except (ImportError, RepositoryError, VCSError), err:
404 if not quiet:
402 405 print ("Cannot retrieve rhodecode's revision. Original error "
403 406 "was: %s" % err)
404 407 return None
408
General Comments 0
You need to be logged in to leave comments. Login now