[Bug 5887] New: evolve can reference lock variable before initializing it

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Mon May 14 22:19:34 UTC 2018


https://bz.mercurial-scm.org/show_bug.cgi?id=5887

            Bug ID: 5887
           Summary: evolve can reference lock variable before initializing
                    it
           Product: Mercurial
           Version: 4.5.3
          Hardware: Macintosh
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: matt_harbison at yahoo.com
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org

I ran `hg amend -e` in a repo where I should have used `sudo`, and got this:

** Unknown exception encountered with possibly-broken third-party extension
mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to
https://bitbucket.org/Mekk/mercurial_keyring/issues
** Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 29 2018, 17:49:27) [GCC 4.2.1 (Apple
Inc. build 5666) (dot 3)]
** Mercurial Distributed SCM (version 4.5.3)
** Extensions loaded: blackbox, eol, extdiff, mercurial_keyring, purge, rebase,
schemes, shelve, strip, reviewboard, evolve, share
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/bin/hg", line 41, in
<module>
    dispatch.run()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 88, in run
    status = (dispatch(req) or 0) & 255
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 183, in dispatch
    ret = _runcatch(req)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 324, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 332, in _callcatch
    return scmutil.callcatch(ui, func)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/scmutil.py",
line 154, in callcatch
    return func()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 314, in _runcatchfunc
    return _dispatch(req)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 918, in _dispatch
    cmdpats, cmdoptions)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 673, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 926, in _runcommand
    return cmdfunc()
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/dispatch.py",
line 915, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/util.py",
line 1195, in check
    return func(*args, **kwargs)
  File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/hgext3rd/evolve/cmdrewrite.py",
line 151, in amend
    lockmod.release(lock, wlock)
UnboundLocalError: local variable 'lock' referenced before assignment

I don't see an evolve version anywhere, but it would have been `pip` installed
in the last week or two, and lists 4.6 as tested.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list