# HG changeset patch # User Matt Mackall # Date 1434145786 18000 # Node ID f241a00e93a7d7e57f615b5a5aa0c6871f398c05 # Parent 67950fcf1c69014160e9b234dfe79815d9dee6bb topics: only apply topic to commits of the working copy diff -r 67950fcf1c69 -r f241a00e93a7 src/topic/__init__.py --- a/src/topic/__init__.py Fri Jun 12 16:41:10 2015 -0500 +++ b/src/topic/__init__.py Fri Jun 12 16:49:46 2015 -0500 @@ -44,9 +44,10 @@ orig = repo.__class__ class topicrepo(repo.__class__): def commitctx(self, ctx, error=None): - current = self.currenttopic - if current: - ctx.extra()[constants.extrakey] = current + if isinstance(ctx, context.workingcommitctx): + current = self.currenttopic + if current: + ctx.extra()[constants.extrakey] = current return orig.commitctx(self, ctx, error=error) @property