Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

Merge with stable

Changeset 075b6dd8684e

Parents 06d05ce40d38

Parents bbc026f6ebb3

by Steve Borho

Changes to 27 files · Browse files at 075b6dd8684e Showing diff from parent 06d05ce40d38 bbc026f6ebb3 Diff from another changeset...

 
44
45
46
 
47
48
49
 
56
57
58
 
59
60
61
 
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
 
79
80
81
 
88
89
90
 
91
92
93
 
98
99
100
 
101
102
103
 
106
107
108
 
109
110
111
 
113
114
115
 
116
117
118
 
182
183
184
 
185
186
187
 
44
45
46
47
48
49
50
 
57
58
59
60
61
62
63
 
66
67
68
 
 
 
 
 
 
 
 
 
 
 
69
70
71
72
73
 
80
81
82
83
84
85
86
 
91
92
93
94
95
96
97
 
100
101
102
103
104
105
106
 
108
109
110
111
112
113
114
 
178
179
180
181
182
183
184
@@ -44,6 +44,7 @@
 araxis.dir3diff=True    UltraCompare.regkey=Software\Microsoft\Windows\CurrentVersion\App Paths\UC.exe +UltraCompare.regkeyalt=Software\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\UC.exe  UltraCompare.args = $base $local $other -title1 base -title3 other  UltraCompare.priority = -2  UltraCompare.gui = True @@ -56,6 +57,7 @@
 kdiff3.priority=-3  kdiff3.args=--auto --L1 base --L2 parent1 --L3 parent2 $base $local $other -o $output  kdiff3.regkey=Software\KDiff3 +kdiff3.regkeyalt=Software\Wow6432Node\KDiff3  kdiff3.regappend=\kdiff3.exe  kdiff3.fixeol=False  kdiff3.premerge=False @@ -64,18 +66,8 @@
 kdiff3.diff3args=--L1 '$plabel1' --L2 '$clabel' --L3 '$plabel2' $parent1 $child $parent2  kdiff3.dirdiff=True   -thgKdiff3.regkey=Software\TortoiseHg -thgKdiff3.regappend=\kdiff3.exe -thgKdiff3.priority=-4 -thgKdiff3.args=--auto --L1 base --L2 parent1 --L3 parent2 $base $local $other -o $output -thgKdiff3.fixeol=False -thgKdiff3.premerge=False -thgKdiff3.gui=True -thgKdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child -thgKdiff3.diff3args=--L1 '$plabel1' --L2 '$clabel' --L3 '$plabel2' $parent1 $child $parent2 -thgKdiff3.dirdiff=True -  diffmerge.regkey=Software\SourceGear\SourceGear DiffMerge\ +diffmerge.regkeyalt=Software\Wow6432Node\SourceGear\SourceGear DiffMerge\  diffmerge.regname=Location  diffmerge.priority=-7  diffmerge.args=-nosplash -merge -title1=local -title2=merged -title3=other $local $base $other -result=$output @@ -88,6 +80,7 @@
 p4merge.priority=-8  p4merge.args=$base $local $other $output  p4merge.regkey=Software\Perforce\Environment +p4merge.regkeyalt=Software\Wow6432Node\Perforce\Environment  p4merge.regname=P4INSTROOT  p4merge.regappend=\p4merge.exe  p4merge.gui=True @@ -98,6 +91,7 @@
 tortoisemerge.priority=-9  tortoisemerge.args=/base:$base /mine:$local /theirs:$other /merged:$output  tortoisemerge.regkey=Software\TortoiseSVN +tortoisemerge.regkeyalt=Software\Wow6432Node\TortoiseSVN  tortoisemerge.checkchanged=True  tortoisemerge.gui=True  tortoisemerge.diffargs=/base:$parent /mine:$child /basename:'$plabel1' /minename:'$clabel' @@ -106,6 +100,7 @@
 ecmerge.priority=-10  ecmerge.args=$base $local $other --mode=merge3 --title0=base --title1=local --title2=other --to=$output  ecmerge.regkey=Software\Elli\xc3\xa9 Computing\Merge +ecmerge.regkeyalt=Software\Wow6432Node\Elli\xc3\xa9 Computing\Merge  ecmerge.gui=True  ecmerge.diffargs=$parent $child --mode=diff2 --title1='$plabel1' --title2='$clabel'  ecmerge.diff3args=$child $parent1 $parent2 --mode=diff3 --title0='$clabel' --title1='$plabel1' --title2='$plabel2' @@ -113,6 +108,7 @@
 ecmerge.dir3diff=True    winmergeu.regkey=Software\Thingamahoochie\WinMerge\ +winmergeu.regkeyalt=Software\Wow6432Node\Thingamahoochie\WinMerge\  winmergeu.regname=Executable  winmergeu.priority=-10  winmergeu.args=/e /x /wl /ub /dl other /dr local $other $local $output @@ -182,6 +178,7 @@
   ; Telelogic Rhapsody DiffMerge Tool  rhapsody_diffmerge.regkey=Software\Telelogic\Rhapsody\DiffMerge\ +rhapsody_diffmerge.regkeyalt=Software\Wow6432Node\Telelogic\Rhapsody\DiffMerge\  rhapsody_diffmerge.regname=Install Path  rhapsody_diffmerge.priority=-110  rhapsody_diffmerge.args=-xmerge $other $local -base $base -out $output
 
293
294
295
 
 
 
 
 
 
 
 
 
 
 
 
296
297
298
 
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
@@ -293,6 +293,18 @@
  mode. This button is only visible when previewing a changeset   bundle.   +The Workbench will attempt to lookup the entered search phrase in the +repository to see if it matches a tag, bookmark, branch name, changeset +hash, or revision number. If no changeset match is found, the Workbench +checks if the search phrase has any parentheses. If no parentheses are +found, the Workbench assumes the search is a keyword and performs a +:command:`keyword()` revision set search. If parentheses are found, the +Workbench assumes the search phrase is a revision set specification and +attempts to resolve the set. + +If you need to perform a keyword search that includes parentheses, use +:command:`keyword("PHRASE(FOO)")`. +  Revision Graph Details  ----------------------  
Change 1 of 2 Show Entire File setup.py Stacked
 
143
144
145
 
 
 
146
147
148
 
150
151
152
 
153
154
155
 
143
144
145
146
147
148
149
150
151
 
153
154
155
156
157
158
159
@@ -143,6 +143,9 @@
  py_file = splitext(qrc_file)[0] + "_rc.py"   if not(self.force or newer(qrc_file, py_file)):   return + import PyQt4 + path = os.getenv('PATH') + os.putenv('PATH', path + ';' + os.path.dirname(PyQt4.__file__) + '\\bin')   if os.system('pyrcc4 "%s" -o "%s"' % (qrc_file, py_file)) > 0:   self.warn("Unable to generate python module %s for resource file %s"   % (py_file, qrc_file)) @@ -150,6 +153,7 @@
  raise SystemExit(1)   else:   log.info('compiled %s into %s' % (qrc_file, py_file)) + os.putenv('PATH', path)     def _generate_qrc(self, qrc_file, srcfiles, prefix):   basedir = os.path.dirname(qrc_file)
 
46
47
48
49
50
 
 
51
52
53
 
46
47
48
 
 
49
50
51
52
53
@@ -46,8 +46,8 @@
    def gettext(self, opts):   text = '{{{\n#!python\n' # Wrap in Bitbucket wiki preformat markers - text += _('** Please report this bug to' - ' http://bitbucket.org/tortoisehg/thg/issues\n') + text += _('** Please report this bug to ' + 'http://bitbucket.org/tortoisehg/thg/issues\n')   text += '** Mercurial version (%s). TortoiseHg version (%s)\n' % (   hglib.hgversion, version.version())   text += '** Command: %s\n' % (hglib.tounicode(opts.get('cmd', 'N/A')))
 
230
231
232
233
234
 
 
235
236
237
 
230
231
232
 
 
233
234
235
236
237
@@ -230,8 +230,8 @@
  patchchunks = ctx._files[wfile]   if isAorR(chunks[0].header) or isAorR(patchchunks[0].header):   qtlib.InfoMsgBox(_('Unable to merge chunks'), - _('Add or remove patches must be merged' - ' in the working directory')) + _('Add or remove patches must be merged ' + 'in the working directory'))   return False   # merge new chunks into existing chunks, sorting on start line   newchunks = [chunks[0]]
 
323
324
325
326
 
 
327
328
329
 
330
331
332
333
334
 
 
335
336
337
 
323
324
325
 
326
327
328
329
 
330
331
332
333
334
 
335
336
337
338
339
@@ -323,15 +323,17 @@
  def browse_src(self):   FD = QFileDialog   caption = _("Select source repository") - path = FD.getExistingDirectory(self, caption) + path = FD.getExistingDirectory(self, caption, \ + self.src_combo.currentText(), QFileDialog.ShowDirsOnly)   if path:   self.src_combo.setEditText(QDir.toNativeSeparators(path)) - self.src_combo.setFocus() + self.dest_combo.setFocus()     def browse_dest(self):   FD = QFileDialog   caption = _("Select destination repository") - path = FD.getExistingDirectory(self, caption) + path = FD.getExistingDirectory(self, caption, \ + self.dest_combo.currentText(), QFileDialog.ShowDirsOnly)   if path:   self.dest_combo.setEditText(QDir.toNativeSeparators(path))   self.dest_combo.setFocus()
 
763
764
765
766
767
768
 
 
 
 
769
770
771
 
763
764
765
 
 
 
