(vcs, reporoot, dirtyfunc=lambda rev, **kw: rev + '*')
return dirtyfunc(rev, repo=reporoot, vcs=vcs) if dirty and dirtyfunc != None else rev
return a revision string for the current state of the repository.
    returns None if installation does not appear to be a repository.
    vcs -- version control system in use: 'git' or 'hg'
    reporoot -- root directory of the repo (though usually any directory inside
      the repo will do
    dirtysuffix -- function that manipulates the revision if the repo is dirty
      args: (current revision, repo root)
return a revision string for the current state of the repository.
    returns None if installation does not appear to be a repository.
    vcs -- version control system in use: 'git' or 'hg'
    reporoot -- root directory of the repo (though usually any directory inside
      the repo will do
    dirtysuffix -- function that manipulates the revision if the repo is dirty
      args: (current revision, repo root)
return a revision string for the current state of the repository . returns None if installation does not appear to be a repository . vcs -- version control system in use : git or hg reporoot -- root directory of the repo ( though usually any directory inside the repo will do dirtysuffix -- function that manipulates the revision if the repo is dirty args : ( current revision repo root )
def get_revision(vcs, reporoot, dirtyfunc=lambda rev, **kw: rev + '*'):
    """return a revision string for the current state of the repository.
    returns None if installation does not appear to be a repository.
    vcs -- version control system in use: 'git' or 'hg'
    reporoot -- root directory of the repo (though usually any directory inside
      the repo will do
    dirtysuffix -- function that manipulates the revision if the repo is dirty
      args: (current revision, repo root)"""
    revinfo = get_raw_revision(vcs, reporoot)
    if not revinfo:
        return None

    rev, dirty = revinfo
    return dirtyfunc(rev, repo=reporoot, vcs=vcs) if dirty and dirtyfunc != None else rev
def get_revision ( vcs , reporoot , dirtyfunc = lambda rev , * * kw : rev + '*' ) : revinfo = get_raw_revision ( vcs , reporoot ) if not revinfo : return None rev , dirty = revinfo return dirtyfunc ( rev , repo = reporoot , vcs = vcs ) if dirty and dirtyfunc != None else rev