So, I'm rewriting the soggy ol' Batch script I use for keeping all my GMod SVN's up to date in Python using the pysvn module.
Only, I've run into a few problems.
The script first checks if the local revision number differs from HEAD, and if so, it checks if there's been any changes (since some repos (like Wiremod) contain several parts, which are all updated when there's a change in one of them).
Problem is, Pysvn doesn't seem to be able to get the HEAD revision from the server.
In Batch, the (ugly/hacky) way I got it was this:
[img]http://i.imgur.com/CgwM6.png[/img]
Thing is, if I were to do that in Python I'd have to do it THROUGH Batch, which is even worse.
Luckily, in Python, I'm able to do this:
[img]http://i.imgur.com/S6qy2.png[/img]
...But only for the local revision. If I try doing it from the server, this happens:
[img]http://i.imgur.com/fKW6Z.png[/img]
Apparently it happens because you can only check the revision number from the server if you input the "/svnroot" directory, which, on most GMod-related Subversion repositories, is locked.
I haven't found another way of doing it in the pysvn documentation, but I'm not used to the Tigris layout and it looks a bit messed up on my computer.
Is there anyone with experience of this who can help?
I've tried something similar in the past, but I gave up on checking the revision number and just used the status method with update=true to get a list of out-of-date files. The repository I was working with contains many projects, so the revision number changes all the time even when my project hasn't got any changes, so it was pointless for me.
Have you tried the info2 method?
[QUOTE=st0rmforce;32726343]I've tried something similar in the past, but I gave up on checking the revision number and just used the status method with update=true to get a list of out-of-date files. The repository I was working with contains many projects, so the revision number changes all the time even when my project hasn't got any changes, so it was pointless for me.
Have you tried the info2 method?[/QUOTE]
I tried, but I can't wrap my head around how it works. It returns a list of tuples where value1 is the name of the file and value2 is an info_list or something, and I tried extracting the info from the info_list but no matter what I do it just returns an empty string.
I decided the easier way would to use URLlib to grab the first line from the repository webpage and then use some regex to filter out the revision number.
Sorry, you need to Log In to post a reply to this thread.