This code worked for me in Python 2.7:
client = pysvn.Client()
entry = client.info(file_path)
commit_revision = entry.data.get('commit_revision').number
But in Python 3.8 after installing pysvn 0.1.0 using pip I get the error
'Client' object has no attribute 'info'
What can I use for commit revision in Python 3.8?
I'm assuming that you were using the library PySVN from here before, which according to the documentation does have a
Client.infomethod returning anEntryobject.But by using
pip install pysvn, you got pysvn, which is a different library, although it has a similar name.If you want to use the library you were used to, uninstall the one from pip again and follow the installation instructions on https://pysvn.sourceforge.io/downloads.html instead.