1. TortoiseHg
  2. TortoiseHg
  3. thg


Angel Ezquerra  committed 858fabe

repowidget: take into account the tortoisehg.branchcolors setting (refs #1644)

The tortoisehg.branchcolors setting has an entry on the Workbench panel of the
settings dialog. However, it was being ignored. This patch fixes that.

# Limitations:

Branches names with spaces in them are not supported.

  • Participants
  • Parent commits 9ee1af0
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repomodel.py

View file
         # Always assign the first color to the default branch
+        # Set the colors specified in the tortoisehg.brachcolors config key
+        for colorspec in self.repo.ui.configlist('tortoisehg', 'branchcolors'):
+            branch, color = colorspec.split(':')
+            self._branch_colors[branch] = color
         # Then assign colors to all branches in alphabetical order
         # Note that re-assigning the color to the default branch
         # is not expensive