src/topic/__init__.py
changeset 1874 ec28b6c3414a
parent 1873 04c971850183
child 1877 69077c65919d
--- a/src/topic/__init__.py	Fri Dec 11 12:53:38 2015 -0500
+++ b/src/topic/__init__.py	Fri Dec 11 12:53:20 2015 -0500
@@ -131,6 +131,13 @@
                    del fixedextra[constants.extrakey]
                else:
                    fixedextra[constants.extrakey] = topic
+               if 'amend_source' in fixedextra:
+                   # TODO: right now the commitctx wrapper in
+                   # topicrepo overwrites the topic in extra if
+                   # amend_source is set to support 'hg commit
+                   # --amend'. Support for amend should be adjusted
+                   # to not be so invasive.
+                   del fixedextra['amend_source']
                ui.debug('changing topic of %s from %s to %s\n' % (
                    c, oldtopic, newtopic))
                ui.debug('fixedextra: %r\n' % fixedextra)