Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

hglib: moved method for reading mergetools from thgconfig to hglib

Changeset 26b46e36e597

Parent 60224a69d48a

by Simon Heimberg

Changes to 2 files · Browse files at 26b46e36e597 Showing diff from parent 60224a69d48a Diff from another changeset...

 
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
 
961
962
963
 
943
944
945
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
946
947
948
949
@@ -943,21 +943,7 @@
  values.append(name)   elif cpath == 'ui.merge':   # Special case, add [merge-tools] to possible values - try: - tools = [] - for key, value in self.ui.configitems('merge-tools'): - t = key.split('.')[0] - if t not in tools: - tools.append(t) - for t in tools: - # Ensure the tool is installed - if filemerge._findtool(self.ui, t): - values.append(t) - values.append('internal:merge') - values.append('internal:prompt') - values.append('internal:dump') - except ImportError: - pass + hglib.mergetools(self.ui, values)     currow = None   if not ispw:
Change 1 of 1 Show Entire File thgutil/​hglib.py Stacked
 
125
126
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
129
130
 
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
@@ -125,6 +125,27 @@
  # May already be canonical   canonpats.append(f)   return canonpats + + +def mergetools(ui, values=None): + 'returns the configured merge tools and the internal ones' + if values == None: + values = [] + from mercurial import filemerge + for key, value in ui.configitems('merge-tools'): + t = key.split('.')[0] + if t not in values: + # Ensure the tool is installed + if filemerge._findtool(ui, t): + values.append(t) + values.append('internal:merge') + values.append('internal:prompt') + values.append('internal:dump') + values.append('internal:local') + values.append('internal:other') + values.append('internal:fail') + return values +    def hgcmd_toq(path, q, *args):   '''