jenkins-bot has submitted this change and it was merged.
Change subject: bug fix for issues raised in change 76486 (ported from core) ......................................................................
bug fix for issues raised in change 76486 (ported from core)
* adopt version.py in order to solve win compatibility issues (remove 'cat' and 'wc')
Change-Id: I2e979cb6d02f777fbd2e042ecfed1f32cee45695 --- M pywikibot/version.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: DrTrigon: Checked; Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/pywikibot/version.py b/pywikibot/version.py index c96b74b..115b1a9 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -121,18 +121,18 @@ tag = tag[(s + 6):e] t = tag.strip().split('/') tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4]) - info = subprocess.Popen("git log --pretty=format:'%ad|%an|%h|%H|%d' --abbrev-commit --date=iso -1 | cat -", + info = subprocess.Popen('git --no-pager log --pretty=format:"%ad|%an|%h|%H|%d" --abbrev-commit --date=iso -1', cwd=_program_dir, shell=True, stdout=subprocess.PIPE).stdout.read() info = info.split('|') date = info[0][:-6] date = time.strptime(date, '%Y-%m-%d %H:%M:%S') - rev = subprocess.Popen('git rev-list HEAD | wc -l', + rev = subprocess.Popen('git rev-list HEAD', cwd=_program_dir, shell=True, stdout=subprocess.PIPE).stdout.read() - rev = int(rev.strip()) + rev = len(rev.splitlines()) hsh = info[3] # also stored in '.git/refs/heads/master' if (not date or not tag or not rev) and not path: raise ParseError
pywikibot-commits@lists.wikimedia.org