Mercurial > evolve
comparison hgext3rd/topic/topicmap.py @ 6363:f168c0fdbde9 stable
topic: copy parent branch check in commitstatus() from core
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 13 Dec 2022 20:03:23 +0400 |
parents | ad7c9c0b7a63 |
children | 3271ec128328 a87abe69a2f8 |
comparison
equal
deleted
inserted
replaced
6361:7933292aa102 | 6363:f168c0fdbde9 |
---|---|
108 opts = {} | 108 opts = {} |
109 if ctx.topic(): | 109 if ctx.topic(): |
110 return ret | 110 return ret |
111 parents = ctx.parents() | 111 parents = ctx.parents() |
112 | 112 |
113 if (not opts.get(b'amend') and bheads and node not in bheads and not | 113 if (not opts.get(b'amend') and bheads and node not in bheads and not any( |
114 [x for x in parents if x.node() in bheads and x.branch() == branch]): | 114 p.node() in bheads and p.branch() == branch for p in parents |
115 )): | |
115 repo.ui.status(_(b"(consider using topic for lightweight branches." | 116 repo.ui.status(_(b"(consider using topic for lightweight branches." |
116 b" See 'hg help topic')\n")) | 117 b" See 'hg help topic')\n")) |
117 | 118 |
118 return ret | 119 return ret |
119 | 120 |