equal
deleted
inserted
replaced
472 # Wrap changelog.add to drop empty topic |
472 # Wrap changelog.add to drop empty topic |
473 extensions.wrapfunction(changelog.changelog, 'add', wrapadd) |
473 extensions.wrapfunction(changelog.changelog, 'add', wrapadd) |
474 |
474 |
475 def wrapinit(orig, self, repo, *args, **kwargs): |
475 def wrapinit(orig, self, repo, *args, **kwargs): |
476 orig(self, repo, *args, **kwargs) |
476 orig(self, repo, *args, **kwargs) |
477 if repo.currenttopic: |
477 if getattr(repo, 'currenttopic', ''): |
478 self._extra[constants.extrakey] = repo.currenttopic |
478 self._extra[constants.extrakey] = repo.currenttopic |
479 else: |
479 else: |
480 # Empty key will be dropped from extra by another hack at the changegroup level |
480 # Empty key will be dropped from extra by another hack at the changegroup level |
481 self._extra[constants.extrakey] = '' |
481 self._extra[constants.extrakey] = '' |
482 |
482 |
1010 topicstime[secspassed] = (maxtime, [topicuser]) |
1010 topicstime[secspassed] = (maxtime, [topicuser]) |
1011 |
1011 |
1012 return topicstime |
1012 return topicstime |
1013 |
1013 |
1014 def summaryhook(ui, repo): |
1014 def summaryhook(ui, repo): |
1015 t = repo.currenttopic |
1015 t = getattr(repo, 'currenttopic', '') |
1016 if not t: |
1016 if not t: |
1017 return |
1017 return |
1018 # i18n: column positioning for "hg summary" |
1018 # i18n: column positioning for "hg summary" |
1019 ui.write(_("topic: %s\n") % ui.label(t, 'topic.active')) |
1019 ui.write(_("topic: %s\n") % ui.label(t, 'topic.active')) |
1020 |
1020 |