[Bug 5832] New: `hg evolve -aA` with splits and merges can produce AttributeError: 'list' object has no attribute 'add'

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Apr 3 18:40:29 UTC 2018


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

            Bug ID: 5832
           Summary: `hg evolve -aA` with splits and merges can produce
                    AttributeError: 'list' object has no attribute 'add'
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: evolution
          Assignee: bugzilla at mercurial-scm.org
          Reporter: hg at pewpew.net
                CC: mercurial-devel at mercurial-scm.org,
                    pierre-yves.david at ens-lyon.org

Created attachment 2000
  --> https://bz.mercurial-scm.org/attachment.cgi?id=2000&action=edit
repo that repros the issue

The repro repo is a bit of a mess, so I'll attach it, but here's the overview:

≻ hg x
@  9:2a540be2 spectral tip
|  r3 (amended) - split2  --- (and rebased to 0, I forgot to add that to desc)
| o  7:f4e5c135 spectral
|/   r3 (amended) - split 1
| o  5:2b95feb5 spectral
|/   r1 (amended)
| *    4:558435df spectral orphan
| |\   merge
+---x  3:053d3bd7 spectral obsolete (became: 7:f4e5c135 9:2a540be2)
| |    r3
| *  2:961f6ea6 spectral orphan
| |  r2
| x  1:8a857286 spectral obsolete (became: 5:2b95feb5)
|/   r1
o  0:7a56b5fb spectral
   base


≻ HGRCPATH=/dev/null hg evolve --any --all --config extensions.evolve=
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
** Mercurial Distributed SCM (version 4.5.2+1195-a708e1e4d7a8)
** Extensions loaded: evolve
Traceback (most recent call last):
  File "/usr/bin/hg", line 41, in <module>
    dispatch.run()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 88, in
run
    status = (dispatch(req) or 0)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 208, in
dispatch
    ret = _runcatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 349, in
_runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 357, in
_callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 154, in
callcatch
    return func()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 339, in
_runcatchfunc
    return _dispatch(req)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 943, in
_dispatch
    cmdpats, cmdoptions)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 700, in
runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 951, in
_runcommand
    return cmdfunc()
  File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 940, in
<lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1776, in
check
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/hgext3rd/evolve/evolvecmd.py", line
1181, in evolve
    revs = _orderrevs(repo, revs)
  File "/usr/lib/python2.7/dist-packages/hgext3rd/evolve/evolvecmd.py", line
437, in _orderrevs
    dependencies, rdependencies = utility.builddependencies(repo, revs)
  File "/usr/lib/python2.7/dist-packages/hgext3rd/evolve/utility.py", line 109,
in builddependencies
    dependencies[r].add(succ)
AttributeError: 'list' object has no attribute 'add'


≻ HGRCPATH=/dev/null hg  --config extensions.evolve= version -v       
Mercurial Distributed SCM (version 4.5.2+1195-a708e1e4d7a8)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2018 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Enabled extensions:

  evolve  external  7.3.1.dev

(This is evolve from commit c912eaf29eec)


As far as I can tell,
https://www.mercurial-scm.org/repo/evolve/file/c912eaf29eec/hgext3rd/evolve/utility.py#l106
replaces the set() in dependencies[r] with a *list* returned from
mercurial/obsutil.py's successorsets.

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


More information about the Mercurial-devel mailing list