Bug 1087615 - Error in Mercurial after applying Leap 42.3 Update-Test patch 7756 "Security update for mercurial"
Error in Mercurial after applying Leap 42.3 Update-Test patch 7756 "Security ...
Status: VERIFIED FIXED
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Maintenance
Leap 42.3
x86-64 openSUSE 42.3
: P5 - None : Critical (vote)
: ---
Assigned To: Takashi Iwai
E-mail List
:
Depends on:
Blocks: CVE-2018-1000132
  Show dependency treegraph
 
Reported: 2018-03-30 11:48 UTC by Tony Mechelynck
Modified: 2018-04-04 16:59 UTC (History)
3 users (show)

See Also:
Found By: Community User
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
output from "hg showconfig" (7.36 KB, text/plain)
2018-03-30 12:01 UTC, Tony Mechelynck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Mechelynck 2018-03-30 11:48:08 UTC
After applying Update-Test patch 7756 (bringing packages mercurial and mercurial-lang from version 4.2.3-7.1 to 4.2.3-10.1) then running "hg in" on my Vim clone (based on https://bitbucket.org/vim-mirror/vim) I get the error listed below. I'm reporting this to openSUSE rather than Mercurial because
• the Mercurial version (4.2.3) has not changed
• I expect the answer from the Mercurial developers to be "4.2.3 is an old version, please install the most recent version directly from the Mercurial site" which is something I'm not ready to do, at least for the time beinig.
• I expect that other openSUSE Leap users will also be hit by this bug.

linux-2iyu:~/.build/vim/vim-hg # hg in || echo 'exit status' $? ; date
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC]
** Mercurial Distributed SCM (version 4.2.3)
** Extensions loaded: churn, color, fetch, graphlog, strip, mq, pager
Traceback (most recent call last):
  File "/usr/bin/hg", line 45, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 83, in run
    status = (dispatch(req) or 0) & 255
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 164, in dispatch
    ret = _runcatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 295, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 303, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib64/python2.7/site-packages/mercurial/scmutil.py", line 146, in callcatch
    return func()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 285, in _runcatchfunc
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 912, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 648, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 231, in closure
    return func(*(args + a), **kw)
  File "/usr/lib64/python2.7/site-packages/hgext/pager.py", line 69, in pagecmd
    return orig(ui, options, cmd, cmdfunc)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 920, in _runcommand
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 909, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1080, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/extensions.py", line 231, in closure
    return func(*(args + a), **kw)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1080, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/hgext/mq.py", line 3546, in mqcommand
    return orig(ui, repo, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 1080, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 3220, in incoming
    return hg.incoming(ui, repo, source, opts)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 861, in incoming
    return _incoming(display, subreporecurse, ui, repo, source, opts)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 817, in _incoming
    other = peer(repo, opts, source)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 176, in peer
    return _peerorrepo(rui, path, create).peer()
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 153, in _peerorrepo
    obj = _peerlookup(path).instance(ui, path, create)
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 127, in _peerlookup
    if not util.safehasattr(thing, 'instance'):
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 155, in safehasattr
    return getattr(thing, attr, _notset) is not _notset
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 152, in __getattribute__
    self._load()
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 100, in _load
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 53, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/httppeer.py", line 89, in <module>
    class httppeer(wireproto.wirepeer):
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 152, in __getattribute__
    self._load()
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 100, in _load
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "/usr/lib64/python2.7/site-packages/mercurial/demandimport.py", line 53, in _hgextimport
    return importfunc(name, globals, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/wireproto.py", line 672, in <module>
    permissions['batch'] = 'pull'
NameError: name 'permissions' is not defined
exit status 1
Fri 30 Mar 13:29:26 CEST 2018
Comment 1 Andreas Stieger 2018-03-30 11:56:15 UTC
Seen here, blocks bug 1085211
Comment 2 Tony Mechelynck 2018-03-30 12:01:14 UTC
Created attachment 765563 [details]
output from "hg showconfig"

P.S. I'm attaching the output from "hg showconfig" (as run from the same directory) which still runs with no error.
Comment 3 Tony Mechelynck 2018-03-30 12:18:31 UTC
I ran "python client.py checkout" on a clone of https://hg.mozilla.org/comm-central and got the same error repeatedly, then thought: I should have expected it! client.py does a number of calls to "hg pull" and "hg update" (retrying once on nonzero exit status) on the comm-central clone and on its subclones (comm-central at ., mozilla-central at ./mozilla, chatzilla at ./mozilla/extensions/irc and DOM Inspector at ./mozilla/extensions/inspector).
Comment 4 Tony Mechelynck 2018-03-30 20:30:08 UTC
I downgraded mecurial (and mercurial-lang for consistency's stake) to 4.2.3-7.1 by means of YaST for the time being. I notice that after that, "zypper lu -t package -t patch" does not propose to upgrade back. Better a flawed but usable package than a fixed one which can't be used. Of course, if in the future zypper tells me of a new patch I'll try it. I only use Mercurial read-only on remote sites anyway.
Comment 5 Takashi Iwai 2018-04-04 13:48:45 UTC
My bad, a couple of prerequisite commits were missing to make the fix working.

A new fix was submitted via SR#593555.  The package I checked is available in OBS home:tiwai:branches:openSUSE:Leap:42.3:Update repo (4.2.3-11.1).
Comment 6 Swamp Workflow Management 2018-04-04 14:20:08 UTC
This is an autogenerated message for OBS integration:
This bug (1087615) was mentioned in
https://build.opensuse.org/request/show/593555 42.3 / mercurial
Comment 7 Andreas Stieger 2018-04-04 15:11:59 UTC
fixed in incident, will appear on next build
Comment 8 Tony Mechelynck 2018-04-04 16:59:26 UTC
After upgrading mercurial and mercurial-lang to version 4.2.3-12.1 by means of a new instance of patch 7756, the problem doesn't reappear.

=> VERIFIED.