# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1523009157 -19800 # Node ID 19e3771f4bccd350a27a8ccdf49bcb6075bac9c3 # Parent 23e515ca01431c180e6d6af165573578cad1d27d tests: add a test demonstarting issue5832 traceback The traceback will be fixed in upcoming patches. diff -r 23e515ca0143 -r 19e3771f4bcc tests/test-evolve-issue5832.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-evolve-issue5832.t Fri Apr 06 15:35:57 2018 +0530 @@ -0,0 +1,186 @@ +Test for issue 5832 present at https://bz.mercurial-scm.org/show_bug.cgi?id=5832 +================================================================================ + +Setup +===== + + $ cat >> $HGRCPATH < [phases] + > publish = False + > [alias] + > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}" + > [extensions] + > EOF + $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH + + $ hg init issue5832 + $ cd issue5832 + + $ echo base > base + $ hg ci -Aqm "added base" + + $ echo a > a + $ hg ci -Aqm "added a" + + $ echo b > b + $ hg ci -Aqm "added b" + + $ hg up .^^ + 0 files updated, 0 files merged, 2 files removed, 0 files unresolved + $ echo c > c + $ echo d > d + $ hg ci -Aqm "added c and d" + + $ hg merge + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + (branch merge, don't forget to commit) + $ hg ci -m "merge commit" + + $ hg glog + @ 4:b9b387427a53 merge commit + |\ () draft + | o 3:9402371b436e added c and d + | | () draft + o | 2:a1da0651488c added b + | | () draft + o | 1:1b24879c5c3c added a + |/ () draft + o 0:bde1d2b6b5e5 added base + () draft + + $ hg up 1b24879c5c3c + 0 files updated, 0 files merged, 3 files removed, 0 files unresolved + $ echo foo > a + $ hg amend + 2 new orphan changesets + + $ hg up bde1d2b6b5e5 + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ echo c > c + $ hg ci -Aqm "added c" + $ hg up .^ + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ echo d > d + $ hg ci -Aqm "added d" + $ hg glog + @ 7:5841d7cf9893 added d + | () draft + | o 6:62fb70414f99 added c + |/ () draft + | o 5:7014ec2829cd added a + |/ () draft + | * 4:b9b387427a53 merge commit + | |\ () draft + +---o 3:9402371b436e added c and d + | | () draft + | * 2:a1da0651488c added b + | | () draft + | x 1:1b24879c5c3c added a + |/ () draft + o 0:bde1d2b6b5e5 added base + () draft + + $ hg prune -r 9402371b436e --succ 62fb70414f99 --succ 5841d7cf9893 --split + 1 changesets pruned + + $ hg glog + @ 7:5841d7cf9893 added d + | () draft + | o 6:62fb70414f99 added c + |/ () draft + | o 5:7014ec2829cd added a + |/ () draft + | * 4:b9b387427a53 merge commit + | |\ () draft + +---x 3:9402371b436e added c and d + | | () draft + | * 2:a1da0651488c added b + | | () draft + | x 1:1b24879c5c3c added a + |/ () draft + o 0:bde1d2b6b5e5 added base + () draft + +Checking what evolve is trying to do + + $ hg evolve --dry-run --any --all + ** unknown exception encountered, please report by visiting + ** https://mercurial-scm.org/wiki/BugTracker + ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] + ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257) + ** Extensions loaded: evolve + Traceback (most recent call last): + File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in + dispatch.run() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run + status = (dispatch(req) or 0) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch + ret = _runcatch(req) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch + return scmutil.callcatch(ui, func) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch + return func() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc + return _dispatch(req) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch + cmdpats, cmdoptions) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand + return cmdfunc() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check + return func(*args, **kwargs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve + revs = _orderrevs(repo, revs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs + dependencies, rdependencies = utility.builddependencies(repo, revs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies + dependencies[r].add(succ) + AttributeError: 'list' object has no attribute 'add' + [1] + +Resolving instability using `hg evolve` + + $ hg evolve --any --all + ** unknown exception encountered, please report by visiting + ** https://mercurial-scm.org/wiki/BugTracker + ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] + ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257) + ** Extensions loaded: evolve + Traceback (most recent call last): + File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in + dispatch.run() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run + status = (dispatch(req) or 0) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch + ret = _runcatch(req) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch + return _callcatch(ui, _runcatchfunc) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch + return scmutil.callcatch(ui, func) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch + return func() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc + return _dispatch(req) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch + cmdpats, cmdoptions) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand + ret = _runcommand(ui, options, cmd, d) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand + return cmdfunc() + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in + d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) + File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check + return func(*args, **kwargs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve + revs = _orderrevs(repo, revs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs + dependencies, rdependencies = utility.builddependencies(repo, revs) + File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies + dependencies[r].add(succ) + AttributeError: 'list' object has no attribute 'add' + [1]