tronds icon

Fetch SVN revision number

tronds | PRO | 10/07/12 02:01:45 PM UTC | 0 ⭐ | 200 👁️ | Never ⏰ | []
Python |

350 B

|

None

|

0 👍

/

0 👎

def fetchrev(svndir):
    '''Define svndir. Assuming SVN is installed. SVN commands should be the same crossplatform'''
    from subprocess import check_output
    svncmd = "svn info --revision HEAD " + svndir ## Space needed
    revision = check_output(svncmd).split() ## Make list
    revnum = revision.index("Revision:") + 1
    return revision[revnum]

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