Page MenuHomePhabricator

'svnversion failed' on pwb.py script startup
Closed, ResolvedPublic

Description

Everytime I start a pwb.py script, I get the message 'svnversion failed'.
I don't have svn installed as I use git from the Gerrit repo. git is in the path (version checking worked fine with compat)
Machine is win32 (x64).

Event Timeline

Malafaya created this task.Aug 12 2015, 9:17 AM
Malafaya raised the priority of this task from to Needs Triage.
Malafaya updated the task description. (Show Details)
Malafaya added a project: Pywikibot.
Malafaya added a subscriber: Malafaya.
Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald TranscriptAug 12 2015, 9:17 AM
Malafaya closed this task as Invalid.Aug 12 2015, 10:03 AM
Malafaya claimed this task.

Actually, I didn't have git in the path. After adding it, it seemed to solve the problem.
It seems version.py tries git first and then falls back to svn, hence the warning.
I'm not sure this is still valid so I'm closing it.

jayvdb added a subscriber: jayvdb.Aug 12 2015, 11:32 AM

It sounds like the current code is not user-friendly, even for Win32 technical users.

Xqt reopened this task as Open.Sep 16 2015, 2:05 PM
Xqt added a subscriber: Xqt.

Reopened because it fails for my svn working copy in some situations

Xqt added a comment.Sep 16 2015, 2:12 PM

1st working copy:

C:\pwb\core>pwb.py version
Pywikibot: pywikibot/__init__.py (, -1 (unknown), 2015/09/15, 10:29:33, OUTDATED
)
Release version: 2.0b3
requests version: 2.7.0
  cacerts: C:\Python27\lib\site-packages\requests\cacert.pem
    certificate test: ok
Python: 2.7.10 (default, May 23 2015, 09:44:00) [MSC v.1500 64 bit (AMD64)]
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: C:\pwb\core
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: C:\pwb\core

2nd working copy:

C:\pwb\SVN\core>pwb.py version
C:\pwb\SVN\core\pywikibot\config2.py:994: UserWarning: Configuration variable us
e_diskcache is defined but unknown. Misspelled?
  'Misspelled?'.format(name), UserWarning)
C:\pwb\SVN\core\pywikibot\config2.py:994: UserWarning: Configuration variable no
tify_unflagged_bot is defined but unknown. Misspelled?
  'Misspelled?'.format(name), UserWarning)
WARNING: Running on Windows and transliteration_target is not set.
Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Wi
ndows
svnversion failed
Pywikibot: pywikibot/__init__.py (, -1 (unknown), 2015/09/11, 18:48:08, OUTDATED
)
Release version: 2.0b3
requests version: 2.7.0
  cacerts: C:\Python27\lib\site-packages\requests\cacert.pem
    certificate test: ok
Python: 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)]
PYWIKIBOT2_DIR: Not set
PYWIKIBOT2_DIR_PWB: C:\pwb\SVN\core
PYWIKIBOT2_NO_USER_CONFIG: Not set
Config base dir: C:\pwb\SVN\core

and btw both copys are up-to-date.

Xqt added a comment.Sep 16 2015, 2:41 PM

looks like a summertime issue. The following shows date and date2 content:

## try: getversion_svn
1
time.struct_time(tm_year=2015, tm_mon=9, tm_mday=16, tm_hour=11, tm_min=34, tm_s
ec=8, tm_wday=2, tm_yday=259, tm_isdst=0)
time.struct_time(tm_year=2015, tm_mon=9, tm_mday=16, tm_hour=10, tm_min=34, tm_s
ec=16, tm_wday=2, tm_yday=259, tm_isdst=-1)
20 2015 2015
20 9 9
20 16 16
20 11 10
## try: getversion_package
<<< getversion_package done
Pywikibot: pywikibot/__init__.py (, -1 (unknown), 2015/09/11, 18:48:08, OUTDATED
)
XZise added a subscriber: XZise.Sep 16 2015, 2:54 PM

Reopened because it fails for my svn working copy in some situations

Are you using git? If not this bug is not about that, as the OP states that git is installed and used.

Xqt added a comment.Sep 16 2015, 2:58 PM

This failure is on my svn working copies. My Bots are running in svn environment.

XZise closed this task as Resolved.Sep 16 2015, 3:04 PM

Then open a new one as the solution of the original bug obviously can't apply. And if for some reason you think your bug is the same as the one mentioned in the opening post, then explicitly mention that you get it with SVN installed as you basically hijacked their bug report.

Anyway I don't see where this message “svnversion failed” is generated. And getversion_svn is checking if DST is set.

"svnversion failed" is output by:

rev = svninfo.get_revision()

in getversion_svn_setuptools() [version.py]