Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 6536:90b631fde2d7 stable
topic: only set topic on workingcommitctx if it doesn't already have one
This fix is so obvious, that I wonder, if this is the correct thing to do, why
wasn't it done like this from the beginning. Despite my doubts, all the tests
pass.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Mon, 17 Jul 2023 15:52:39 -0300 |
parents | ce67a138c5d6 |
children | ca1c219bd59f ba8354de1c4d |
comparison
equal
deleted
inserted
replaced
6529:ce67a138c5d6 | 6536:90b631fde2d7 |
---|---|
554 return super(topicrepo, self).commit(*args, **kwargs) | 554 return super(topicrepo, self).commit(*args, **kwargs) |
555 | 555 |
556 def commitctx(self, ctx, *args, **kwargs): | 556 def commitctx(self, ctx, *args, **kwargs): |
557 if isinstance(ctx, context.workingcommitctx): | 557 if isinstance(ctx, context.workingcommitctx): |
558 current = self.currenttopic | 558 current = self.currenttopic |
559 if current: | 559 if current and constants.extrakey not in ctx.extra(): |
560 ctx.extra()[constants.extrakey] = current | 560 ctx.extra()[constants.extrakey] = current |
561 return super(topicrepo, self).commitctx(ctx, *args, **kwargs) | 561 return super(topicrepo, self).commitctx(ctx, *args, **kwargs) |
562 | 562 |
563 @util.propertycache | 563 @util.propertycache |
564 def _tnscache(self): | 564 def _tnscache(self): |