comparison tests/test-evolve-continue.t @ 3490:51c0a23b519e

evolve: handle case when newnode can be None while continuing evolve There can be case when `hg evolve --continue` is run, when working directory is clean and there is nothing to be included in the new commit. Let's make sure we handle such cases correctly and obsolete the node which is evolved with parent of wdir as successor. This is same as what rebase does.
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 22 Jan 2018 18:52:27 +0530
parents ee72cdc2387b
children 92df1aac8c7f
comparison
equal deleted inserted replaced
3489:ee72cdc2387b 3490:51c0a23b519e
128 $ hg diff 128 $ hg diff
129 129
130 XXX: maybe we should add a message here about evolve resulting in no commit 130 XXX: maybe we should add a message here about evolve resulting in no commit
131 $ hg evolve --continue 131 $ hg evolve --continue
132 evolving 7:ad0a59d83efe "added e" 132 evolving 7:ad0a59d83efe "added e"
133 ** Unknown exception encountered with possibly-broken third-party extension evolve
134 ** which supports versions 4.4 of Mercurial.
135 ** Please disable evolve and try your action again.
136 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/
137 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
138 ** Mercurial Distributed SCM (version 4.5+64-87416288be98)
139 ** Extensions loaded: rebase, evolve
140 Traceback (most recent call last):
141 File "/tmp/hgtests.vDbR61/install/bin/hg", line 41, in <module>
142 dispatch.run()
143 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 88, in run
144 status = (dispatch(req) or 0) & 255
145 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 183, in dispatch
146 ret = _runcatch(req)
147 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 324, in _runcatch
148 return _callcatch(ui, _runcatchfunc)
149 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 332, in _callcatch
150 return scmutil.callcatch(ui, func)
151 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/scmutil.py", line 154, in callcatch
152 return func()
153 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 314, in _runcatchfunc
154 return _dispatch(req)
155 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 918, in _dispatch
156 cmdpats, cmdoptions)
157 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 673, in runcommand
158 ret = _runcommand(ui, options, cmd, d)
159 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 926, in _runcommand
160 return cmdfunc()
161 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/dispatch.py", line 915, in <lambda>
162 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
163 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/util.py", line 1195, in check
164 return func(*args, **kwargs)
165 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/evolvecmd.py", line 1141, in evolve
166 obsolete.createmarkers(repo, [(ctx, (repo[node],))])
167 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/obsolete.py", line 1115, in createmarkers
168 ui=repo.ui)
169 File "/tmp/hgtests.vDbR61/install/lib/python/mercurial/obsolete.py", line 621, in create
170 if len(succ) != 20:
171 TypeError: object of type 'NoneType' has no len()
172 [1]
173 133
174 $ hg glog 134 $ hg glog
175 @ 8:00a5c774cc37 added d 135 @ 8:00a5c774cc37 added d
176 | () draft 136 | () draft
177 | * 7:ad0a59d83efe added e
178 | | () draft
179 | x 6:2a4e03d422e2 added d
180 |/ () draft
181 o 5:cb6a2ab625bb added c 137 o 5:cb6a2ab625bb added c
182 | () draft 138 | () draft
183 o 2:b1661037fa25 added b 139 o 2:b1661037fa25 added b
184 | () draft 140 | () draft
185 o 1:c7586e2a9264 added a 141 o 1:c7586e2a9264 added a