Index: branches/rewrite/scripts/version.py |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | """ Module to determine the pywikipedia version (tag, revision and date) """ |
4 | 4 | # |
5 | 5 | # (C) Merlijn 'valhallasw' van Deen, 2007-2008 |
6 | | -# (C) xqt, 2010-2011 |
| 6 | +# (C) xqt, 2010-2012 |
7 | 7 | # (C) Pywikipedia bot team, 2007-2011 |
8 | 8 | # |
9 | 9 | # Distributed under the terms of the MIT license. |
— | — | @@ -62,10 +62,10 @@ |
63 | 63 | from datetime import datetime |
64 | 64 | con = sqlite.connect(os.path.join(_program_dir, ".svn/wc.db")) |
65 | 65 | cur = con.cursor() |
66 | | - cur.execute( '''select local_relpath, repos_path, revision, changed_date from nodes order by revision desc''') |
| 66 | + cur.execute( '''select local_relpath, repos_path, revision, changed_date from nodes order by revision desc, changed_date desc''') |
67 | 67 | name, tag, rev, date = cur.fetchone() |
68 | 68 | con.close() |
69 | | - tag = tag.rstrip(name) |
| 69 | + tag = tag[:len(tag) - len(name)] |
70 | 70 | date = time.gmtime(date/1000000) |
71 | 71 | else: |
72 | 72 | for i in range(3): |