Mercurial > evolve
comparison tests/test-evolve-topic.t @ 3533:f06c502ce4b7 stable
previous: add test case when it's broken on obsolete cset
This patch adds couple of tests showing `hg previous` is broken on obsolete
changeset when the successor has different topic. Upcoming patch will fix this.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 16 Mar 2018 15:15:17 +0530 |
parents | 68e99d2c6267 |
children | cd4db75413a2 |
comparison
equal
deleted
inserted
replaced
3532:68e99d2c6267 | 3533:f06c502ce4b7 |
---|---|
324 ~ | 324 ~ |
325 | 325 |
326 $ hg prev | 326 $ hg prev |
327 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | 327 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
328 [14] add ggg | 328 [14] add ggg |
329 | |
330 When the current topic and successors topic are same, but obsolete cset has | |
331 different topic | |
332 | |
333 $ hg rebase -s d2dc89c57700 -d d834582d9ee3 --config extensions.rebase= | |
334 rebasing 16:d2dc89c57700 "add iii" (bar) | |
335 1 new orphan changesets | |
336 rebasing 17:9bf430c106b7 "add jjj" (bar) | |
337 1 new orphan changesets | |
338 $ hg log -Gr 12:: | |
339 * 21 - {bar} 7542e76aba2c add jjj (draft) | |
340 | | |
341 * 20 - {bar} 7858bd7e9906 add iii (draft) | |
342 | | |
343 * 19 - {bar} d834582d9ee3 add hhh (draft) | |
344 | | |
345 | o 18 - {bar} 793eb6370b2d add fff (draft) | |
346 | | | |
347 @ | 14 - {bar} 16d6f664b17c add ggg (draft) | |
348 | | | |
349 x | 13 - {foo} 070c5573d8f9 add fff (draft) | |
350 |/ | |
351 o 12 - {foo} 42b49017ff90 add eee (draft) | |
352 | | |
353 ~ | |
354 | |
355 $ hg up 070c5573d8f9 | |
356 switching to topic foo | |
357 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
358 working directory parent is obsolete! (070c5573d8f9) | |
359 (use 'hg evolve' to update to its successor: 793eb6370b2d) | |
360 | |
361 $ hg topic bar | |
362 | |
363 $ hg prev | |
364 ** Unknown exception encountered with possibly-broken third-party extension evolve | |
365 ** which supports versions 4.4 of Mercurial. | |
366 ** Please disable evolve and try your action again. | |
367 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/ | |
368 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] | |
369 ** Mercurial Distributed SCM (version 4.5.2+1098-cdc73e5c75af) | |
370 ** Extensions loaded: rebase, evolve, topic | |
371 Traceback (most recent call last): | |
372 File "/tmp/hgtests.PuAW80/install/bin/hg", line 41, in <module> | |
373 dispatch.run() | |
374 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 88, in run | |
375 status = (dispatch(req) or 0) | |
376 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 208, in dispatch | |
377 ret = _runcatch(req) | |
378 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 349, in _runcatch | |
379 return _callcatch(ui, _runcatchfunc) | |
380 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 357, in _callcatch | |
381 return scmutil.callcatch(ui, func) | |
382 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/scmutil.py", line 154, in callcatch | |
383 return func() | |
384 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 339, in _runcatchfunc | |
385 return _dispatch(req) | |
386 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 943, in _dispatch | |
387 cmdpats, cmdoptions) | |
388 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 700, in runcommand | |
389 ret = _runcommand(ui, options, cmd, d) | |
390 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 951, in _runcommand | |
391 return cmdfunc() | |
392 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 940, in <lambda> | |
393 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) | |
394 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/util.py", line 1497, in check | |
395 return func(*args, **kwargs) | |
396 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 1051, in cmdprevious | |
397 opts.get('move_bookmark'), topic) | |
398 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 995, in _findprevtarget | |
399 if currenttopic and topic and _gettopicidx(p1) != 1: | |
400 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 957, in _gettopicidx | |
401 return getattr(ctx, 'topicidx', lambda: None)() | |
402 File "/home/foobar/repo/mutable-history/hgext3rd/topic/__init__.py", line 247, in _contexttopicidx | |
403 return revlist.index(succ) | |
404 File "/home/foobar/repo/mutable-history/hgext3rd/topic/stack.py", line 95, in index | |
405 return self.revs.index(item) | |
406 ValueError: 18 is not in list | |
407 [1] | |
408 | |
409 When current topic and obsolete cset topic are same but successor has different | |
410 one | |
411 | |
412 $ hg up 070c5573d8f9 | |
413 switching to topic foo | |
414 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
415 $ hg prev | |
416 ** Unknown exception encountered with possibly-broken third-party extension evolve | |
417 ** which supports versions 4.4 of Mercurial. | |
418 ** Please disable evolve and try your action again. | |
419 ** If that fixes the bug please report it to https://bz.mercurial-scm.org/ | |
420 ** Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] | |
421 ** Mercurial Distributed SCM (version 4.5.2+1098-cdc73e5c75af) | |
422 ** Extensions loaded: rebase, evolve, topic | |
423 Traceback (most recent call last): | |
424 File "/tmp/hgtests.PuAW80/install/bin/hg", line 41, in <module> | |
425 dispatch.run() | |
426 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 88, in run | |
427 status = (dispatch(req) or 0) | |
428 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 208, in dispatch | |
429 ret = _runcatch(req) | |
430 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 349, in _runcatch | |
431 return _callcatch(ui, _runcatchfunc) | |
432 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 357, in _callcatch | |
433 return scmutil.callcatch(ui, func) | |
434 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/scmutil.py", line 154, in callcatch | |
435 return func() | |
436 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 339, in _runcatchfunc | |
437 return _dispatch(req) | |
438 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 943, in _dispatch | |
439 cmdpats, cmdoptions) | |
440 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 700, in runcommand | |
441 ret = _runcommand(ui, options, cmd, d) | |
442 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 951, in _runcommand | |
443 return cmdfunc() | |
444 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/dispatch.py", line 940, in <lambda> | |
445 d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) | |
446 File "/tmp/hgtests.PuAW80/install/lib/python/mercurial/util.py", line 1497, in check | |
447 return func(*args, **kwargs) | |
448 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 1051, in cmdprevious | |
449 opts.get('move_bookmark'), topic) | |
450 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 995, in _findprevtarget | |
451 if currenttopic and topic and _gettopicidx(p1) != 1: | |
452 File "/home/foobar/repo/mutable-history/hgext3rd/evolve/__init__.py", line 957, in _gettopicidx | |
453 return getattr(ctx, 'topicidx', lambda: None)() | |
454 File "/home/foobar/repo/mutable-history/hgext3rd/topic/__init__.py", line 247, in _contexttopicidx | |
455 return revlist.index(succ) | |
456 File "/home/foobar/repo/mutable-history/hgext3rd/topic/stack.py", line 95, in index | |
457 return self.revs.index(item) | |
458 ValueError: 18 is not in list | |
459 [1] |