# HG changeset patch # User Pierre-Yves David # Date 1540483748 -7200 # Node ID 470ba668687addece74270e53b0ef24e7f1cf798 # Parent aa9f330781577b6734bc7f28289b93da3a43ab0c evolve: do not try to display stack index of changeset who do not have one diff -r aa9f33078157 -r 470ba668687a hgext3rd/evolve/utility.py --- a/hgext3rd/evolve/utility.py Thu Oct 25 18:08:34 2018 +0200 +++ b/hgext3rd/evolve/utility.py Thu Oct 25 18:09:08 2018 +0200 @@ -14,7 +14,7 @@ from mercurial.node import nullrev shorttemplate = "[{label('evolve.rev', rev)}] {desc|firstline}\n" -stacktemplate = "[s{label('evolve.rev', topicidx)}] {desc|firstline}\n" +stacktemplate = """[{label('evolve.rev', if(topicidx, "s{topicidx}", rev))}] {desc|firstline}\n""" def obsexcmsg(ui, message, important=False): verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange', diff -r aa9f33078157 -r 470ba668687a tests/test-topic-stack-complex.t --- a/tests/test-topic-stack-complex.t Thu Oct 25 18:08:34 2018 +0200 +++ b/tests/test-topic-stack-complex.t Thu Oct 25 18:09:08 2018 +0200 @@ -172,7 +172,7 @@ $ hg evolve --content-divergent -r ec94a1ed1330 merge:[s5] Added e and f with: [s4] Added e and f - base: [s] Added e and f + base: [3] Added e and f updating to "local" side of the conflict: ec94a1ed1330 merging "other" content-divergent changeset 'f2eff98490d2' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved