topic: automatically configure thg to display topic
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 10 May 2017 13:03:05 +0200
changeset 2339 f641cccbd119
parent 2338 f62ce1bbd05b
child 2340 e6d3b83b306b
topic: automatically configure thg to display topic If no other config is set, we configure Tortoise-hg to display topic. This should helps usability.
README
hgext3rd/topic/__init__.py
--- 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):