Show More
@@ -394,13 +394,12 b' def get_current_revision(quiet=False):' | |||||
394 | try: |
|
394 | try: | |
395 | from vcs import get_repo |
|
395 | from vcs import get_repo | |
396 | from vcs.utils.helpers import get_scm |
|
396 | from vcs.utils.helpers import get_scm | |
397 | from vcs.exceptions import RepositoryError, VCSError |
|
|||
398 | repopath = os.path.join(os.path.dirname(__file__), '..', '..') |
|
397 | repopath = os.path.join(os.path.dirname(__file__), '..', '..') | |
399 | scm = get_scm(repopath)[0] |
|
398 | scm = get_scm(repopath)[0] | |
400 | repo = get_repo(path=repopath, alias=scm) |
|
399 | repo = get_repo(path=repopath, alias=scm) | |
401 | tip = repo.get_changeset() |
|
400 | tip = repo.get_changeset() | |
402 | return (tip.revision, tip.short_id) |
|
401 | return (tip.revision, tip.short_id) | |
403 | except (ImportError, RepositoryError, VCSError), err: |
|
402 | except Exception, err: | |
404 | if not quiet: |
|
403 | if not quiet: | |
405 | print ("Cannot retrieve rhodecode's revision. Original error " |
|
404 | print ("Cannot retrieve rhodecode's revision. Original error " | |
406 | "was: %s" % err) |
|
405 | "was: %s" % err) |
General Comments 0
You need to be logged in to leave comments.
Login now