Page MenuHomePhabricator

version.py does not recognize SVN checkout
Closed, ResolvedPublic

Description

Author: russblau

Description:
The following block starts at line 48 of pywikibot/version.py:

_program_dir = _get_program_dir()
if os.path.isdir(os.path.join(_program_dir, '.svn')):
    (tag, rev, date, hsh) = getversion_svn(_program_dir)
else:
    (tag, rev, date, hsh) = getversion_git(_program_dir)

I ran this on a machine where I am still using the SVN mirror and haven't installed git. However, "os.path.join(_program_dir, '.svn')" does not suffice to locate my .svn directory, because I checked out the entire "core" project, including both trunk and branches. The ".svn" directory therefore is in the parent directory above _program_dir, not in _program_dir.

This causes my installation to be unable to import pywikibot.


Version: core-(2.0)
Severity: major

Details

Reference
bz61310

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:07 AM
bzimport set Reference to bz61310.
bzimport added a subscriber: Unknown Object (????).

https://gerrit.wikimedia.org/r/#/c/113185/ should at least provide a workaround for this (the version will not be detected, but the bot should not crash...)

It does not crash anymore. Thank you :))

Decide to open it again as the version is still not able to be detected although it does not crash anymore.

Change 157808 had a related patch set uploaded by XZise:
[FIX] Support branched svn directories

https://gerrit.wikimedia.org/r/157808

Change 157808 merged by jenkins-bot:
[FIX] Support branched svn directories

https://gerrit.wikimedia.org/r/157808