comparison tests/test-evolve-issue5832.t @ 3656:62e4149435d8

utility: convert node from MultipleSuccessorsError to rev numbers (issue5832) utility.builddependencies() deals with rev numbers but MultipleSuccessorsError returns nodeid which breaks the function and also breaks instability resolution. Previou patch demonstrate the breakage. This patch makes sure we convert those nodeids to rev numbers before processing ahead.
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 06 Apr 2018 20:13:27 +0530
parents 19e3771f4bcc
children b36e38e3a176
comparison
equal deleted inserted replaced
3655:19e3771f4bcc 3656:62e4149435d8
102 () draft 102 () draft
103 103
104 Checking what evolve is trying to do 104 Checking what evolve is trying to do
105 105
106 $ hg evolve --dry-run --any --all 106 $ hg evolve --dry-run --any --all
107 ** unknown exception encountered, please report by visiting 107 move:[2] added b
108 ** https://mercurial-scm.org/wiki/BugTracker 108 atop:[5] added a
109 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] 109 hg rebase -r a1da0651488c -d 7014ec2829cd
110 ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257) 110 could not solve instability, ambiguous destination: parent split across two branches
111 ** Extensions loaded: evolve
112 Traceback (most recent call last):
113 File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in <module>
114 dispatch.run()
115 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run
116 status = (dispatch(req) or 0)
117 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch
118 ret = _runcatch(req)
119 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch
120 return _callcatch(ui, _runcatchfunc)
121 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch
122 return scmutil.callcatch(ui, func)
123 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch
124 return func()
125 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc
126 return _dispatch(req)
127 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch
128 cmdpats, cmdoptions)
129 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand
130 ret = _runcommand(ui, options, cmd, d)
131 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand
132 return cmdfunc()
133 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in <lambda>
134 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
135 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check
136 return func(*args, **kwargs)
137 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve
138 revs = _orderrevs(repo, revs)
139 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs
140 dependencies, rdependencies = utility.builddependencies(repo, revs)
141 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies
142 dependencies[r].add(succ)
143 AttributeError: 'list' object has no attribute 'add'
144 [1]
145 111
146 Resolving instability using `hg evolve` 112 Resolving instability using `hg evolve`
147 113
148 $ hg evolve --any --all 114 $ hg evolve --any --all --config ui.interactive=True <<EOF
149 ** unknown exception encountered, please report by visiting 115 > 0
150 ** https://mercurial-scm.org/wiki/BugTracker 116 > EOF
151 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] 117 move:[2] added b
152 ** Mercurial Distributed SCM (version 4.5.2+1522-110be5264257) 118 atop:[5] added a
153 ** Extensions loaded: evolve 119 move:[4] merge commit
154 Traceback (most recent call last): 120 atop:[8] added b
155 File "/tmp/hgtests.Zqw2_x/install/bin/hg", line 41, in <module> 121 ancestor '7235ef625ea3' split over multiple topological branches.
156 dispatch.run() 122 choose an evolve destination:
157 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 93, in run 123 0: [62fb70414f99] added c
158 status = (dispatch(req) or 0) 124 1: [5841d7cf9893] added d
159 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 213, in dispatch 125 q: quit the prompt
160 ret = _runcatch(req) 126 enter the index of the revision you want to select: 0
161 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 354, in _runcatch 127 move:[9] merge commit
162 return _callcatch(ui, _runcatchfunc) 128 atop:[6] added c
163 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 362, in _callcatch 129 working directory is now at 28a0775ac832
164 return scmutil.callcatch(ui, func) 130
165 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/scmutil.py", line 159, in callcatch 131 $ hg glog
166 return func() 132 @ 10:28a0775ac832 merge commit
167 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 344, in _runcatchfunc 133 |\ () draft
168 return _dispatch(req) 134 | o 8:2baf8bae7ea4 added b
169 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 973, in _dispatch 135 | | () draft
170 cmdpats, cmdoptions) 136 | | o 7:5841d7cf9893 added d
171 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 730, in runcommand 137 | | | () draft
172 ret = _runcommand(ui, options, cmd, d) 138 o---+ 6:62fb70414f99 added c
173 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 981, in _runcommand 139 / / () draft
174 return cmdfunc() 140 o / 5:7014ec2829cd added a
175 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/dispatch.py", line 970, in <lambda> 141 |/ () draft
176 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) 142 o 0:bde1d2b6b5e5 added base
177 File "/tmp/hgtests.Zqw2_x/install/lib/python/mercurial/util.py", line 1537, in check 143 () draft
178 return func(*args, **kwargs)
179 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1232, in evolve
180 revs = _orderrevs(repo, revs)
181 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 463, in _orderrevs
182 dependencies, rdependencies = utility.builddependencies(repo, revs)
183 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/utility.py", line 109, in builddependencies
184 dependencies[r].add(succ)
185 AttributeError: 'list' object has no attribute 'add'
186 [1]