--- a/src/topic/__init__.py Fri Jun 12 16:39:39 2015 -0500
+++ b/src/topic/__init__.py Fri Jun 12 16:41:10 2015 -0500
@@ -163,6 +163,24 @@
finally:
wlock.release()
+def _fixrebase(loaded):
+ if not loaded:
+ return
+
+ def savetopic(ctx, extra):
+ e = ctx.extra()
+ if constants.extrakey in e:
+ print "copying topic"
+ extra[constants.extrakey] = e[constants.extrakey]
+
+ def newmakeextrafn(orig, copiers):
+ return orig(copiers + [savetopic])
+
+ rebase = extensions.find("rebase")
+ extensions.wrapfunction(rebase, '_makeextrafn', newmakeextrafn)
+
+extensions.afterloaded('rebase', _fixrebase)
+
entry = extensions.wrapcommand(commands.table, 'commit', commitwrap)
entry[1].append(('t', 'topic', '',
_("use specified topic"), _('TOPIC')))