Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 6033:182e2a1dbd1c
topic: drop topicfilter usage from topicrepo.commitctx()
This block of code was introduced in 13313d0cab71, but the commit description
doesn't explain the exact intent of this code.
The fact that the result of other.commitctx() was discarded makes me think that
this block only existed to deal with amends, and it was only useful for code
that was removed earlier in this series.
The only code that's left in commitctx() is adding current topic to
workingcommitctx, and I don't think we need to adjust repo filter for that.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Fri, 03 Sep 2021 08:01:58 +0300 |
parents | 2800aa3c3dbf |
children | bec2d792ceae |
comparison
equal
deleted
inserted
replaced
6032:2800aa3c3dbf | 6033:182e2a1dbd1c |
---|---|
482 }) | 482 }) |
483 with configoverride: | 483 with configoverride: |
484 return super(topicrepo, self).commit(*args, **kwargs) | 484 return super(topicrepo, self).commit(*args, **kwargs) |
485 | 485 |
486 def commitctx(self, ctx, *args, **kwargs): | 486 def commitctx(self, ctx, *args, **kwargs): |
487 topicfilter = topicmap.topicfilter(self.filtername) | |
488 if topicfilter != self.filtername: | |
489 other = self.filtered(topicmap.topicfilter(self.filtername)) | |
490 other.commitctx(ctx, *args, **kwargs) | |
491 | |
492 if isinstance(ctx, context.workingcommitctx): | 487 if isinstance(ctx, context.workingcommitctx): |
493 current = self.currenttopic | 488 current = self.currenttopic |
494 if current: | 489 if current: |
495 ctx.extra()[constants.extrakey] = current | 490 ctx.extra()[constants.extrakey] = current |
496 return super(topicrepo, self).commitctx(ctx, *args, **kwargs) | 491 return super(topicrepo, self).commitctx(ctx, *args, **kwargs) |