766
767
768
769
770
771
772
@@ -763,9 +763,10 @@
    def reject(self):   if self.core.running(): - ret = QMessageBox.question(self, _('Confirm Exit'), _('Mercurial' - ' command is still running.\nAre you sure you want' - ' to terminate?'), QMessageBox.Yes | QMessageBox.No, + ret = QMessageBox.question(self, _('Confirm Exit'), + _('Mercurial command is still running.\n' + 'Are you sure you want to terminate?'), + QMessageBox.Yes | QMessageBox.No,   QMessageBox.No)   if ret == QMessageBox.Yes:   self.core.cancel()
 
518
519
520
521
522
523
524
 
 
 
 
 
525
526
527
528
529
530
531
 
 
 
 
 
532
533
534
 
554
555
556
557
558
 
 
559
560
561
 
567
568
569
570
571
 
 
572
573
574
 
518
519
520
 
 
 
 
521
522
523
524
525
526
527
528
 
 
 
 
529
530
531
532
533
534
535
536
 
556
557
558
 
 
559
560
561
562
563
 
569
570
571
 
 
572
573
574
575
576
@@ -518,17 +518,19 @@
  resp = qtlib.CustomPrompt(_('Confirm Branch Change'),   _('Named branch "%s" already exists, '   'last used in revision %d\n' - 'Yes\t- Make commit restarting this named branch\n' - 'No\t- Make commit without changing branch\n' - 'Cancel\t- Cancel this commit') % (self.branchop, rev), - self, (_('&Yes'), _('&No'), _('Cancel')), 2, 2).run() + ) % (self.branchop, rev), + self, + (_('Restart &Branch'), + _('&Commit to current branch'), + _('Cancel')), 2, 2).run()   else:   resp = qtlib.CustomPrompt(_('Confirm New Branch'),   _('Create new named branch "%s" with this commit?\n' - 'Yes\t- Start new branch with this commit\n' - 'No\t- Make commit without branch change\n' - 'Cancel\t- Cancel this commit') % self.branchop, - self, (_('&Yes'), _('&No'), _('Cancel')), 2, 2).run() + ) % self.branchop, + self, + (_('Create &Branch'), + _('&Commit to current branch'), + _('Cancel')), 2, 2).run()   if resp == 0:   newbranch = True   commandlines.append(['branch', '--repository', repo.root, @@ -554,8 +556,8 @@
  if checkedUnknowns:   res = qtlib.CustomPrompt(   _('Confirm Add'), - _('Add checked untracked files?'), self, - (_('&OK'), _('Cancel')), 0, 1, + _('Add selected untracked files?'), self, + (_('&Add'), _('Cancel')), 0, 1,   checkedUnknowns).run()   if res == 0:   cmd = ['add', '--repository', repo.root] + \ @@ -567,8 +569,8 @@
  if checkedMissing:   res = qtlib.CustomPrompt(   _('Confirm Remove'), - _('Remove checked deleted files?'), self, - (_('&OK'), _('Cancel')), 0, 1, + _('Remove selected deleted files?'), self, + (_('&Remove'), _('Cancel')), 0, 1,   checkedMissing).run()   if res == 0:   cmd = ['remove', '--repository', repo.root] + \
 
148
149
150
151
152
 
 
153
154
155
 
148
149
150
 
 
151
152
153
154
155
@@ -148,8 +148,8 @@
  elif cmd == 'discard':   labels = [(QMessageBox.Yes, _('&Discard')),   (QMessageBox.No, _('Cancel'))] - if not qtlib.QuestionMsgBox(_('Confirm Discard'), _('Discard' - ' outstanding changes in working directory?'), + if not qtlib.QuestionMsgBox(_('Confirm Discard'), + _('Discard outstanding changes to working directory?'),   labels=labels, parent=self):   return   def finished(ret):
 
229
230
231
232
 
 
 
233
234
235
 
556
557
558
 
 
 
 
 
 
229
230
231
 
232
233
234
235
236
237
 
558
559
560
561
562
563
564
565
@@ -229,7 +229,9 @@
  else:   self._show_rev = rev   - + def reload(self): + self.repoview.saveSettings() + super(FileLogDialog, self).reload()    class FileDiffDialog(_AbstractFileDialog):   """ @@ -556,3 +558,8 @@
  bvalue = bhi   vbar.setValue(bvalue)   self._invbarchanged = False + + def reload(self): + self.tableView_revisions_left.saveSettings() + self.tableView_revisions_right.saveSettings() + super(FileDiffDialog, self).reload()
 
82
83
84
85
86
 
 
87
88
89
 
82
83
84
 
 
85
86
87
88
89
@@ -82,8 +82,8 @@
  buthbox = QHBoxLayout()   utvbox.addLayout(buthbox)   copycheck = QCheckBox(_('Only consider deleted files')) - copycheck.setToolTip(_('Uncheck to consider all revisioned files' - ' for copy sources')) + copycheck.setToolTip(_('Uncheck to consider all revisioned files ' + 'for copy sources'))   copycheck.setChecked(True)   findrenames = QPushButton(_('Find Rename'))   findrenames.setToolTip(_('Find copy and/or rename sources'))
 
145
146
147
148
149
 
 
150
151
152
 
145
146
147
 
 
148
149
150
151
152
@@ -145,8 +145,8 @@
  break # already root path   if l > 1:   res = qtlib.QuestionMsgBox(_('Init'), - _('Are you sure about adding the new repository' - ' %d extra levels deep?') % l, + _('Are you sure about adding the new repository ' + '%d extra levels deep?') % l,   _('Path exists up to:\n%s\nand you asked for:\n%s')   % (p, udest),   defaultbutton=QMessageBox.No)
 
58
59
60
61
62
 
 
63
64
65
 
283
284
285
286
287
288
 
 
 
289
290
291
 
362
363
364
365
366
 
 
367
368
369
 
391
392
393
394
 
 
395
396
397
398
399
400
401
 
402
403
404
 
458
459
460
461
462
 
 
463
464
465
 
58
59
60
 
 
61
62
63
64
65
 
283
284
285
 
 
 
286
287
288
289
290
291
 
362
363
364
 
 
365
366
367
368
369
 
391
392
393
 
394
395
396
397
398
399
400
401
 
402
403
404
405
 
459
460
461
 
 
462
463
464
465
466
@@ -58,8 +58,8 @@
  page = self.currentPage()   if hasattr(page, 'need_cleanup') and page.need_cleanup():   main = _('Do you want to exit?') - text = _('To complete merging, you need to commit merged files ' - 'in working directory.') + text = _('To finish merging, you need to commit ' + 'the working directory.')   labels = ((QMessageBox.Yes, _('&Exit')),   (QMessageBox.No, _('Cancel')))   if not qtlib.QuestionMsgBox(_('Confirm Exit'), main, text, @@ -283,9 +283,9 @@
  self.groups.add(wd_merged, 'merged')   box.addWidget(wd_merged)   - text = _('Before merging, you must <a href="commit"><b>commit</b></a>,' - ' <a href="shelve"><b>shelve</b></a> to patch,' - ' or <a href="discard"><b>discard</b></a> changes.') + text = _('Before merging, you must <a href="commit"><b>commit</b></a>, ' + '<a href="shelve"><b>shelve</b></a> to patch, ' + 'or <a href="discard"><b>discard</b></a> changes.')   wd_text = QLabel(text)   wd_text.setContentsMargins(*MARGINS)   wd_text.linkActivated.connect(self.link_activated) @@ -362,8 +362,8 @@
  labels = [(QMessageBox.Yes, _('&Discard')),   (QMessageBox.No, _('Cancel'))]   if not qtlib.QuestionMsgBox(_('Confirm Discard Changes'), - _('The changes from revision %s and all unmerged parents' - ' will be discarded.\n\n' + _('The changes from revision %s and all unmerged parents ' + 'will be discarded.\n\n'   'Are you sure this is what you want to do?')   % (self.other_info.get_data('revid')),   labels=labels, parent=self): @@ -391,14 +391,15 @@
    def cancel(self):   main = _('Cancel merge and discard changes?') - text = _('Discard unfinished local changes and restart merge?') + # Does this restart "resolved" files too? + text = _('Discard local changes and restart merge?')   labels = ((QMessageBox.Yes, _('&Discard')),   (QMessageBox.No, _('Cancel')))   if qtlib.QuestionMsgBox(_('Confirm Clean Up'), main, text,   labels=labels, parent=self):   o = self.cmd.outputLog   o.appendLog(_('Canceling merge...\n'), 'control') - o.appendLog(_('(Please close any running merge tool)\n'), 'control') + o.appendLog(_('(Please close any running merge tools)\n'), 'control')   self.cmd.cancel()     def isComplete(self): @@ -458,8 +459,8 @@
  if cmd != 'discard:noconfirm':   labels = [(QMessageBox.Yes, _('&Discard')),   (QMessageBox.No, _('Cancel'))] - if not qtlib.QuestionMsgBox(_('Confirm Discard'), _('Discard' - ' outstanding changes in working directory?'), + if not qtlib.QuestionMsgBox(_('Confirm Discard'), + _('Discard outstanding changes to working directory?'),   labels=labels, parent=self):   return   def finished(ret):
 
88
89
90
91
 
92
93
94
 
88
89
90
 
91
92
93
94
@@ -88,7 +88,7 @@
  cmd.progress.connect(self.statusbar.progress)     BB = QDialogButtonBox - bb = QDialogButtonBox(BB.Ok|BB.Cancel) + bb = QDialogButtonBox(BB.Ok|BB.Close)   bb.accepted.connect(self.accept)   bb.rejected.connect(self.reject)   bb.button(BB.Ok).setDefault(True)
 
72
73
74
75
76
 
 
77
78
79
 
212
213
214
215
216
 
 
217
218
219
 
229
230
231
232
233
 
 
234
235
236
 
72
73
74
 
 
75
76
77
78
79
 
212
213
214
 
 
215
216
217
218
219
 
229
230
231
 
 
232
233
234
235
236
@@ -72,8 +72,8 @@
  self.layout().addWidget(self.autoresolvechk)     if 'hgsubversion' in repo.extensions(): - self.svnchk = QCheckBox(_('Rebase unpublished onto Subversion head' - ' (override source, destination)')) + self.svnchk = QCheckBox(_('Rebase unpublished onto Subversion head ' + '(override source, destination)'))   self.layout().addWidget(self.svnchk)   else:   self.svnchk = None @@ -212,8 +212,8 @@
  elif cmd == 'discard':   labels = [(QMessageBox.Yes, _('&Discard')),   (QMessageBox.No, _('Cancel'))] - if not qtlib.QuestionMsgBox(_('Confirm Discard'), _('Discard' - ' outstanding changes in working directory?'), + if not qtlib.QuestionMsgBox(_('Confirm Discard'), + _('Discard outstanding changes to working directory?'),   labels=labels, parent=self):   return   def finished(ret): @@ -229,8 +229,8 @@
    def reject(self):   if os.path.exists(self.repo.join('rebasestate')): - main = _('Rebase is incomplete, exiting is not recommended') - text = _('Abort is recommended before exit.') + main = _('Exiting with an unfinished rebase is not recommended.') + text = _('Consider aborting the rebase first.')   labels = ((QMessageBox.Yes, _('&Exit')),   (QMessageBox.No, _('Cancel')))   if not qtlib.QuestionMsgBox(_('Confirm Exit'), main, text,
 
42
43
44
45
46
 
 
47
48
49
 
42
43
44
 
 
45
46
47
48
49
@@ -42,8 +42,8 @@
  self.repo = thgrepo.repository(ui, path=self.root)   except (error.RepoError):   qtlib.ErrorMsgBox(_('Error'), - _('Could not find or initialize the repository' - ' from folder<p>%s</p>' % cwd)) + _('Could not find or initialize the repository ' + 'from folder<p>%s</p>' % cwd))   return ('', '')   try:   fname = util.canonpath(self.root, cwd, pats[0])
 
646
647
648
649
 
650
651
652
 
646
647
648
 
649
650
651
652
@@ -646,7 +646,7 @@
  if self.bundle:   self.clearBundle()   self.showMessage(_('Repository stripped, incoming preview ' - ' cleared')) + 'cleared'))   elif self.revset:   self.revset = []   self.filterbar.revsetle.setText('')
 
311
312
313
314
 
315
316
 
317
318
319
 
311
312
313
 
314
315
 
316
317
318
319
@@ -311,9 +311,9 @@
  s = QSettings()   s.setValue('resolve/geom', self.saveGeometry())   if len(self.utree.model()): - main = _('Quit without finishing resolve?') + main = _('Exit without finishing resolve?')   text = _('Unresolved conflicts remain. Are you sure?') - labels = ((QMessageBox.Yes, _('&Quit')), + labels = ((QMessageBox.Yes, _('E&xit')),   (QMessageBox.No, _('Cancel')))   if not qtlib.QuestionMsgBox(_('Confirm Exit'), main, text,   labels=labels, parent=self):
 
32
33
34
35
36
 
 
37
38
39
 
32
33
34
 
 
35
36
37
38
39
@@ -32,8 +32,8 @@
  ('grep(regex)',   _('Like "keyword(string)" but accepts a regex.')),   ('outgoing([path])', - _('Changesets not found in the specified destination repository,' - ' or the default push location.')), + _('Changesets not found in the specified destination repository, ' + 'or the default push location.')),   ('bookmark([name])',   _('The named bookmark or all bookmarks.')),   ('tag([name])',
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
 
 
 
 
 
 
276
277
278
279
280
281
 
 
 
 
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
 
 
 
302
303
304
305
 
 
306
307
308
 
 
309
310
311
 
 
312
313
314
 
 
315
316
317
318
319
320
321
322
 
 
 
 
 
 
 
323
324
325
326
327
328
329
330
 
 
 
 
331
332
333
334
335
 
 
 
336
337
338
339
 
 
 
340
341
342
343
 
 
 
344
345
346
347
 
 
 
348
349
350
351
352
353
354
 
 
 
 
 
 
355
356
357
358
359
 
 
 
360
361
362
363
364
 
 
 
365
366
367
368
369
370
371
372
373
374
 
 
 
375
376
377
 
 
378
379
380
 
 
381
382
383
384
 
 
 
385
386
387
388
 
 
 
389
390
391
392
393
 
 
 
 
394
395
396
397
398
399
 
400
401
402
 
 
403
404
405
 
 
406
407
408
409
410
411
412
 
 
413
414
415
416
 
 
417
418
419
 
 
420
421
422
423
424
425
426
427
428
429
430
431
432
 
 
 
 
 
 
 
433
434
435
436
437
438
439
 
 
 
 
 
 
440
441
442
443
444
445
446
447
 
 
448
449
450
 
 
451
452
453
454
455
456
457
458
459
460
 
 
461
462
463
464
465
466
467
 
 
468
469
470
471
472
473
474
 
 
 
 
 
 
475
476
477
478
479
 
 
480
481
482
 
 
483
484
485
486
487
488
489
 
 
490
491
492
493
494
495
496
497
498
499
 
 
 
 
500
501
502
 
 
503
504
505
506
507
508
509
510
511
 
 
512
513
514
 
 
515
516
517
 
 
518
519
520
 
 
521
522
523
 
 
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
 
 
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
 
 
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
 
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
 
921
922
923
924
925
926
927
928
 
 
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
 
 
 
 
 
 
270
271
272
273
274
275
276
277
 
 
 
 
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
 
 
 
299
300
301
302
303
 
 
304
305
306
 
 
307
308
309
 
 
310
311
312
 
 
313
314
315
 
 
 
 
 
 
 
316
317
318
319
320
321
322
323
324
325
326
 
 
 
 
327
328
329
330
331
332
 
 
 
333
334
335
336
 
 
 
337
338
339
340
 
 
 
341
342
343
344
 
 
 
345
346
347
348
 
 
 
 
 
 
349
350
351
352
353
354
355
356
 
 
 
357
358
359
360
361
 
 
 
362
363
364
365
366
367
368
369
370
371
 
 
 
372
373
374
375
 
 
376
377
378
 
 
379
380
381
 
 
 
382
383
384
385
 
 
 
386
387
388
389
 
 
 
 
390
391
392
393
394
395
396
397
398
 
399
400
 
 
401
402
403
 
 
404
405
406
407
408
409
410
 
 
411
412
413
414
 
 
415
416
417
 
 
418
419
420
421
422
423
424
425
 
 
 
 
 
 
 
426
427
428
429
430
431
432
433
 
 
 
 
 
 
434
435
436
437
438
439
440
441
442
443
444
445
 
 
446
447
448
 
 
449
450
451
452
453
454
455
456
457
458
 
 
459
460
461
462
463
464
465
 
 
466
467
468
 
 
 
 
 
 
469
470
471
472
473
474
475
476
477
 
 
478
479
480
 
 
481
482
483
484
485
486
487
 
 
488
489
490
491
492
493
494
495
 
 
 
 
496
497
498
499
500
 
 
501
502
503
504
505
506
507
508
509
 
 
510
511
512
 
 
513
514
515
 
 
516
517
518
 
 
519
520
521
 
 
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
 
 
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
 
 
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
 
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
 
920
921
922
923
924
925
926
 
 
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
 # settings.py - Configuration dialog for TortoiseHg and Mercurial  #  # Copyright 2010 Steve Borho <steve@borho.org>  #  # This software may be used and distributed according to the terms of the  # GNU General Public License version 2, incorporated herein by reference.    import os    from mercurial import ui, util, error    from tortoisehg.util import hglib, settings, paths, wconfig, i18n  from tortoisehg.hgqt.i18n import _  from tortoisehg.hgqt import qtlib, qscilib, thgrepo    from PyQt4.QtCore import *  from PyQt4.QtGui import *    # Technical Debt  # stacked widget or pages need to be scrollable  # we need a consistent icon set  # connect to thgrepo.configChanged signal and refresh    _unspecstr = _('<unspecified>')  ENTRY_WIDTH = 300    class SettingsCombo(QComboBox):   def __init__(self, parent=None, **opts):   QComboBox.__init__(self, parent, toolTip=opts['tooltip'])   self.opts = opts   self.setEditable(opts.get('canedit', False))   self.setValidator(opts.get('validator', None))   self.defaults = opts.get('defaults', [])   if self.defaults and self.isEditable():   self.setCompleter(QCompleter(self.defaults, self))   self.curvalue = None   self.loaded = False   if 'nohist' in opts:   self.previous = []   else:   settings = opts['settings']   slist = settings.value('settings/'+opts['cpath']).toStringList()   self.previous = [s for s in slist if s]   self.setFixedWidth(ENTRY_WIDTH)     def resetList(self):   self.clear()   ucur = hglib.tounicode(self.curvalue)   if self.opts.get('defer') and not self.loaded:   if self.curvalue == None: # unspecified   self.addItem(_unspecstr)   else:   self.addItem(ucur or '...')   return   self.addItem(_unspecstr)   curindex = None   for s in self.defaults:   if ucur == s:   curindex = self.count()   self.addItem(s)   if self.defaults and self.previous:   self.insertSeparator(len(self.defaults)+1)   for m in self.previous:   if ucur == m and not curindex:   curindex = self.count()   self.addItem(m)   if curindex is not None:   self.setCurrentIndex(curindex)   elif self.curvalue is None:   self.setCurrentIndex(0)   elif self.curvalue:   self.addItem(ucur)   self.setCurrentIndex(self.count()-1)   else: # empty string   self.setEditText(ucur)     def showPopup(self):   if self.opts.get('defer') and not self.loaded:   self.defaults = self.opts['defer']()   self.loaded = True   self.resetList()   QComboBox.showPopup(self)     ## common APIs for all edit widgets     def setValue(self, curvalue):   self.curvalue = curvalue   self.resetList()     def value(self):   utext = self.currentText()   if utext == _unspecstr:   return None   if 'nohist' in self.opts or utext in self.defaults + self.previous or not utext:   return hglib.fromunicode(utext)   self.previous.insert(0, utext)   self.previous = self.previous[:10]   settings = QSettings()   settings.setValue('settings/'+self.opts['cpath'], self.previous)   return hglib.fromunicode(utext)     def isDirty(self):   return self.value() != self.curvalue      class PasswordEntry(QLineEdit):   def __init__(self, parent=None, **opts):   QLineEdit.__init__(self, parent, toolTip=opts['tooltip'])   self.opts = opts   self.curvalue = None   self.setEchoMode(QLineEdit.Password)   self.setFixedWidth(ENTRY_WIDTH)     ## common APIs for all edit widgets     def setValue(self, curvalue):   self.curvalue = curvalue   if curvalue:   self.setText(hglib.tounicode(curvalue))   else:   self.setText('')     def value(self):   utext = self.text()   return utext and hglib.fromunicode(utext) or None     def isDirty(self):   return self.value() != self.curvalue    class FontEntry(QPushButton):   def __init__(self, parent=None, **opts):   QPushButton.__init__(self, parent, toolTip=opts['tooltip'])   self.opts = opts   self.curvalue = None   self.clicked.connect(self.on_clicked)   cpath = self.opts['cpath']   assert cpath.startswith('tortoisehg.')   self.fname = cpath[11:]   self.setFixedWidth(ENTRY_WIDTH)     def on_clicked(self, checked):   def newFont(font):   self.setText(font.toString())   thgf.setFont(font)   thgf = qtlib.getfont(self.fname)   origfont = self.currentFont() or thgf.font()   dlg = QFontDialog(self)   dlg.currentFontChanged.connect(newFont)   font, isok = dlg.getFont(origfont, self)   self.setText(font.toString())   thgf.setFont(font)     def currentFont(self):   """currently selected QFont if specified"""   if not self.value():   return None     f = QFont()   f.fromString(self.value())   return f     ## common APIs for all edit widgets     def setValue(self, curvalue):   self.curvalue = curvalue   if curvalue:   self.setText(hglib.tounicode(curvalue))   else:   self.setText(_unspecstr)     def value(self):   utext = self.text()   if utext == _unspecstr:   return None   else:   return hglib.fromunicode(utext)     def isDirty(self):   return self.value() != self.curvalue    class SettingsCheckBox(QCheckBox):   def __init__(self, parent=None, **opts):   QCheckBox.__init__(self, parent, toolTip=opts['tooltip'])   self.opts = opts   self.curvalue = None   self.setText(opts['label'])   self.valfunc = self.opts['valfunc']   self.toggled.connect(self.valfunc)     def setValue(self, curvalue):   if self.curvalue == None:   self.curvalue = curvalue   self.setChecked(curvalue)     def value(self):   return self.isChecked()     def isDirty(self):   return self.value() != self.curvalue      def genEditCombo(opts, defaults=[]):   opts['canedit'] = True   opts['defaults'] = defaults   return SettingsCombo(**opts)    def genIntEditCombo(opts):   'EditCombo, only allows integer values'   opts['canedit'] = True   opts['validator'] = QIntValidator()   return SettingsCombo(**opts)    def genPasswordEntry(opts):   'Generate a password entry box'   return PasswordEntry(**opts)    def genDefaultCombo(opts, defaults=[]):   'user must select from a list'   opts['defaults'] = defaults   opts['nohist'] = True   return SettingsCombo(**opts)    def genBoolCombo(opts):   'true, false, unspecified'   opts['defaults'] = ['True', 'False']   opts['nohist'] = True   return SettingsCombo(**opts)    def genDeferredCombo(opts, func):   'Values retrieved from a function at popup time'   opts['defer'] = func   opts['nohist'] = True   return SettingsCombo(**opts)    def genFontEdit(opts):   return FontEntry(**opts)    def findDiffTools():   return hglib.difftools(ui.ui())    def findMergeTools():   return hglib.mergetools(ui.ui())    def genCheckBox(opts):   opts['nohist'] = True   return SettingsCheckBox(**opts)    class _fi(object):   """Information of each field"""   __slots__ = ('label', 'cpath', 'values', 'tooltip',   'restartneeded', 'globalonly')     def __init__(self, label, cpath, values, tooltip,   restartneeded=False, globalonly=False):   self.label = label   self.cpath = cpath   self.values = values   self.tooltip = tooltip   self.restartneeded = restartneeded   self.globalonly = globalonly    INFO = (  ({'name': 'general', 'label': 'TortoiseHg', 'icon': 'thg_logo'}, (   _fi(_('UI Language'), 'tortoisehg.ui.language',   (genDeferredCombo, i18n.availablelanguages),   _('Specify your preferred user interface language (restart needed)'),   restartneeded=True, globalonly=True),   _fi(_('Three-way Merge Tool'), 'ui.merge',   (genDeferredCombo, findMergeTools), - _('Graphical merge program for resolving merge conflicts. If left' - ' unspecified, Mercurial will use the first applicable tool it finds' - ' on your system or use its internal merge tool that leaves conflict' - ' markers in place. Chose internal:merge to force conflict markers,' - ' internal:prompt to always select local or other, or internal:dump' - ' to leave files in the working directory for manual merging')), + _('Graphical merge program for resolving merge conflicts. If left ' + 'unspecified, Mercurial will use the first applicable tool it finds ' + 'on your system or use its internal merge tool that leaves conflict ' + 'markers in place. Chose internal:merge to force conflict markers ,' + 'internal:prompt to always select local or other, or internal:dump ' + 'to leave files in the working directory for manual merging')),   _fi(_('Visual Diff Tool'), 'tortoisehg.vdiff',   (genDeferredCombo, findDiffTools), - _('Specify visual diff tool, as described in the [merge-tools]' - ' section of your Mercurial configuration files. If left' - ' unspecified, TortoiseHg will use the selected merge tool.' - ' Failing that it uses the first applicable tool it finds.')), + _('Specify visual diff tool, as described in the [merge-tools] ' + 'section of your Mercurial configuration files. If left ' + 'unspecified, TortoiseHg will use the selected merge tool. ' + 'Failing that it uses the first applicable tool it finds.')),   _fi(_('Visual Editor'), 'tortoisehg.editor', genEditCombo,   _('Specify the visual editor used to view files. Format:<br>'   'myeditor -flags [$FILE --num=$LINENUM][--search $SEARCH]<br><br>'   'See <a href="%s">OpenAtLine</a>'   % 'http://bitbucket.org/tortoisehg/thg/wiki/OpenAtLine')),   _fi(_('Shell'), 'tortoisehg.shell', genEditCombo,   _('Specify your preferred terminal shell application')),   _fi(_('Immediate Operations'), 'tortoisehg.immediate', genEditCombo,   _('Space separated list of shell operations you would like '   'to be performed immediately, without user interaction. '   'Commands are "add remove revert forget". '   'Default: None (leave blank)')),   _fi(_('Poll Frequency'), 'tortoisehg.pollfreq', genIntEditCombo,   _('The period (in milliseconds) between modification time polling of '   'key repository files, looking for changes. Values under '   '100ms are ignored. Default: 500')),   _fi(_('Tab Width'), 'tortoisehg.tabwidth', genIntEditCombo, - _('Specify the number of spaces that tabs expand to in various' - ' TortoiseHg windows.' - ' Default: 0, Not expanded')), + _('Specify the number of spaces that tabs expand to in various ' + 'TortoiseHg windows. ' + 'Default: 0, Not expanded')),   _fi(_('Max Diff Size'), 'tortoisehg.maxdiff', genIntEditCombo,   _('The maximum size file (in KB) that TortoiseHg will ' - 'show changes for in the changelog, status, and commit windows.' - ' A value of zero implies no limit. Default: 1024 (1MB)')), + 'show changes for in the changelog, status, and commit windows. ' + 'A value of zero implies no limit. Default: 1024 (1MB)')),   _fi(_('Capture stderr'), 'tortoisehg.stderrcapt', genBoolCombo, - _('Redirect stderr to a buffer which is parsed at the end of' - ' the process for runtime errors. Default: True')), + _('Redirect stderr to a buffer which is parsed at the end of ' + 'the process for runtime errors. Default: True')),   _fi(_('Fork GUI'), 'tortoisehg.guifork', genBoolCombo, - _('When running from the command line, fork a background' - ' process to run graphical dialogs. Default: True')), + _('When running from the command line, fork a background ' + 'process to run graphical dialogs. Default: True')),   _fi(_('Full Path Title'), 'tortoisehg.fullpath', genBoolCombo, - _('Show a full directory path of the repository in the dialog title' - ' instead of just the root directory name. Default: False')), + _('Show a full directory path of the repository in the dialog title ' + 'instead of just the root directory name. Default: False')),   _fi(_('Auto-resolve merges'), 'tortoisehg.autoresolve', genBoolCombo, - _('Indicates whether TortoiseHg should attempt to automatically resolve' - ' changes from both sides to the same file, and only report merge' - ' conflicts when this is not possible. When False, all files with' - ' changes on both sides of the merge will report as conflicting, even' - ' if the edits are to different parts of the file. In either case,' - ' when conflicts occur, the user will be invited to review and' - ' resolve changes manually. Default: False.')), + _('Indicates whether TortoiseHg should attempt to automatically ' + 'resolve changes from both sides to the same file, and only report ' + 'merge conflicts when this is not possible. When False, all files ' + 'with changes on both sides of the merge will report as conflicting, ' + 'even if the edits are to different parts of the file. In either ' + 'case, when conflicts occur, the user will be invited to review and ' + 'resolve changes manually. Default: False.')),   )),    ({'name': 'log', 'label': _('Workbench'), 'icon': 'menulog'}, (   _fi(_('Author Coloring'), 'tortoisehg.authorcolor', genBoolCombo, - _('Color changesets by author name. If not enabled,' - ' the changes are colored green for merge, red for' - ' non-trivial parents, black for normal.' - ' Default: False')), + _('Color changesets by author name. If not enabled, ' + 'the changes are colored green for merge, red for ' + 'non-trivial parents, black for normal. ' + 'Default: False')),   _fi(_('Task Tabs'), 'tortoisehg.tasktabs', (genDefaultCombo,   ['east', 'west', 'off']), - _('Show tabs along the side of the bottom half of each repo' - ' widget allowing one to switch task tabs without using the toolbar.' - ' Default: off')), + _('Show tabs along the side of the bottom half of each repo ' + 'widget allowing one to switch task tabs without using the toolbar. ' + 'Default: off')),   _fi(_('Long Summary'), 'tortoisehg.longsummary', genBoolCombo, - _('If true, concatenate multiple lines of changeset summary' - ' until they reach 80 characters.' - ' Default: False')), + _('If true, concatenate multiple lines of changeset summary ' + 'until they reach 80 characters. ' + 'Default: False')),   _fi(_('Log Batch Size'), 'tortoisehg.graphlimit', genIntEditCombo, - _('The number of revisions to read and display in the' - ' changelog viewer in a single batch.' - ' Default: 500')), + _('The number of revisions to read and display in the ' + 'changelog viewer in a single batch. ' + 'Default: 500')),   _fi(_('Dead Branches'), 'tortoisehg.deadbranch', genEditCombo, - _('Comma separated list of branch names that should be ignored' - ' when building a list of branch names for a repository.' - ' Default: None (leave blank)')), + _('Comma separated list of branch names that should be ignored ' + 'when building a list of branch names for a repository. ' + 'Default: None (leave blank)')),   _fi(_('Branch Colors'), 'tortoisehg.branchcolors', genEditCombo, - _('Space separated list of branch names and colors of the form' - ' branch:#XXXXXX. Spaces and colons in the branch name must be' - ' escaped using a backslash (\\). Likewise some other characters' - ' can be escaped in this way, e.g. \\u0040 will be decoded to the' - ' @ character, and \\n to a linefeed.' - ' Default: None (leave blank)')), + _('Space separated list of branch names and colors of the form ' + 'branch:#XXXXXX. Spaces and colons in the branch name must be ' + 'escaped using a backslash (\\). Likewise some other characters ' + 'can be escaped in this way, e.g. \\u0040 will be decoded to the ' + '@ character, and \\n to a linefeed. ' + 'Default: None (leave blank)')),   _fi(_('Hide Tags'), 'tortoisehg.hidetags', genEditCombo,   _('Space separated list of tags that will not be shown.' - ' Useful example: Specify "qbase qparent qtip" to hide the' - ' standard tags inserted by the Mercurial Queues Extension.' - ' Default: None (leave blank)')), + 'Useful example: Specify "qbase qparent qtip" to hide the ' + 'standard tags inserted by the Mercurial Queues Extension. ' + 'Default: None (leave blank)')),   _fi(_('After Pull Operation'), 'tortoisehg.postpull', (genDefaultCombo,   ['none', 'update', 'fetch', 'rebase']), - _('Operation which is performed directly after a successful pull.' - ' update equates to pull --update, fetch equates to the fetch' - ' extension, rebase equates to pull --rebase. Default: none')), + _('Operation which is performed directly after a successful pull. ' + 'update equates to pull --update, fetch equates to the fetch ' + 'extension, rebase equates to pull --rebase. Default: none')),   )),    ({'name': 'commit', 'label': _('Commit'), 'icon': 'menucommit'}, (   _fi(_('Username'), 'ui.username', genEditCombo,   _('Name associated with commits. The common format is<br>'   '"Full Name &lt;email@example.com&gt;"')),   _fi(_('Summary Line Length'), 'tortoisehg.summarylen', genIntEditCombo, - _('Suggested length of commit message lines. A red vertical' - ' line will mark this length. CTRL-E will reflow the current' - ' paragraph to the specified line length. Default: 80')), + _('Suggested length of commit message lines. A red vertical ' + 'line will mark this length. CTRL-E will reflow the current ' + 'paragraph to the specified line length. Default: 80')),   _fi(_('Close After Commit'), 'tortoisehg.closeci', genBoolCombo, - _('Close the commit tool after every successful' - ' commit. Default: False')), + _('Close the commit tool after every successful ' + 'commit. Default: False')),   _fi(_('Push After Commit'), 'tortoisehg.cipushafter', genEditCombo, - _('Attempt to push to specified URL or alias after each successful' - ' commit. Default: No push')), + _('Attempt to push to specified URL or alias after each successful ' + 'commit. Default: No push')),   _fi(_('Auto Commit List'), 'tortoisehg.autoinc', genEditCombo, - _('Comma separated list of files that are automatically included' - ' in every commit. Intended for use only as a repository setting.' - ' Default: None (leave blank)')), + _('Comma separated list of files that are automatically included ' + 'in every commit. Intended for use only as a repository setting. ' + 'Default: None (leave blank)')),   _fi(_('Auto Exclude List'), 'tortoisehg.ciexclude', genEditCombo, - _('Comma separated list of files that are automatically unchecked' - ' when the status, and commit dialogs are opened.' - ' Default: None (leave blank)')), + _('Comma separated list of files that are automatically unchecked ' + 'when the status, and commit dialogs are opened. ' + 'Default: None (leave blank)')),   _fi(_('English Messages'), 'tortoisehg.engmsg', genBoolCombo, - _('Generate English commit messages even if LANGUAGE or LANG' - ' environment variables are set to a non-English language.' - ' This setting is used by the Merge, Tag and Backout dialogs.' - ' Default: False')), + _('Generate English commit messages even if LANGUAGE or LANG ' + 'environment variables are set to a non-English language. ' + 'This setting is used by the Merge, Tag and Backout dialogs. ' + 'Default: False')),   )),    ({'name': 'web', 'label': _('Web Server'), 'icon': 'proxy'}, (   _fi(_('Name'), 'web.name', genEditCombo,   _('Repository name to use in the web interface, and by TortoiseHg ' - ' as a shorthand name. Default is the working directory.')), + 'as a shorthand name. Default is the working directory.')),   _fi(_('Description'), 'web.description', genEditCombo, - _("Textual description of the repository's purpose or" - ' contents.')), + _("Textual description of the repository's purpose or " + 'contents.')),   _fi(_('Contact'), 'web.contact', genEditCombo, - _('Name or email address of the person in charge of the' - ' repository.')), + _('Name or email address of the person in charge of the ' + 'repository.')),   _fi(_('Style'), 'web.style', (genDefaultCombo,   ['paper', 'monoblue', 'coal', 'spartan', 'gitweb', 'old']),   _('Which template map style to use')),   _fi(_('Archive Formats'), 'web.allow_archive',   (genEditCombo, ['bz2', 'gz', 'zip']), - _('Comma separated list of archive formats allowed for' - ' downloading')), + _('Comma separated list of archive formats allowed for ' + 'downloading')),   _fi(_('Port'), 'web.port', genIntEditCombo, _('Port to listen on')),   _fi(_('Push Requires SSL'), 'web.push_ssl', genBoolCombo, - _('Whether to require that inbound pushes be transported' - ' over SSL to prevent password sniffing.')), + _('Whether to require that inbound pushes be transported ' + 'over SSL to prevent password sniffing.')),   _fi(_('Stripes'), 'web.stripes', genIntEditCombo, - _('How many lines a "zebra stripe" should span in multiline output.' - ' Default is 1; set to 0 to disable.')), + _('How many lines a "zebra stripe" should span in multiline output. ' + 'Default is 1; set to 0 to disable.')),   _fi(_('Max Files'), 'web.maxfiles', genIntEditCombo,   _('Maximum number of files to list per changeset. Default: 10')),   _fi(_('Max Changes'), 'web.maxchanges', genIntEditCombo,   _('Maximum number of changes to list on the changelog. '   'Default: 10')),   _fi(_('Allow Push'), 'web.allow_push', (genEditCombo, ['*']), - _('Whether to allow pushing to the repository. If empty or not' - ' set, push is not allowed. If the special value "*", any remote' - ' user can push, including unauthenticated users. Otherwise, the' - ' remote user must have been authenticated, and the authenticated' - ' user name must be present in this list (separated by whitespace' - ' or ","). The contents of the allow_push list are examined after' - ' the deny_push list.')), + _('Whether to allow pushing to the repository. If empty or not ' + 'set, push is not allowed. If the special value "*", any remote ' + 'user can push, including unauthenticated users. Otherwise, the ' + 'remote user must have been authenticated, and the authenticated ' + 'user name must be present in this list (separated by whitespace ' + 'or ","). The contents of the allow_push list are examined after ' + 'the deny_push list.')),   _fi(_('Deny Push'), 'web.deny_push', (genEditCombo, ['*']), - _('Whether to deny pushing to the repository. If empty or not set,' - ' push is not denied. If the special value "*", all remote users' - ' are denied push. Otherwise, unauthenticated users are all' - ' denied, and any authenticated user name present in this list' - ' (separated by whitespace or ",") is also denied. The contents' - ' of the deny_push list are examined before the allow_push list.')), + _('Whether to deny pushing to the repository. If empty or not set, ' + 'push is not denied. If the special value "*", all remote users ' + 'are denied push. Otherwise, unauthenticated users are all ' + 'denied, and any authenticated user name present in this list ' + '(separated by whitespace or ",") is also denied. The contents ' + 'of the deny_push list are examined before the allow_push list.')),   _fi(_('Encoding'), 'web.encoding', (genEditCombo, ['UTF-8']),   _('Character encoding name')),   )),    ({'name': 'proxy', 'label': _('Proxy'), 'icon': QStyle.SP_DriveNetIcon}, (   _fi(_('Host'), 'http_proxy.host', genEditCombo, - _('Host name and (optional) port of proxy server, for' - ' example "myproxy:8000"')), + _('Host name and (optional) port of proxy server, for ' + 'example "myproxy:8000"')),   _fi(_('Bypass List'), 'http_proxy.no', genEditCombo, - _('Optional. Comma-separated list of host names that' - ' should bypass the proxy')), + _('Optional. Comma-separated list of host names that ' + 'should bypass the proxy')),   _fi(_('User'), 'http_proxy.user', genEditCombo,   _('Optional. User name to authenticate with at the proxy server')),   _fi(_('Password'), 'http_proxy.passwd', genPasswordEntry,   _('Optional. Password to authenticate with at the proxy server')),   )),    ({'name': 'email', 'label': _('Email'), 'icon': 'mail-forward'}, (   _fi(_('From'), 'email.from', genEditCombo, - _('Email address to use in the "From" header and for' - ' the SMTP envelope')), + _('Email address to use in the "From" header and for ' + 'the SMTP envelope')),   _fi(_('To'), 'email.to', genEditCombo,   _('Comma-separated list of recipient email addresses')),   _fi(_('Cc'), 'email.cc', genEditCombo,   _('Comma-separated list of carbon copy recipient email addresses')),   _fi(_('Bcc'), 'email.bcc', genEditCombo, - _('Comma-separated list of blind carbon copy recipient' - ' email addresses')), + _('Comma-separated list of blind carbon copy recipient ' + 'email addresses')),   _fi(_('method'), 'email.method', (genEditCombo, ['smtp']), - _('Optional. Method to use to send email messages. If value is' - ' "smtp" (default), use SMTP (configured below). Otherwise, use as' - ' name of program to run that acts like sendmail (takes "-f" option' - ' for sender, list of recipients on command line, message on stdin).' - ' Normally, setting this to "sendmail" or "/usr/sbin/sendmail"' - ' is enough to use sendmail to send messages.')), + _('Optional. Method to use to send email messages. If value is ' + '"smtp" (default), use SMTP (configured below). Otherwise, use as ' + 'name of program to run that acts like sendmail (takes "-f" option ' + 'for sender, list of recipients on command line, message on stdin). ' + 'Normally, setting this to "sendmail" or "/usr/sbin/sendmail" ' + 'is enough to use sendmail to send messages.')),   _fi(_('SMTP Host'), 'smtp.host', genEditCombo,   _('Host name of mail server')),   _fi(_('SMTP Port'), 'smtp.port', genIntEditCombo, - _('Port to connect to on mail server.' - ' Default: 25')), + _('Port to connect to on mail server. ' + 'Default: 25')),   _fi(_('SMTP TLS'), 'smtp.tls', genBoolCombo, - _('Connect to mail server using TLS.' - ' Default: False')), + _('Connect to mail server using TLS. ' + 'Default: False')),   _fi(_('SMTP Username'), 'smtp.username', genEditCombo,   _('Username to authenticate to mail server with')),   _fi(_('SMTP Password'), 'smtp.password', genPasswordEntry,   _('Password to authenticate to mail server with')),   _fi(_('Local Hostname'), 'smtp.local_hostname', genEditCombo, - _('Hostname the sender can use to identify itself to the' - ' mail server.')), + _('Hostname the sender can use to identify itself to the ' + 'mail server.')),   )),    ({'name': 'diff', 'label': _('Diff'),   'icon': QStyle.SP_FileDialogContentsView}, (   _fi(_('Patch EOL'), 'patch.eol', (genDefaultCombo,   ['auto', 'strict', 'crlf', 'lf']), - _('Normalize file line endings during and after patch to lf or' - ' crlf. Strict does no normalization. Auto does per-file' - ' detection, and is the recommended setting.' - ' Default: strict')), + _('Normalize file line endings during and after patch to lf or ' + 'crlf. Strict does no normalization. Auto does per-file ' + 'detection, and is the recommended setting. ' + 'Default: strict')),   _fi(_('Git Format'), 'diff.git', genBoolCombo, - _('Use git extended diff header format.' - ' Default: False')), + _('Use git extended diff header format. ' + 'Default: False')),   _fi(_('MQ Git Format'), 'mq.git', (genDefaultCombo,   ['auto', 'keep', 'yes', 'no']),   _("If set to 'keep', mq will obey the [diff] section configuration while"   " preserving existing git patches upon qrefresh. If set to 'yes' or"   " 'no', mq will override the [diff] section and always generate git or"   " regular patches, possibly losing data in the second case.")),   _fi(_('No Dates'), 'diff.nodates', genBoolCombo, - _('Do not include modification dates in diff headers.' - ' Default: False')), + _('Do not include modification dates in diff headers. ' + 'Default: False')),   _fi(_('Show Function'), 'diff.showfunc', genBoolCombo, - _('Show which function each change is in.' - ' Default: False')), + _('Show which function each change is in. ' + 'Default: False')),   _fi(_('Ignore White Space'), 'diff.ignorews', genBoolCombo, - _('Ignore white space when comparing lines.' - ' Default: False')), + _('Ignore white space when comparing lines. ' + 'Default: False')),   _fi(_('Ignore WS Amount'), 'diff.ignorewsamount', genBoolCombo, - _('Ignore changes in the amount of white space.' - ' Default: False')), + _('Ignore changes in the amount of white space. ' + 'Default: False')),   _fi(_('Ignore Blank Lines'), 'diff.ignoreblanklines', genBoolCombo, - _('Ignore changes whose lines are all blank.' - ' Default: False')), + _('Ignore changes whose lines are all blank. ' + 'Default: False')),   )),    ({'name': 'fonts', 'label': _('Fonts'), 'icon': 'preferences-desktop-font'}, (   _fi(_('Message Font'), 'tortoisehg.fontcomment', genFontEdit,   _('Font used to display commit messages. Default: monospace 10'),   globalonly=True),   _fi(_('Diff Font'), 'tortoisehg.fontdiff', genFontEdit,   _('Font used to display text differences. Default: monospace 10'),   globalonly=True),   _fi(_('List Font'), 'tortoisehg.fontlist', genFontEdit,   _('Font used to display file lists. Default: sans 9'),   globalonly=True),   _fi(_('ChangeLog Font'), 'tortoisehg.fontlog', genFontEdit,   _('Font used to display changelog data. Default: monospace 10'),   globalonly=True),   _fi(_('Output Font'), 'tortoisehg.fontoutputlog', genFontEdit,   _('Font used to display output messages. Default: sans 8'),   globalonly=True),   )),    ({'name': 'extensions', 'label': _('Extensions'), 'icon': 'hg-extensions'}, (   )),    ({'name': 'issue', 'label': _('Issue Tracking'), 'icon': 'edit-file'}, (   _fi(_('Issue Regex'), 'tortoisehg.issue.regex', genEditCombo,   _('Defines the regex to match when picking up issue numbers.')),   _fi(_('Issue Link'), 'tortoisehg.issue.link', genEditCombo,   _('Defines the command to run when an issue number is recognized. '   'You may include groups in issue.regex, and corresponding {n} '   'tokens in issue.link (where n is a non-negative integer). '   '{0} refers to the entire string matched by issue.regex, '   'while {1} refers to the first group and so on. If no {n} tokens'   'are found in issue.link, the entire matched string is appended '   'instead.')),   )),    ({'name': 'reviewboard', 'label': _('Review Board'), 'icon': 'reviewboard'}, (   _fi(_('Server'), 'reviewboard.server', genEditCombo, - _('Path to review board' - ' example "http://demo.reviewboard.org"')), + _('Path to review board ' + 'example "http://demo.reviewboard.org"')),   _fi(_('User'), 'reviewboard.user', genEditCombo,   _('User name to authenticate with review board')),   _fi(_('Password'), 'reviewboard.password', genPasswordEntry,   _('Password to authenticate with review board')),   _fi(_('Server Repository ID'), 'reviewboard.repoid', genEditCombo,   _('The default repository id for this repo on the review board server')),   _fi(_('Target Groups'), 'reviewboard.target_groups', genEditCombo,   _('A comma separated list of target groups')),   _fi(_('Target People'), 'reviewboard.target_people', genEditCombo,   _('A comma separated list of target people')),   )),    )    CONF_GLOBAL = 0  CONF_REPO = 1    class SettingsDialog(QDialog):   'Dialog for editing Mercurial.ini or hgrc'   def __init__(self, configrepo=False, focus=None, parent=None, root=None):   QDialog.__init__(self, parent)   self.setWindowTitle(_('TortoiseHg Settings'))   self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)   self.setWindowIcon(qtlib.geticon('settings_repo'))     if not hasattr(wconfig.config(), 'write'):   qtlib.ErrorMsgBox(_('Iniparse package not found'),   _("Can't change settings without iniparse package - "   'view is readonly.'), parent=self)   print 'Please install http://code.google.com/p/iniparse/'     layout = QVBoxLayout()   self.setLayout(layout)     s = QSettings()   self.settings = s   self.restoreGeometry(s.value('settings/geom').toByteArray())     def username():   name = util.username()   if name:   return hglib.tounicode(name)   name = os.environ.get('USERNAME')   if name:   return hglib.tounicode(name)   return _('User')     self.conftabs = QTabWidget()   layout.addWidget(self.conftabs)   utab = SettingsForm(rcpath=util.user_rcpath(), focus=focus)   self.conftabs.addTab(utab, qtlib.geticon('settings_user'),   _("%s's global settings") % username())   utab.restartRequested.connect(self._pushRestartRequest)     try:   if root is None:   root = paths.find_root()   if root:   repo = thgrepo.repository(ui.ui(), root)   else:   repo = None   except error.RepoError:   repo = None   if configrepo:   qtlib.ErrorMsgBox(_('No repository found'),   _('no repo at ') + root, parent=self)     if repo:   reporcpath = os.sep.join([repo.root, '.hg', 'hgrc'])   rtab = SettingsForm(rcpath=reporcpath, focus=focus)   self.conftabs.addTab(rtab, qtlib.geticon('settings_repo'),   _('%s repository settings') % repo.displayname)   rtab.restartRequested.connect(self._pushRestartRequest)     BB = QDialogButtonBox   bb = QDialogButtonBox(BB.Ok|BB.Cancel)   bb.accepted.connect(self.accept)   bb.rejected.connect(self.reject)   layout.addWidget(bb)   self.bb = bb     self._restartreqs = set()     self.conftabs.setCurrentIndex(configrepo and CONF_REPO or CONF_GLOBAL)     def isDirty(self):   return util.any(self.conftabs.widget(i).isDirty()   for i in xrange(self.conftabs.count()))     @pyqtSlot(unicode)   def _pushRestartRequest(self, key):   self._restartreqs.add(unicode(key))     def applyChanges(self):   for i in xrange(self.conftabs.count()):   self.conftabs.widget(i).applyChanges()   if self._restartreqs:   qtlib.InfoMsgBox(_('Settings'), - _('Restart all TortoiseHg applications' - ' for the following changes to take effect:'), + _('Restart all TortoiseHg applications ' + 'for the following changes to take effect:'),   ', '.join(sorted(self._restartreqs)))   self._restartreqs.clear()     def canExit(self):   if self.isDirty():   ret = qtlib.CustomPrompt(_('Confirm Exit'),   _('Apply changes before exit?'), self,   (_('&Yes'), _('&No (discard changes)'),   _ ('Cancel')), default=2, esc=2).run()   if ret == 2:   return False   elif ret == 0:   self.applyChanges()   return True   return True     def accept(self):   self.applyChanges()   s = self.settings   s.setValue('settings/geom', self.saveGeometry())   s.sync()   QDialog.accept(self)     def reject(self):   if not self.canExit():   return   s = self.settings   s.setValue('settings/geom', self.saveGeometry())   s.sync()   QDialog.reject(self)    class SettingsForm(QWidget):   """Widget for each settings file"""     restartRequested = pyqtSignal(unicode)     def __init__(self, rcpath, focus=None, parent=None):   super(SettingsForm, self).__init__(parent)     if isinstance(rcpath, (list, tuple)):   self.rcpath = rcpath   else:   self.rcpath = [rcpath]     layout = QVBoxLayout()   self.setLayout(layout)     tophbox = QHBoxLayout()   layout.addLayout(tophbox)     self.fnedit = QLineEdit()   self.fnedit.setReadOnly(True)   self.fnedit.setFrame(False)   self.fnedit.setFocusPolicy(Qt.NoFocus)   self.fnedit.setStyleSheet('QLineEdit { background: transparent; }')   edit = QPushButton(_('Edit File'))   edit.clicked.connect(self.editClicked)   self.editbtn = edit   reload = QPushButton(_('Reload'))   reload.clicked.connect(self.reloadClicked)   self.reloadbtn = reload   tophbox.addWidget(QLabel(_('Settings File:')))   tophbox.addWidget(self.fnedit)   tophbox.addWidget(edit)   tophbox.addWidget(reload)     bothbox = QHBoxLayout()   layout.addLayout(bothbox)   pageList = QListWidget()   pageList.setResizeMode(QListView.Fixed)   stack = QStackedWidget()   bothbox.addWidget(pageList, 0)   bothbox.addWidget(stack, 1)   pageList.currentRowChanged.connect(stack.setCurrentIndex)     self.pages = {}   self.stack = stack   self.pageList = pageList     desctext = QTextBrowser()   desctext.setOpenExternalLinks(True)   layout.addWidget(desctext)   self.desctext = desctext     self.settings = QSettings()     # add page items to treeview   for meta, info in INFO:   if isinstance(meta['icon'], str):   icon = qtlib.geticon(meta['icon'])   else:   style = QApplication.style()   icon = QIcon()   icon.addPixmap(style.standardPixmap(meta['icon']))   item = QListWidgetItem(icon, meta['label'])   pageList.addItem(item)   self.addPage(meta['name'])     self.refresh()   self.focusField(focus or 'ui.merge')     def editClicked(self):   'Open internal editor in stacked widget'   if self.isDirty():   ret = qtlib.CustomPrompt(_('Confirm Save'), - _('Save changes before edit?'), self, + _('Save changes before editing?'), self,   (_('&Save'), _('&Discard'), _('Cancel')),   default=2, esc=2).run()   if ret == 0:   self.applyChanges()   elif ret == 2:   return   if qscilib.fileEditor(self.fn, foldable=True) == QDialog.Accepted:   self.refresh()     def refresh(self, *args):   # refresh config values   self.ini = self.loadIniFile(self.rcpath)   self.readonly = not (hasattr(self.ini, 'write') and os.access(self.fn, os.W_OK))   self.stack.setDisabled(self.readonly)   self.fnedit.setText(hglib.tounicode(self.fn))   for name, info, widgets in self.pages.values():   if name == 'extensions':   extsmentioned = False   for row, w in enumerate(widgets):   val = self.readCPath('extensions.' + w.opts['label'])   if val == None:   curvalue = False   elif len(val) and val[0] == '!':   curvalue = False   extsmentioned = True   else:   curvalue = True   extsmentioned = True   w.setValue(curvalue)   if not extsmentioned:   # make sure widgets are shown properly,   # even when no extensions mentioned in the config file   self.validateextensions()   else:   for row, e in enumerate(info):   curvalue = self.readCPath(e.cpath)   widgets[row].setValue(curvalue)     def isDirty(self):   if self.readonly:   return False   for name, info, widgets in self.pages.values():   for w in widgets:   if w.isDirty():   return True   return False     def reloadClicked(self):   if self.isDirty():   d = QMessageBox.question(self, _('Confirm Reload'),   _('Unsaved changes will be lost.\n'   'Do you want to reload?'),   QMessageBox.Ok | QMessageBox.Cancel)   if d != QMessageBox.Ok:   return   self.refresh()     def focusField(self, focusfield):   'Set page and focus to requested datum'   for i, (meta, info) in enumerate(INFO):   for n, e in enumerate(info):   if e.cpath == focusfield:   self.pageList.setCurrentRow(i)   QTimer.singleShot(0, lambda:   self.pages[meta['name']][2][n].setFocus())   return     def fillFrame(self, info):   widgets = []   frame = QFrame()   form = QFormLayout()   frame.setLayout(form)   self.stack.addWidget(frame)     for e in info:   opts = {'label': e.label, 'cpath': e.cpath, 'tooltip': e.tooltip,   'settings':self.settings}   if isinstance(e.values, tuple):   func = e.values[0]   w = func(opts, e.values[1])   else:   func = e.values   w = func(opts)   w.installEventFilter(self)   if e.globalonly:   w.setEnabled(self.rcpath == util.user_rcpath())   lbl = QLabel(e.label)   lbl.installEventFilter(self)   lbl.setToolTip(e.tooltip)   form.addRow(lbl, w)   widgets.append(w)   return widgets     def fillExtensionsFrame(self):   widgets = []   frame = QFrame()   grid = QGridLayout()   frame.setLayout(grid)   self.stack.addWidget(frame)   allexts = hglib.allextensions()   allextslist = list(allexts)   MAXCOLUMNS = 3   maxrows = (len(allextslist) + MAXCOLUMNS - 1) / MAXCOLUMNS   i = 0   extsinfo = ()   for i, name in enumerate(sorted(allexts)):   tt = hglib.tounicode(allexts[name])   opts = {'label':name, 'cpath':'extensions.' + name, 'tooltip':tt,   'valfunc':self.validateextensions}   w = genCheckBox(opts)   w.installEventFilter(self)   row, col = i / maxrows, i % maxrows   grid.addWidget(w, col, row)   widgets.append(w)   return extsinfo, widgets     def eventFilter(self, obj, event):   if event.type() in (QEvent.Enter, QEvent.FocusIn):   self.desctext.setHtml(obj.toolTip())   if event.type() == QEvent.ToolTip:   return True # tooltip is shown in self.desctext   return False     def addPage(self, name):   for data in INFO:   if name == data[0]['name']:   meta, info = data   break   if name == 'extensions':   extsinfo, widgets = self.fillExtensionsFrame()   self.pages[name] = name, extsinfo, widgets   else:   widgets = self.fillFrame(info)   self.pages[name] = name, info, widgets     def readCPath(self, cpath):   'Retrieve a value from the parsed config file'   # Presumes single section/key level depth   section, key = cpath.split('.', 1)   return self.ini.get(section, key)     def loadIniFile(self, rcpath):   for fn in rcpath:   if os.path.exists(fn):   break   else:   for fn in rcpath:   # Try to create a file from rcpath   try:   f = open(fn, 'w') - f.write('# Generated by TortoiseHg setting dialog\n') + f.write('# Generated by TortoiseHg settings dialog\n')   f.close()   break   except (IOError, OSError):   pass   else:   qtlib.WarningMsgBox(_('Unable to create a Mercurial.ini file'), - _('Insufficient access rights, reverting to read-only' - ' mode.'), parent=self) + _('Insufficient access rights, reverting to read-only ' + 'mode.'), parent=self)   from mercurial import config   self.fn = rcpath[0]   return config.config()   self.fn = fn   return wconfig.readfile(self.fn)     def recordNewValue(self, cpath, newvalue):   """Set the given value to ini; returns True if changed"""   # 'newvalue' is in local encoding   section, key = cpath.split('.', 1)   if newvalue == self.ini.get(section, key):   return False   if newvalue == None:   try:   del self.ini[section][key]   except KeyError:   pass   else:   self.ini.set(section, key, newvalue)   return True     def applyChanges(self):   if self.readonly:   return     for name, info, widgets in self.pages.values():   if name == 'extensions':   self.applyChangesForExtensions()   else:   for row, e in enumerate(info):   newvalue = widgets[row].value()   changed = self.recordNewValue(e.cpath, newvalue)   if changed and e.restartneeded:   self.restartRequested.emit(e.label)     try:   wconfig.writefile(self.ini, self.fn)   except IOError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   str(e), parent=self)     def applyChangesForExtensions(self):   emitChanged = False   section = 'extensions'   enabledexts = hglib.enabledextensions()   for chk in self.pages['extensions'][2]:   if (not emitChanged) and chk.isDirty():   self.restartRequested.emit(_('Extensions'))   emitChanged = True   key = chk.opts['label']   newvalue = chk.value()   if newvalue and (key in enabledexts):   continue # unchanged   if newvalue:   self.ini.set(section, key, '')   else:   for cand in (key, 'hgext.%s' % key, 'hgext/%s' % key):   try:   del self.ini[section][cand]   except KeyError:   pass     @pyqtSlot()   def validateextensions(self):   section = 'extensions'   enabledexts = hglib.enabledextensions()   selectedexts = set(chk.opts['label']   for chk in self.pages['extensions'][2]   if chk.isChecked())   invalidexts = hglib.validateextensions(selectedexts)     def getinival(name):   if section not in self.ini:   return None   for cand in (name, 'hgext.%s' % name, 'hgext/%s' % name):   try:   return self.ini[section][cand]   except KeyError:   pass     def changable(name):   curval = getinival(name)   if curval not in ('', None):   # enabled or unspecified, official extensions only   return False   elif name in enabledexts and curval is None:   # re-disabling ext is not supported   return False   elif name in invalidexts and name not in selectedexts:   # disallow to enable bad exts, but allow to disable it   return False   else:   return True     allexts = hglib.allextensions()   for chk in self.pages['extensions'][2]:   name = chk.opts['label']   chk.setEnabled(changable(name))   invalmsg = invalidexts.get(name)   if invalmsg:   invalmsg = invalmsg.decode('utf-8')   chk.setToolTip(invalmsg or hglib.tounicode(allexts[name]))      def run(ui, *pats, **opts):   return SettingsDialog(opts.get('alias') == 'repoconfig',   focus=opts.get('focus'))
 
568
569
570
 
 
571
572
573
 
1340
1341
1342
 
1343
1344
1345
 
1357
1358
1359
 
 
 
 
 
1360
1361
1362
 
1379
1380
1381
 
1382
1383
1384
 
568
569
570
571
572
573
574
575
 
1342
1343
1344
1345
1346
1347
1348
 
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
 
1387
1388
1389
1390
1391
1392
1393
@@ -568,6 +568,8 @@
  cmdline = self.applyTargetOption(cmdline)   if self.opts.get('noproxy'):   cmdline += ['--config', 'http_proxy.host='] + if self.opts.get('debug'): + cmdline.append('--debug')     cururl = self.currentUrl(False)   if not cururl: @@ -1340,6 +1342,7 @@
  _('Allow push of a new branch (--new-branch)'))   self.newbranchcb.setChecked(opts.get('new-branch', False))   layout.addRow(self.newbranchcb, None) +   self.forcecb = QCheckBox(   _('Force push or pull (override safety checks, --force)'))   self.forcecb.setChecked(opts.get('force', False)) @@ -1357,6 +1360,11 @@
  proxy = self.repo.ui.config('http_proxy', 'host')   self.noproxycb.setEnabled(bool(proxy))   + self.debugcb = QCheckBox( + _('Emit debugging output (--debug)')) + self.debugcb.setChecked(opts.get('debug', False)) + layout.addRow(self.debugcb, None) +   lbl = QLabel(_('Remote command:'))   self.remotele = QLineEdit()   if opts.get('remotecmd'): @@ -1379,6 +1387,7 @@
  outopts['force'] = self.forcecb.isChecked()   outopts['new-branch'] = self.newbranchcb.isChecked()   outopts['noproxy'] = self.noproxycb.isChecked() + outopts['debug'] = self.debugcb.isChecked()     self.outopts = outopts   QDialog.accept(self)
 
319
320
321
322
 
323
324
325
 
319
320
321
 
322
323
324
325
@@ -319,7 +319,7 @@
  def reject(self):   # prevent signals from reaching deleted objects   self.repo.repositoryChanged.disconnect(self.refresh) - super(BookmarkDialog, self).reject() + super(TagDialog, self).reject()    def run(ui, *pats, **opts):   kargs = {}
 
91
92
93
94
95
 
 
96
97
98
 
91
92
93
 
 
94
95
96
97
98
@@ -91,8 +91,8 @@
  grid.addWidget(expander, row, 0, Qt.AlignLeft | Qt.AlignTop)   grid.addLayout(optbox, row, 1)   - self.discard_chk = QCheckBox(_('Discard local changes, no backup' - ' (-C/--clean)')) + self.discard_chk = QCheckBox(_('Discard local changes, no backup ' + '(-C/--clean)'))   self.merge_chk = QCheckBox(_('Always merge (when possible)'))   self.autoresolve_chk = QCheckBox(_('Automatically resolve merge conflicts '   'where possible'))
 
385
386
387
388
389
 
 
390
391
392
 
479
480
481
482
 
483
484
485
 
385
386
387
 
 
388
389
390
391
392
 
479
480
481
 
482
483
484
485
@@ -385,8 +385,8 @@
  layout = QVBoxLayout()   self.setLayout(layout)   - lbl = QLabel(_('Temporary files are removed when this dialog' - ' is closed')) + lbl = QLabel(_('Temporary files are removed when this dialog ' + 'is closed'))   layout.addWidget(lbl)     list = QListWidget() @@ -479,7 +479,7 @@
    repo = self.repo   patterns = repo.ui.configitems('diff-patterns') - patterns = [(p, t) for p,t in patterns if t in tools] + patterns = [(p, t) for p,t in patterns if t in self.tools]     fname = self.list.item(row).text()[2:]   fname = hglib.fromunicode(fname)
 
240
241
242
243
244
 
 
245
246
247
 
295
296
297
298
299
 
 
300
301
302
 
240
241
242
 
 
243
244
245
246
247
 
295
296
297
 
 
298
299
300
301
302
@@ -240,8 +240,8 @@
  else:   res = qtlib.CustomPrompt(   _('Confirm Revert'), - _('Revert changes to files?'), parent, - (_('&Yes (backup changes)'), _('Yes (&discard changes)'), + _('Revert local file changes?'), parent, + (_('&Revert with backup'), _('&Discard changes'),   _('Cancel')), 2, 2, files).run()   if res == 2:   return False @@ -295,8 +295,8 @@
   def delete(parent, ui, repo, files):   res = qtlib.CustomPrompt( - _('Confirm Delete Unrevisioned'), - _('Delete the following unrevisioned files?'), + _('Confirm Delete Unversioned'), + _('Delete the following unversioned files?'),   parent, (_('&Delete'), _('Cancel')), 1, 1, files).run()   if res == 1:   return
 
31
32
33
34
 
35
 
31
32
33
 
34
35
@@ -31,5 +31,5 @@
  if vers == nextver:   return   return (('This version of TortoiseHg requires Mercurial ' - 'version %s.n to %s.n, but finds %s') % + 'version %s.n to %s.n, but found %s') %   ('.'.join(reqver), '.'.join(nextver), v))
Change 1 of 1 Show Entire File win32/​setup.cfg Stacked
 
2
3
4
5
 
 
2
3
4
 
5
@@ -2,4 +2,4 @@
 excludes=pywin, pywin.dialogs, pywin.dialogs.list, PyQt4.uic.port_v3, tcl, tk, distutils, py2exe  includes=sip  packages=ctypes, email, hgext, hgext.convert, encodings, tortoisehg.util, tortoisehg.hgqt, iniparse, pygments, nntplib, dulwich -dll_excludes=mswsock.dll, powrprof.dll, shfolder.dll, credui.dll, msvcp60.dll, secur32.dll, tk85.dll, tcl85.dll +dll_excludes=mswsock.dll, powrprof.dll, shfolder.dll, credui.dll, msvcp90.dll, secur32.dll, tk85.dll, tcl85.dll