Last modified: 2014-09-09 07:38:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63310, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61310 - version.py does not recognize SVN checkout
version.py does not recognize SVN checkout
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized major
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-13 12:19 UTC by Russell Blau
Modified: 2014-09-09 07:38 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Russell Blau 2014-02-13 12:19:25 UTC
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.
Comment 1 Merlijn van Deen (test) 2014-02-13 21:19:23 UTC
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...)
Comment 2 Sorawee Porncharoenwase 2014-02-26 21:25:23 UTC
It does not crash anymore. Thank you :))
Comment 3 Sorawee Porncharoenwase 2014-02-26 21:27:31 UTC
Decide to open it again as the version is still not able to be detected although it does not crash anymore.
Comment 4 Gerrit Notification Bot 2014-09-02 11:59:39 UTC
Change 157808 had a related patch set uploaded by XZise:
[FIX] Support branched svn directories

https://gerrit.wikimedia.org/r/157808
Comment 5 Gerrit Notification Bot 2014-09-02 21:24:49 UTC
Change 157808 merged by jenkins-bot:
[FIX] Support branched svn directories

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links