src/topic/__init__.py
changeset 1874 ec28b6c3414a
parent 1873 04c971850183
child 1877 69077c65919d
equal deleted inserted replaced
1873:04c971850183 1874:ec28b6c3414a
   129                    continue
   129                    continue
   130                if clear:
   130                if clear:
   131                    del fixedextra[constants.extrakey]
   131                    del fixedextra[constants.extrakey]
   132                else:
   132                else:
   133                    fixedextra[constants.extrakey] = topic
   133                    fixedextra[constants.extrakey] = topic
       
   134                if 'amend_source' in fixedextra:
       
   135                    # TODO: right now the commitctx wrapper in
       
   136                    # topicrepo overwrites the topic in extra if
       
   137                    # amend_source is set to support 'hg commit
       
   138                    # --amend'. Support for amend should be adjusted
       
   139                    # to not be so invasive.
       
   140                    del fixedextra['amend_source']
   134                ui.debug('changing topic of %s from %s to %s\n' % (
   141                ui.debug('changing topic of %s from %s to %s\n' % (
   135                    c, oldtopic, newtopic))
   142                    c, oldtopic, newtopic))
   136                ui.debug('fixedextra: %r\n' % fixedextra)
   143                ui.debug('fixedextra: %r\n' % fixedextra)
   137                mc = context.memctx(
   144                mc = context.memctx(
   138                    repo, (c.p1().node(), c.p2().node()), c.description(),
   145                    repo, (c.p1().node(), c.p2().node()), c.description(),