changeset 2339:f641cccbd119

topic: automatically configure thg to display topic If no other config is set, we configure Tortoise-hg to display topic. This should helps usability.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 10 May 2017 13:03:05 +0200
parents f62ce1bbd05b
children e6d3b83b306b
files README hgext3rd/topic/__init__.py
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/README	Wed May 10 13:08:45 2017 +0200
+++ b/README	Wed May 10 13:03:05 2017 +0200
@@ -116,6 +116,7 @@
 -------------------
 
  - add a debugobshistory command to inspect the obs-history of a changeset
+ - topic: have thg display topic name if possible,
 
 6.1.1 - in progress
 -------------------
--- a/hgext3rd/topic/__init__.py	Wed May 10 13:08:45 2017 +0200
+++ b/hgext3rd/topic/__init__.py	Wed May 10 13:03:05 2017 +0200
@@ -157,6 +157,10 @@
     if not isinstance(repo, localrepo.localrepository):
         return # this can be a peer in the ssh case (puzzling)
 
+    if repo.ui.config('experimental', 'thg.displaynames', None) is None:
+        repo.ui.setconfig('experimental', 'thg.displaynames', 'topics',
+                          source='topic-extension')
+
     class topicrepo(repo.__class__):
 
         def _restrictcapabilities(self, caps):