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 dbe7b9b55bf1

Parents 075b6dd8684e

Parents 6a19669f2de7

by Adrian Buehlmann

Changes to 27 files · Browse files at dbe7b9b55bf1 Showing diff from parent 075b6dd8684e 6a19669f2de7 Diff from another changeset...

Show Entire File TortoiseHgOverlayServer.py Stacked
(No changes)
 
199
200
201
202
 
203
204
205
 
309
310
311
312
 
313
314
315
 
199
200
201
 
202
203
204
205
 
309
310
311
 
312
313
314
315
@@ -199,7 +199,7 @@
  return   repo.thgbackup(path)   if revertall: - commands.revert(repo.ui, repo, path) + commands.revert(repo.ui, repo, path, no_backup=True)   else:   wlock = repo.wlock()   try: @@ -309,7 +309,7 @@
  else:   repo.thgbackup(repo.wjoin(wfile))   wasadded = wfile in repo[None].added() - commands.revert(repo.ui, repo, repo.wjoin(wfile)) + commands.revert(repo.ui, repo, repo.wjoin(wfile), no_backup=True)   if wasadded:   os.unlink(repo.wjoin(wfile))   self.fileModified.emit()
 
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
 
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
@@ -249,27 +249,28 @@
  def resizeEvent(self, e):   # re-size columns the smart way: the column holding Description   # is re-sized according to the total widget size. - key = '%s/widget_width' % self.cfgname - widget_width, ok = QSettings().value(key).toInt() - if not ok: - widget_width = 0 - - if self.resized: - model = self.model() - vp_width = self.viewport().width() - total_width = stretch_col = 0 + if e.oldSize().width() != e.size().width(): + key = '%s/widget_width' % self.cfgname + widget_width, ok = QSettings().value(key).toInt() + if not ok: + widget_width = 0   - if vp_width != widget_width: - for c in range(model.columnCount(QModelIndex())): - if model._columns[c] in model._stretchs: - #save the description column - stretch_col = c - else: - #total the other widths - total_width += self.columnWidth(c) + if self.resized: + model = self.model() + vp_width = self.viewport().width() + total_width = stretch_col = 0   - width = max(vp_width - total_width, 100) - self.setColumnWidth(stretch_col, width) + if vp_width != widget_width: + for c in range(model.columnCount(QModelIndex())): + if model._columns[c] in model._stretchs: + #save the description column + stretch_col = c + else: + #total the other widths + total_width += self.columnWidth(c) + + width = max(vp_width - total_width, 100) + self.setColumnWidth(stretch_col, width)     super(HgRepoView, self).resizeEvent(e)  
 
66
67
68
 
69
70
71
 
66
67
68
69
70
71
72
@@ -66,6 +66,7 @@
  self.revset = set()   self.namedTabs = {}   self.repolen = len(repo) + self.destroyed.connect(self.repo.thginvalidate)     if repo.parents()[0].rev() == -1:   self._reload_rev = 'tip'
 
779
780
781
782
 
 
783
784
785
786
787
788
789
 
 
 
 
 
790
791
792
 
796
797
798
 
 
 
 
799
800
801
 
975
976
977
978
 
 
979
980
 
981
982
983
984
985
986
987
988
989
 
 
 
 
990
991
992
 
997
998
999
1000
 
1001
1002
1003
1004
1005
1006
1007
 
 
 
 
 
1008
1009
1010
 
 
1011
1012
1013
 
1023
1024
1025
1026
 
1027
1028
1029
 
779
780
781
 
782
783
784
785
786
787
788
789
 
790
791
792
793
794
795
796
797
 
801
802
803
804
805
806
807
808
809
810
 
984
985
986
 
987
988
989
 
990
991
992
993
994
 
 
 
 
 
995
996
997
998
999
1000
1001
 
1006
1007
1008
 
1009
1010
1011
 
 
 
 
 
1012
1013
1014
1015
1016
1017
 
 
1018
1019
1020
1021
1022
 
1032
1033
1034
 
1035
1036
1037
1038
@@ -779,14 +779,19 @@
  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.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']) + key = w.opts['label'] + for fullkey in (key, 'hgext.%s' % key, 'hgext/%s' % key): + val = self.readCPath('extensions.' + fullkey) + if val != None: + break   if val == None:   curvalue = False   elif len(val) and val[0] == '!': @@ -796,6 +801,10 @@
  curvalue = True   extsmentioned = True   w.setValue(curvalue) + if val == None: + w.opts['cpath'] = 'extensions.' + key + else: + w.opts['cpath'] = 'extensions.' + fullkey   if not extsmentioned:   # make sure widgets are shown properly,   # even when no extensions mentioned in the config file @@ -975,18 +984,18 @@
  if (not emitChanged) and chk.isDirty():   self.restartRequested.emit(_('Extensions'))   emitChanged = True - key = chk.opts['label'] + name = chk.opts['label'] + section, key = chk.opts['cpath'].split('.', 1)   newvalue = chk.value() - if newvalue and (key in enabledexts): + if newvalue and (name 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 + try: + del self.ini[section][key] + except KeyError: + pass     @pyqtSlot()   def validateextensions(self): @@ -997,17 +1006,17 @@
  if chk.isChecked())   invalidexts = hglib.validateextensions(selectedexts)   - def getinival(name): + def getinival(cpath):   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 + sect, key = cpath.split('.', 1) + try: + return self.ini[sect][key] + except KeyError: + pass   - def changable(name): - curval = getinival(name) + def changable(name, cpath): + curval = getinival(cpath)   if curval not in ('', None):   # enabled or unspecified, official extensions only   return False @@ -1023,7 +1032,7 @@
  allexts = hglib.allextensions()   for chk in self.pages['extensions'][2]:   name = chk.opts['label'] - chk.setEnabled(changable(name)) + chk.setEnabled(changable(name, chk.opts['cpath']))   invalmsg = invalidexts.get(name)   if invalmsg:   invalmsg = invalmsg.decode('utf-8')
 
448
449
450
 
451
452
453
 
455
456
457
 
458
459
460
 
448
449
450
451
452
453
454
 
456
457
458
459
460
461
462
@@ -448,6 +448,7 @@
  index = self.repoTabsWidget.currentIndex()   if widget.closeRepoWidget():   self.repoTabsWidget.removeTab(index) + widget.deleteLater()   self.updateMenu()     def repoTabCloseRequested(self, index): @@ -455,6 +456,7 @@
  w = tw.widget(index)   if w and w.closeRepoWidget():   tw.removeTab(index) + w.deleteLater()   self.updateMenu()     def repoTabChanged(self, index=0):
 
75
76
77
78
79
 
 
80
81
82
 
75
76
77
 
 
78
79
80
81
82
@@ -75,8 +75,8 @@
  ## tooltips   self.tips = gtklib.Tooltips()   self.tips.set_tip(frame, - _('Commit message text for new changeset that reverses the' - ' effect of the change being backed out.')) + _('Commit message text for new changeset that reverses the ' + 'effect of the change being backed out.'))     ## use English backout message option   self.eng_msg = gtk.CheckButton(_('Use English backout message'))
 
54
55
56
57
58
 
 
59
60
61
 
54
55
56
 
 
57
58
59
60
61
@@ -54,8 +54,8 @@
  def get_error_text(self):   if self.__error_text__ == None:   text = '{{{\n#!python\n' # Wrap in Bitbucket wiki preformat markers - text += _('** Please report this bug to' - ' http://bitbucket.org/tortoisehg/stable/issues\n') + text += _('** Please report this bug to ' + 'http://bitbucket.org/tortoisehg/stable/issues\n')   text += '** Mercurial version (%s). TortoiseHg version (%s)\n' % (   hglib.hgversion, version.version())   text += '** Command: %s\n' % (self.opts['cmd'])
 
76
77
78
79
 
 
 
 
80
81
82
 
133
134
135
136
 
137
138
139
 
76
77
78
 
79
80
81
82
83
84
85
 
136
137
138
 
139
140
141
142
@@ -76,7 +76,10 @@
  def _get_bugtraq_object(self):   if self.bugtr == None:   obj = CreateObject(self.guid) - self.bugtr = obj.QueryInterface(IBugTraqProvider2) + try: + self.bugtr = obj.QueryInterface(IBugTraqProvider2) + except COMError: + return None   return self.bugtr     def get_commit_message(self, parameters, logmessage): @@ -133,7 +136,7 @@
  try:   bugtr.HasOptions()   return True - except ValueError: + except (ValueError, AttributeError):   return False    
 
1116
1117
1118
1119
1120
1121
 
 
 
1122
1123
1124
1125
1126
1127
1128
1129
 
 
 
1130
1131
1132
 
1137
1138
1139
1140
1141
 
 
1142
1143
1144
 
1116
1117
1118
 
 
 
1119
1120
1121
1122
1123
1124
1125
1126
 
 
 
1127
1128
1129
1130
1131
1132
 
1137
1138
1139
 
 
1140
1141
1142
1143
1144
@@ -1116,17 +1116,17 @@
    if sumlen and len(lines[0].rstrip()) > sumlen:   resp = gdialog.Confirm(_('Confirm Commit'), [], self, - _('The summary line length of %i is greater than' - ' %i.\n\nIgnore format policy and continue' - ' commit?') % + _('The summary line length of %i is greater than ' + '%i.\n\nIgnore format policy and continue ' + 'commit?') %   (len(lines[0].rstrip()), sumlen)).run()   if resp != gtk.RESPONSE_YES:   return False   if sumlen and len(lines) > 1 and len(lines[1].strip()):   resp = gdialog.Confirm(_('Confirm Commit'), [], self, - _('The summary line is not followed by a blank' - ' line.\n\nIgnore format policy and continue' - ' commit?')).run() + _('The summary line is not followed by a blank ' + 'line.\n\nIgnore format policy and continue ' + 'commit?')).run()   if resp != gtk.RESPONSE_YES:   return False   if maxlen: @@ -1137,8 +1137,8 @@
  if errs:   resp = gdialog.Confirm(_('Confirm Commit'), [], self,   _('The following lines are over the %i-' - 'character limit: %s.\n\nIgnore format' - ' policy and continue commit?') % + 'character limit: %s.\n\nIgnore format ' + 'policy and continue commit?') %   (maxlen, ', '.join(errs))).run()   if resp != gtk.RESPONSE_YES:   return False
 
708
709
710
711
712
 
 
713
714
715
 
708
709
710
 
 
711
712
713
714
715
@@ -708,8 +708,8 @@
  spacer.set_width_chars(24)   sniplbl = gtk.Label()   snipbox.pack_start(sniplbl, False, False) - sniplbl.set_markup('<span size="large" weight="heavy"' - ' font_family="monospace">...</span>') + sniplbl.set_markup('<span size="large" weight="heavy" ' + 'font_family="monospace">...</span>')   sniplbl.set_angle(90)   snipbox.pack_start(gtk.Label())   self.csbox.pack_start(wrapbox, False, False, 2)
 
317
318
319
320
321
322
323
324
325
 
 
 
 
 
 
326
327
328
 
317
318
319
 
 
 
 
 
 
320
321
322
323
324
325
326
327
328
@@ -317,12 +317,12 @@
  search_hbox.pack_start(search, False, False, 4)   self.tooltips.set_tip(search, _('Start this search'))   self.tooltips.set_tip(regexp, _('Regular expression search pattern')) - self.tooltips.set_tip(includes, _('Comma separated list of' - ' inclusion patterns. By default, the entire repository' - ' is searched.')) - self.tooltips.set_tip(excludes, _('Comma separated list of' - ' exclusion patterns. Exclusion patterns are applied' - ' after inclusion patterns.')) + self.tooltips.set_tip(includes, _('Comma separated list of ' + 'inclusion patterns. By default, the entire repository ' + 'is searched.')) + self.tooltips.set_tip(excludes, _('Comma separated list of ' + 'exclusion patterns. Exclusion patterns are applied ' + 'after inclusion patterns.'))   vbox.pack_start(search_hbox, False, False, 4)     hbox = gtk.HBox()
 
235
236
237
238
 
 
239
240
241
 
235
236
237
 
238
239
240
241
242
@@ -235,7 +235,8 @@
  unkmodel = self.unktree.get_model()   while q.qsize():   wfile = q.get(0) - unkmodel.append( [wfile, hglib.toutf(wfile)] ) + if unkmodel is not None: + unkmodel.append( [wfile, hglib.toutf(wfile)] )   return thread.isAlive()     def save_settings(self):
 
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
 
229
230
231
232
233
234
235
236
237
 
 
 
 
 
 
238
239
240
 
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
 
229
230
231
 
 
 
 
 
 
232
233
234
235
236
237
238
239
240
@@ -98,39 +98,39 @@
  self._normal = gtk.RadioButton(None, _('Send changesets as Hg patches'))   table.add_row(self._normal)   self.tips.set_tip(self._normal, - _('Hg patches (as generated by export command) are compatible' - ' with most patch programs. They include a header which' - ' contains the most important changeset metadata.')) + _('Hg patches (as generated by export command) are compatible ' + 'with most patch programs. They include a header which ' + 'contains the most important changeset metadata.'))     self._git = gtk.RadioButton(self._normal,   _('Use extended (git) patch format'))   table.add_row(self._git)   self.tips.set_tip(self._git, - _('Git patches can describe binary files, copies, and' - ' permission changes, but recipients may not be able to' - ' use them if they are not using git or Mercurial.')) + _('Git patches can describe binary files, copies, and ' + 'permission changes, but recipients may not be able to ' + 'use them if they are not using git or Mercurial.'))     self._plain = gtk.RadioButton(self._normal,   _('Plain, do not prepend Hg header'))   table.add_row(self._plain)   self.tips.set_tip(self._plain, - _('Stripping Mercurial header removes username and parent' - ' information. Only useful if recipient is not using' - ' Mercurial (and does not like to see the headers).')) + _('Stripping Mercurial header removes username and parent ' + 'information. Only useful if recipient is not using ' + 'Mercurial (and does not like to see the headers).'))     self._bundle = gtk.RadioButton(self._normal,   _('Send single binary bundle, not patches'))   table.add_row(self._bundle)   if revargs[0] in ('--outgoing', '-o'):   self.tips.set_tip(self._bundle, - _('Bundles store complete changesets in binary form.' - ' Upstream users can pull from them. This is the safest' - ' way to send changes to recipient Mercurial users.')) + _('Bundles store complete changesets in binary form. ' + 'Upstream users can pull from them. This is the safest ' + 'way to send changes to recipient Mercurial users.'))   else:   self._bundle.set_sensitive(False)   self.tips.set_tip(self._bundle, - _('This feature is only available when sending outgoing' - ' changesets. It is not applicable with revision ranges.')) + _('This feature is only available when sending outgoing ' + 'changesets. It is not applicable with revision ranges.'))     self._attach = gtk.CheckButton(_('attach'))   self.tips.set_tip(self._attach, @@ -229,12 +229,12 @@
  self._frombox.child.set_text(hglib.fromutf(getfromaddr(repo.ui)))   self._subjbox.child.set_text(hglib.fromutf(repo.ui.config('email', 'subject', '')))   self.tips.set_tip(self._eventbox, - _('Patch series description is sent in initial summary' - ' email with [PATCH 0 of N] subject. It should describe' - ' the effects of the entire patch series. When emailing' - ' a bundle, these fields make up the message subject and' - ' body. Flags is a comma separated list of tags' - ' which are inserted into the message subject prefix.') + _('Patch series description is sent in initial summary ' + 'email with [PATCH 0 of N] subject. It should describe ' + 'the effects of the entire patch series. When emailing ' + 'a bundle, these fields make up the message subject and ' + 'body. Flags is a comma separated list of tags ' + 'which are inserted into the message subject prefix.')   )   gtklib.addspellcheck(self.descview, self.repo.ui)   fill_history(history, self._tolist, 'email.to')
 
224
225
226
227
 
 
 
 
 
 
228
229
230
 
252
253
254
255
 
256
257
258
 
224
225
226
 
227
228
229
230
231
232
233
234
235
 
257
258
259
 
260
261
262
263
@@ -224,7 +224,12 @@
  def refresh(self):   hglib.invalidaterepo(self.repo)   matcher = match.always(self.repo.root, self.repo.root) - unknown = self.repo.status(match=matcher, unknown=True)[4] + try: + unknown = self.repo.status(match=matcher, unknown=True)[4] + except (EnvironmentError, util.Abort), inst: + gdialog.Prompt(_('Error while reading status'), + hglib.toutf(str(inst)), self).run() + return   self.unkmodel.clear()   for u in unknown:   self.unkmodel.append([hglib.toutf(u), u]) @@ -252,7 +257,7 @@
  createmode=None)   f.writelines(out)   f.rename() - except IOError, e: + except EnvironmentError, e:   dialog.error_dialog(self, _('Unable to write .hgignore file'),   hglib.tounicode(str(e)))   shlib.shell_notify([self.ignorefile])
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
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
 # hgtk.py - front-end script for TortoiseHg dialogs  #  # Copyright 2008 Steve Borho <steve@borho.org>  # Copyright 2008 TK Soh <teekaysoh@gmail.com>  #  # This software may be used and distributed according to the terms of the  # GNU General Public License version 2, incorporated herein by reference.    shortlicense = '''  Copyright (C) 2008-2010 Steve Borho <steve@borho.org> and others.  This is free software; see the source for copying conditions. There is NO  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  '''    import os  import pdb  import sys  import subprocess  import traceback  import gtk  import gobject    import mercurial.ui as _ui  from mercurial import hg, util, fancyopts, cmdutil, extensions, error    from tortoisehg.util.i18n import agettext as _  from tortoisehg.util import hglib, paths, shlib, i18n  from tortoisehg.util import version as thgversion  try:   from tortoisehg.util.config import nofork as config_nofork  except ImportError:   config_nofork = None    from tortoisehg.hgtk import textview    try:   import win32con   openflags = win32con.CREATE_NO_WINDOW  except ImportError:   openflags = 0    nonrepo_commands = '''userconfig shellconfig clone debugcomplete init  about help version thgstatus serve'''    # Add TortoiseHg signals, hooked to key accelerators in gtklib  for sig in ('copy-clipboard', 'thg-diff', 'thg-parent', 'thg-rename',   'thg-revision', 'mq-move-up', 'mq-move-down', 'mq-move-top',   'mq-move-bottom', 'mq-pop', 'mq-push'):   gobject.signal_new(sig, gtk.TreeView,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())  for sig in ('thg-exit', 'thg-close', 'thg-refresh', 'thg-accept',   'thg-reflow', 'status-scroll-down', 'status-scroll-up',   'status-next-file', 'status-previous-file',   'status-select-all', 'status-next-page',   'status-previous-page'):   gobject.signal_new(sig, gtk.Window,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())  for sig in ('thg-close', 'thg-new'):   gobject.signal_new(sig, gtk.Notebook,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())  for sig in ('thg-undo', 'thg-redo'):   gobject.signal_new(sig, textview.UndoableTextView,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())    gtkmainalive = False  def dispatch(args):   "run the command specified in args"   try:   u = _ui.ui()   if '--traceback' in args:   u.setconfig('ui', 'traceback', 'on')   if '--debugger' in args:   pdb.set_trace()   return _runcatch(u, args)   except SystemExit:   pass   except KeyboardInterrupt:   print _('\nCaught keyboard interrupt, aborting.\n')   except:   from tortoisehg.hgtk.bugreport import run   if '--debugger' in args:   pdb.post_mortem(sys.exc_info()[2])   error = traceback.format_exc()   opts = {}   opts['cmd'] = ' '.join(sys.argv[1:])   opts['error'] = error   opts['nofork'] = True   if gtkmainalive:   dlg = run(u, **opts)   dlg.display()   dlg.show_all()   else:   gtkrun(run, u, **opts)    origwdir = os.getcwd()  def portable_fork(ui, opts):   if 'THG_HGTK_SPAWN' in os.environ or (   not opts.get('fork') and opts.get('nofork')):   return   elif ui.configbool('tortoisehg', 'hgtkfork', None) is not None:   if not ui.configbool('tortoisehg', 'hgtkfork'):   return   elif config_nofork:   return   # Spawn background process and exit   if hasattr(sys, "frozen"):   args = sys.argv   else:   args = [sys.executable] + sys.argv   os.environ['THG_HGTK_SPAWN'] = '1'   cmdline = subprocess.list2cmdline(args)   os.chdir(origwdir)   subprocess.Popen(cmdline,   creationflags=openflags,   shell=True)   sys.exit(0)    def get_list_from_file(filename):   try:   if filename == '-':   lines = [ x.replace("\n", "") for x in sys.stdin.readlines() ]   else:   fd = open(filename, "r")   lines = [ x.replace("\n", "") for x in fd.readlines() ]   fd.close()   os.unlink(filename)   except IOError, e:   sys.stderr.write(_('can not read file "%s". Ignored.\n') % filename)   return []     # Convert absolute file paths to repo/cwd canonical   cwd = os.getcwd()   root = paths.find_root(cwd)   if not root:   return lines   if cwd == root:   cwd_rel = ''   else:   cwd_rel = cwd[len(root+os.sep):] + os.sep   files = []   for f in lines:   try:   cpath = util.canonpath(root, cwd, f)   # canonpath will abort on .hg/ paths   except util.Abort:   continue   if cpath.startswith(cwd_rel):   cpath = cpath[len(cwd_rel):]   files.append(cpath)   else:   files.append(f)   return files    def _parse(ui, args):   options = {}   cmdoptions = {}     try:   args = fancyopts.fancyopts(args, globalopts, options)   except fancyopts.getopt.GetoptError, inst:   raise error.ParseError(None, inst)     if args:   alias, args = args[0], args[1:]   aliases, i = cmdutil.findcmd(alias, table, ui.config("ui", "strict"))   for a in aliases:   if a.startswith(alias):   alias = a   break   cmd = aliases[0]   c = list(i[1])   else:   alias = None   cmd = None   c = []     # combine global options into local   for o in globalopts:   c.append((o[0], o[1], options[o[1]], o[3]))     try:   args = fancyopts.fancyopts(args, c, cmdoptions)   except fancyopts.getopt.GetoptError, inst:   raise error.ParseError(cmd, inst)     # separate global options back out   for o in globalopts:   n = o[1]   options[n] = cmdoptions[n]   del cmdoptions[n]     listfile = options.get('listfile')   if listfile:   del options['listfile']   args += get_list_from_file(listfile)     return (cmd, cmd and i[0] or None, args, options, cmdoptions, alias)    def _runcatch(ui, args):   try:   try:   return runcommand(ui, args)   finally:   ui.flush()   except error.ParseError, inst:   if inst.args[0]:   ui.status(_("hgtk %s: %s\n") % (inst.args[0], inst.args[1]))   help_(ui, inst.args[0])   else:   ui.status(_("hgtk: %s\n") % inst.args[1])   help_(ui, 'shortlist')   except error.AmbiguousCommand, inst:   ui.status(_("hgtk: command '%s' is ambiguous:\n %s\n") %   (inst.args[0], " ".join(inst.args[1])))   except error.UnknownCommand, inst:   ui.status(_("hgtk: unknown command '%s'\n") % inst.args[0])   help_(ui, 'shortlist')   except error.RepoError, inst:   ui.status(_("abort: %s!\n") % inst)     return -1    def runcommand(ui, args):   cmd, func, args, options, cmdoptions, alias = _parse(ui, args)   cmdoptions['alias'] = alias   ui.setconfig("ui", "verbose", str(bool(options["verbose"])))   i18n.setlanguage(ui.config('tortoisehg', 'ui.language'))     if options['help']:   return help_(ui, cmd)   elif not cmd:   return help_(ui, 'shortlist')     path = options['repository']   if path:   if path.startswith('bundle:'):   s = path[7:].split('+', 1)   if len(s) == 1:   path, bundle = os.getcwd(), s[0]   else:   path, bundle = s   cmdoptions['bundle'] = os.path.abspath(bundle)   path = ui.expandpath(path)   cmdoptions['repository'] = path   os.chdir(path)   if options['fork']:   cmdoptions['fork'] = True   if options['nofork'] or options['profile']:   cmdoptions['nofork'] = True   path = paths.find_root(os.getcwd())   if path:   try:   lui = ui.copy()   lui.readconfig(os.path.join(path, ".hg", "hgrc"))   except IOError:   pass   else:   lui = ui     hglib.wrapextensionsloader() # enable blacklist of extensions   extensions.loadall(ui)     if options['quiet']:   ui.quiet = True     if cmd not in nonrepo_commands.split() and not path:   raise error.RepoError(_("There is no Mercurial repository here"   " (.hg not found)"))     cmdoptions['mainapp'] = True   d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)   return _runcommand(lui, options, cmd, d)    def _runcommand(ui, options, cmd, cmdfunc):   def checkargs():   try:   return cmdfunc()   except error.SignatureError:   raise error.ParseError(cmd, _("invalid arguments"))     if options['profile']:   format = ui.config('profiling', 'format', default='text')     if not format in ['text', 'kcachegrind']:   ui.warn(_("unrecognized profiling format '%s'"   " - Ignored\n") % format)   format = 'text'     output = ui.config('profiling', 'output')     if output:   path = ui.expandpath(output)   ostream = open(path, 'wb')   else:   ostream = sys.stderr     try:   from mercurial import lsprof   except ImportError:   raise util.Abort(_(   'lsprof not available - install from '   'http://codespeak.net/svn/user/arigo/hack/misc/lsprof/'))   p = lsprof.Profiler()   p.enable(subcalls=True)   try:   return checkargs()   finally:   p.disable()     if format == 'kcachegrind':   import lsprofcalltree   calltree = lsprofcalltree.KCacheGrind(p)   calltree.output(ostream)   else:   # format == 'text'   stats = lsprof.Stats(p.getstats())   stats.sort()   stats.pprint(top=10, file=ostream, climit=5)     if output:   ostream.close()   else:   return checkargs()    mainwindow = None  def thgexit(win):   if hasattr(mainwindow, 'should_live'):   if mainwindow.should_live(): return   mainwindow.destroy()    def gtkrun(dlgfunc, ui, *args, **opts):   portable_fork(ui, opts)   win = dlgfunc(ui, *args, **opts)   if not win:   return   global mainwindow, gtkmainalive   mainwindow = win   if hasattr(win, 'display'):   win.display()   win.show_all()   if 'response' in gobject.signal_list_names(win):   win.connect('response', gtk.main_quit)   win.connect('destroy', gtk.main_quit)   gtk.gdk.threads_init()   gtk.gdk.threads_enter()   gtkmainalive = True   gtk.main()   gtkmainalive = False   gtk.gdk.threads_leave()    def about(ui, *pats, **opts):   """about TortoiseHg"""   from tortoisehg.hgtk.about import run   gtkrun(run, ui, *pats, **opts)    def add(ui, *pats, **opts):   """add files"""   from tortoisehg.hgtk.quickop import run   gtkrun(run, ui, *pats, **opts)    def thgstatus(ui, *pats, **opts):   """update TortoiseHg status cache"""   from tortoisehg.util.thgstatus import run   run(ui, *pats, **opts)    def clone(ui, *pats, **opts):   """clone tool"""   from tortoisehg.hgtk.clone import run   gtkrun(run, ui, *pats, **opts)    def commit(ui, *pats, **opts):   """commit tool"""   # move cwd to repo root if repo is merged, so we can show   # all the changed files   repo = hg.repository(ui, path=paths.find_root())   if len(repo.parents()) > 1:   os.chdir(repo.root)   pats = []   from tortoisehg.hgtk.commit import run   gtkrun(run, ui, *pats, **opts)    def shelve(ui, *pats, **opts):   """shelve/unshelve tool"""   from tortoisehg.hgtk.thgshelve import run   gtkrun(run, ui, *pats, **opts)    def userconfig(ui, *pats, **opts):   """user configuration editor"""   from tortoisehg.hgtk.thgconfig import run   gtkrun(run, ui, *pats, **opts)    def repoconfig(ui, *pats, **opts):   """repository configuration editor"""   from tortoisehg.hgtk.thgconfig import run   gtkrun(run, ui, *pats, **opts)    def shellconfig(ui, *pats, **opts):   """Explorer extension configuration editor"""   from tortoisehg.hgtk.shellconf import run   gtkrun(run, ui, *pats, **opts)    def rename(ui, *pats, **opts):   """rename a single file or directory"""   if not pats or len(pats) > 2:   from tortoisehg.hgtk import gdialog   gdialog.Prompt(_('Rename error'),   _('rename takes one or two path arguments'), None).run()   return   from tortoisehg.hgtk.rename import run   gtkrun(run, ui, *pats, **opts)    def guess(ui, *pats, **opts):   """guess previous renames or copies"""   from tortoisehg.hgtk.guess import run   gtkrun(run, ui, *pats, **opts)    def datamine(ui, *pats, **opts):   """repository search and annotate tool"""   from tortoisehg.hgtk.datamine import run   gtkrun(run, ui, *pats, **opts)    def hgignore(ui, *pats, **opts):   """ignore filter editor"""   from tortoisehg.hgtk.hgignore import run   gtkrun(run, ui, *pats, **opts)    def hginit(ui, *pats, **opts):   """repository initialization tool"""   from tortoisehg.hgtk.hginit import run   gtkrun(run, ui, *pats, **opts)    def log(ui, *pats, **opts):   """Repository Explorer (changelog viewer)"""   from tortoisehg.hgtk.history import run   gtkrun(run, ui, *pats, **opts)    def merge(ui, *pats, **opts):   """merge tool"""   from tortoisehg.hgtk.merge import run   gtkrun(run, ui, *pats, **opts)    def recovery(ui, *pats, **opts):   """recover, rollback & verify"""   from tortoisehg.hgtk.recovery import run   gtkrun(run, ui, *pats, **opts)    def remove(ui, *pats, **opts):   """file status viewer in remove mode"""   from tortoisehg.hgtk.quickop import run   gtkrun(run, ui, *pats, **opts)    def revert(ui, *pats, **opts):   """file status viewer in revert mode"""   from tortoisehg.hgtk.quickop import run   gtkrun(run, ui, *pats, **opts)    def forget(ui, *pats, **opts):   """file status viewer in forget mode"""   from tortoisehg.hgtk.quickop import run   gtkrun(run, ui, *pats, **opts)    def serve(ui, *pats, **opts):   """web server"""   from tortoisehg.hgtk.serve import run   if paths.find_root() == None and not (opts['web_conf'] or opts['webdir_conf']):   raise error.RepoError(_("There is no Mercurial repository here"   " (.hg not found)"))   gtkrun(run, ui, *pats, **opts)    def status(ui, *pats, **opts):   """file status & diff viewer"""   from tortoisehg.hgtk.status import run   gtkrun(run, ui, *pats, **opts)    def strip(ui, *pats, **opts):   """strip changesets"""   from tortoisehg.hgtk.thgstrip import run   gtkrun(run, ui, *pats, **opts)    def synch(ui, *pats, **opts):   """repository synchronization tool"""   from tortoisehg.hgtk.synch import run   cmd = opts['alias']   if cmd in ('push', 'outgoing', 'email'):   opts['pushmode'] = True   else:   opts['pushmode'] = False   gtkrun(run, ui, *pats, **opts)    def update(ui, *pats, **opts):   """update/checkout tool"""   from tortoisehg.hgtk.update import run   gtkrun(run, ui, *pats, **opts)    def browse(ui, *pats, **opts):   """browse repository state"""   from tortoisehg.hgtk.browse import run   gtkrun(run, ui, *pats, **opts)    def vdiff(ui, *pats, **opts):   """launch configured visual diff tool"""   from tortoisehg.hgtk.visdiff import run   gtkrun(run, ui, *pats, **opts)    def thgimport(ui, *pats, **opts):   """import patches to repository/patch queue"""   from tortoisehg.hgtk.thgimport import run   gtkrun(run, ui, *pats, **opts)    def mpatch(ui, rejfile, *pats, **opts):   """Attempt to resolve conflicts in a .rej file"""   def abort(err):   from tortoisehg.hgtk import gdialog   gdialog.Prompt(_('mpatch error'), err, None).run()   return None   if not rejfile or pats or not rejfile.endswith('.rej'):   return abort(_('mpatch expects *.rej file argument\n'))   if not os.path.exists(rejfile):   return abort(_('%s does not exist\n') % rejfile)   # Assume patch was made from repo root, and arrange ourselves thusly   repo = hg.repository(ui, path=paths.find_root())   rejfile = util.canonpath(repo.root, repo.getcwd(), rejfile)   os.chdir(repo.root)   source = rejfile[:-4]   if not os.path.exists(source):   return abort(_('%s does not exist\n') % source)   from tortoisehg.util import prej   from tortoisehg.hgtk import visdiff   prej.run(ui, rejfile, source, visdiff.filemerge)    ### help management, adapted from mercurial.commands.help_()  def help_(ui, name=None, with_version=False, **opts):   """show help for a command, extension, or list of commands     With no arguments, print a list of commands and short help.     Given a command name, print help for that command.     Given an extension name, print help for that extension, and the   commands it provides."""   option_lists = []   textwidth = ui.termwidth() - 2     def addglobalopts(aliases):   if ui.verbose:   option_lists.append((_("global options:"), globalopts))   if name == 'shortlist':   option_lists.append((_('use "hgtk help" for the full list '   'of commands'), ()))   else:   if name == 'shortlist':   msg = _('use "hgtk help" for the full list of commands '   'or "hgtk -v" for details')   elif aliases:   msg = _('use "hgtk -v help%s" to show aliases and '   'global options') % (name and " " + name or "")   else:   msg = _('use "hgtk -v help %s" to show global options') % name   option_lists.append((msg, ()))     def helpcmd(name):   if with_version:   version(ui)   ui.write('\n')     try:   aliases, i = cmdutil.findcmd(name, table, False)   except error.AmbiguousCommand, inst:   select = lambda c: c.lstrip('^').startswith(inst.args[0])   helplist(_('list of commands:\n\n'), select)   return     # synopsis   ui.write("%s\n" % i[2])     # aliases   if not ui.quiet and len(aliases) > 1:   ui.write(_("\naliases: %s\n") % ', '.join(aliases[1:]))     # description   doc = i[0].__doc__   if not doc:   doc = _("(No help text available)")   if ui.quiet:   doc = doc.splitlines(0)[0]   ui.write("\n%s\n" % doc.rstrip())     if not ui.quiet:   # options   if i[1]:   option_lists.append((_("options:\n"), i[1]))     addglobalopts(False)     def helplist(header, select=None):   h = {}   cmds = {}   for c, e in table.iteritems():   f = c.split("|", 1)[0]   if select and not select(f):   continue   if (not select and name != 'shortlist' and   e[0].__module__ != __name__):   continue   if name == "shortlist" and not f.startswith("^"):   continue   f = f.lstrip("^")   if not ui.debugflag and f.startswith("debug"):   continue   doc = e[0].__doc__   if doc and 'DEPRECATED' in doc and not ui.verbose:   continue   #doc = gettext(doc)   if not doc:   doc = _("(no help text available)")   h[f] = doc.splitlines()[0].rstrip()   cmds[f] = c.lstrip("^")     if not h:   ui.status(_('no commands defined\n'))   return     ui.status(header)   fns = sorted(h)   m = max(map(len, fns))   for f in fns:   if ui.verbose:   commands = cmds[f].replace("|",", ")   ui.write(" %s:\n %s\n"%(commands, h[f]))   else:   ui.write('%s\n' % (util.wrap(h[f], textwidth,   initindent=' %-*s ' % (m, f),   hangindent=' ' * (m + 4))))     if not ui.quiet:   addglobalopts(True)     def helptopic(name):   from mercurial import help   for names, header, doc in help.helptable:   if name in names:   break   else:   raise error.UnknownCommand(name)     # description   if not doc:   doc = _("(No help text available)")   if hasattr(doc, '__call__'):   doc = doc()     ui.write("%s\n" % header)   ui.write("%s\n" % doc.rstrip())     if name and name != 'shortlist':   i = None   for f in (helpcmd, helptopic):   try:   f(name)   i = None   break   except error.UnknownCommand, inst:   i = inst   if i:   raise i     else:   # program name   if ui.verbose or with_version:   version(ui)   else:   ui.status(_("Hgtk - TortoiseHg's GUI tools for Mercurial SCM (Hg)\n"))   ui.status('\n')     # list of commands   if name == "shortlist":   header = _('basic commands:\n\n')   else:   header = _('list of commands:\n\n')     helplist(header)     # list all option lists   opt_output = []   for title, options in option_lists:   opt_output.append(("\n%s" % title, None))   for shortopt, longopt, default, desc in options:   if "DEPRECATED" in desc and not ui.verbose: continue   opt_output.append(("%2s%s" % (shortopt and "-%s" % shortopt,   longopt and " --%s" % longopt),   "%s%s" % (desc,   default   and _(" (default: %s)") % default   or "")))     if opt_output:   opts_len = max([len(line[0]) for line in opt_output if line[1]] or [0])   for first, second in opt_output:   if second:   initindent = ' %-*s ' % (opts_len, first)   hangindent = ' ' * (opts_len + 3)   ui.write('%s\n' % (util.wrap(second, textwidth,   initindent=initindent,   hangindent=hangindent)))   else:   ui.write("%s\n" % first)    def version(ui, **opts):   """output version and copyright information"""   ui.write(_('TortoiseHg Dialogs (version %s), '   'Mercurial (version %s)\n') %   (hglib.fromutf(thgversion.version()), hglib.hgversion))   if not ui.quiet:   ui.write(shortlicense)    def debugcomplete(ui, cmd='', **opts):   """output list of possible commands"""   if opts.get('options'):   options = []   otables = [globalopts]   if cmd:   aliases, entry = cmdutil.findcmd(cmd, table, False)   otables.append(entry[1])   for t in otables:   for o in t:   if o[0]:   options.append('-%s' % o[0])   options.append('--%s' % o[1])   ui.write("%s\n" % "\n".join(options))   return     cmdlist = cmdutil.findpossible(cmd, table)   if ui.verbose:   cmdlist = [' '.join(c[0]) for c in cmdlist.values()]   ui.write("%s\n" % "\n".join(sorted(cmdlist)))    def archive(ui, *pats, **opts):   """create an unversioned archive of a repository revision"""   from tortoisehg.hgtk.archive import run   gtkrun(run, ui, *pats, **opts)    globalopts = [   ('R', 'repository', '',   _('repository root directory or symbolic path name')),   ('v', 'verbose', None, _('enable additional output')),   ('q', 'quiet', None, _('suppress output')),   ('h', 'help', None, _('display help and exit')),   ('', 'debugger', None, _('start debugger')),   ('', 'profile', None, _('print command execution profile')),   ('', 'nofork', None, _('do not fork GUI process')),   ('', 'fork', None, _('always fork GUI process')),   ('', 'listfile', '', _('read file list from file')),  ]    table = {   "about": (about, [], _('hgtk about')),   "add": (add, [], _('hgtk add [FILE]...')),   "^clone": (clone, [], _('hgtk clone SOURCE [DEST]')),   "^commit|ci": (commit,   [('u', 'user', '', _('record user as committer')),   ('d', 'date', '', _('record datecode as commit date'))],   _('hgtk commit [OPTIONS] [FILE]...')),   "^datamine|annotate|blame|grep": (datamine, [], _('hgtk datamine')),   "^hgignore|ignore|filter": (hgignore, [], _('hgtk hgignore [FILE]')),   "^init": (hginit, [], _('hgtk init [DEST]')),   "^log|history|explorer": (log,   [('l', 'limit', '', _('limit number of changes displayed'))],   _('hgtk log [OPTIONS] [FILE]')),   "merge": (merge,   [('r', 'rev', '', _('revision to merge with'))],   _('hgtk merge')),   "^recovery|rollback|verify": (recovery, [], _('hgtk recovery')),   "^shelve|unshelve": (shelve, [], _('hgtk shelve')),   "synch|pull|push|incoming|outgoing|email": (synch, [], _('hgtk synch')),   "^status|st|diff": (status,   [('r', 'rev', [], _('revisions to compare'))],   _('hgtk status [FILE]...')),   "^userconfig": (userconfig,   [('', 'focus', '', _('field to give initial focus'))],   _('hgtk userconfig')),   "^repoconfig": (repoconfig,   [('', 'focus', '', _('field to give initial focus'))],   _('hgtk repoconfig')),   "^guess": (guess, [], _('hgtk guess')),   "remove|rm": (revert, [], _('hgtk remove [FILE]...')),   "rename|mv": (rename, [], _('hgtk rename SOURCE [DEST]')),   "revert": (revert, [], _('hgtk revert [FILE]...')),   "forget": (forget, [], _('hgtk forget [FILE]...')),   "^serve":   (serve,   [('', 'web-conf', '',   _('name of the hgweb config file (serve more than one repository)')),   ('', 'webdir-conf', '',   _('name of the hgweb config file (DEPRECATED)'))],   _('hgtk serve [OPTION]...')),   "thgstatus": (thgstatus,   [('', 'delay', None, _('wait until the second ticks over')),   ('n', 'notify', [], _('notify the shell for paths given')),   ('', 'remove', None, _('remove the status cache')), - ('s', 'show', None, _('show the contents of the' - ' status cache (no update)')), + ('s', 'show', None, _('show the contents of the ' + 'status cache (no update)')),   ('', 'all', None, _('udpate all repos in current dir')) ],   _('hgtk thgstatus [OPTION]')),   "^update|checkout|co": (update,   [('r', 'rev', [], _('revision to update'))],   ('hgtk update')),   "^vdiff": (vdiff,   [('c', 'change', '', _('changeset to view in diff tool')),   ('r', 'rev', [], _('revisions to view in diff tool')),   ('b', 'bundle', '', _('bundle file to preview'))],   _('launch visual diff tool')),   "^version": (version,   [('v', 'verbose', None, _('print license'))],   _('hgtk version [OPTION]')),   "debugcomplete": (debugcomplete,   [('o', 'options', None, _('show the command options'))],   _('[-o] CMD')),   "help": (help_, [], _('hgtk help [COMMAND]')),   "archive": (archive,   [('r', 'rev', '', _('revision to update'))],   ('hgtk archive')),   "strip": (strip, [], ('hgtk strip [REV]')),   "^mpatch": (mpatch, [], ('hgtk mpatch file.rej')),   "import": (thgimport,   [('', 'repo', False, _('import to the repository')),   ('', 'mq', False, _('import to the patch queue (MQ)'))],   _('hgtk import [OPTION] [SOURCE]...')),  }    if os.name == 'nt':   # TODO: extra detection to determine if shell extension is installed   table['shellconfig'] = (shellconfig, [], _('hgtk shellconfig'))
 
194
195
196
197
198
 
 
199
200
201
 
213
214
215
216
217
 
 
218
219
220
 
194
195
196
 
 
197
198
199
200
201
 
213
214
215
 
 
216
217
218
219
220
@@ -194,8 +194,8 @@
  def before_close(self):   if len(self.repo.parents()) == 2:   ret = gdialog.Confirm(_('Confirm Exit'), [], self, - _('To complete merging, you need to commit' - ' merged files in working directory.\n\n' + _('To complete merging, you need to commit ' + 'merged files in working directory.\n\n'   'Do you want to exit?')).run()   if ret != gtk.RESPONSE_YES:   return False @@ -213,8 +213,8 @@
  # '.' is safer than self.localrev, in case the user has   # pulled a fast one on us and updated from the CLI   ret = gdialog.Confirm(_('Confirm Discard Changes'), [], self, - _('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.otherframe.get_data('revid'))).run()   if ret != gtk.RESPONSE_YES:
 
56
57
58
59
60
 
 
61
62
63
 
56
57
58
 
 
59
60
61
62
63
@@ -56,8 +56,8 @@
  self._toolbutton(gtk.STOCK_UNDO,   _('Rollback'),   self._rollback_clicked, - tip=_('Rollback (undo) last transaction to' - ' repository (pull, commit, etc)')), + tip=_('Rollback (undo) last transaction to ' + 'repository (pull, commit, etc)')),   gtk.SeparatorToolItem(),   self._toolbutton(gtk.STOCK_CLEAR,   _('Recover'),
 
365
366
367
368
369
 
 
370
371
372
 
365
366
367
 
 
368
369
370
371
372
@@ -365,8 +365,8 @@
  _('name to show in web pages (default: working dir)')),   ('', 'web-conf', '',   _('name of the hgweb config file (serve more than one repository)')), - ('', 'webdir-conf', '', _('name of the webdir config file' - ' (DEPRECATED)')), + ('', 'webdir-conf', '', _('name of the webdir config file ' + '(DEPRECATED)')),   ('', 'pid-file', '', _('name of file to write process ID to')),   ('', 'stdio', None, _('for remote clients')),   ('t', 'templates', '', _('web templates to use')),
 
23
24
25
26
27
28
29
 
149
150
151
152
 
153
154
155
 
189
190
191
192
 
193
194
195
 
208
209
210
211
212
 
 
213
214
215
 
23
24
25
 
26
27
28
 
148
149
150
 
151
152
153
154
 
188
189
190
 
191
192
193
194
 
207
208
209
 
 
210
211
212
213
214
@@ -23,7 +23,6 @@
    self.set_default_size(400, -1)   self.set_title(_('TortoiseHg Shell Configuration')) - self.setWindowIcon(qtlib.geticon('detect_rename'))     okay = gtk.Button(_('OK'))   cancel = gtk.Button(_('Cancel')) @@ -149,7 +148,7 @@
  hbox = gtk.HBox()   tvbox.pack_start(hbox, False, False, 2)   hbox.pack_start(gtk.Label( - _('Warning: affects all Tortoises, logoff required after change')), + _('Warning: affects all Tortoises, logoff required after change')),   False, False, 2)     hbox = gtk.HBox() @@ -189,7 +188,7 @@
  hbox = gtk.HBox()   tvbox.pack_start(hbox, False, False, 2)   hbox.pack_start(gtk.Label( - _('*: not used by TortoiseHg')), + _('*: not used by TortoiseHg')),   False, False, 2)     ## Taskbar group @@ -208,8 +207,8 @@
  # Tooltips   tips = gtklib.Tooltips()   - tooltip = _('Do not show menu items on unversioned folders' - ' (use shift + click to override)') + tooltip = _('Do not show menu items on unversioned folders ' + '(use shift + click to override)')   tips.set_tip(self.hide_context_menu, tooltip)   tooltip = _('Show overlay icons in Mercurial repositories')   tips.set_tip(self.ovenable, tooltip)
 
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
 
172
173
174
175
176
 
 
177
178
179
 
192
193
194
195
196
 
 
 
197
198
199
 
202
203
204
205
206
 
 
207
208
209
 
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
 
172
173
174
 
 
175
176
177
178
179
 
192
193
194
 
 
195
196
197
198
199
200
 
203
204
205
 
 
206
207
208
209
210
@@ -56,29 +56,29 @@
  self.toolbutton(gtk.STOCK_GO_DOWN,   _('Incoming'),   self.incoming_clicked, - tip=_('Display changes that can be pulled' - ' from selected repository')), + tip=_('Display changes that can be pulled ' + 'from selected repository')),   self.toolbutton(gtk.STOCK_GOTO_BOTTOM,   _(' Pull '),   self.pull_clicked, - tip=_('Pull changes from selected' - ' repository')), + tip=_('Pull changes from selected ' + 'repository')),   gtk.SeparatorToolItem(),   self.toolbutton(gtk.STOCK_GO_UP,   _('Outgoing'),   self.outgoing_clicked,   tip=_('Display local changes that will be ' - ' pushed to selected repository')), + 'pushed to selected repository')),   self.toolbutton(gtk.STOCK_GOTO_TOP,   _('Push'),   self.push_clicked, - tip=_('Push local changes to selected' - ' repository')), + tip=_('Push local changes to selected ' + 'repository')),   self.toolbutton(gtk.STOCK_GOTO_LAST,   _('Email'),   self.email_clicked, - tip=_('Email local outgoing changes to' - ' one or more recipients')), + tip=_('Email local outgoing changes to ' + 'one or more recipients')),   self.toolbutton(gtk.STOCK_UNDO,   _('Shelve'),   self.shelve_clicked, @@ -172,8 +172,8 @@
  ## checkbox options   chkopthbox = gtk.HBox()   self.force = gtk.CheckButton(_('Force pull or push')) - self.tips.set_tip(self.force, _('Run even when remote repository' - ' is unrelated.')) + self.tips.set_tip(self.force, + _('Run even when remote repository is unrelated.'))   self.newbranch = gtk.CheckButton(_('Push new branch'))   self.tips.set_tip(self.newbranch, _('Allow pushing a new branch'))   self.use_proxy = gtk.CheckButton(_('Use proxy server')) @@ -192,8 +192,9 @@
  revhbox.pack_start(self.reventry, True, True, 2)   reveventbox = gtk.EventBox()   reveventbox.add(revhbox) - self.tips.set_tip(reveventbox, _('A specific revision up to which you' - ' would like to push or pull.')) + self.tips.set_tip(reveventbox, + _('A specific revision up to which you ' + 'would like to push or pull.'))     ## remote command option   cmdhbox = gtk.HBox() @@ -202,8 +203,8 @@
  cmdhbox.pack_start(self.cmdentry, True, True, 2)   cmdeventbox = gtk.EventBox()   cmdeventbox.add(cmdhbox) - self.tips.set_tip(cmdeventbox, _('Name of hg executable on remote' - ' machine.')) + self.tips.set_tip(cmdeventbox, + _('Name of hg executable on remote machine.'))     revvbox = gtk.VBox()   revvbox.pack_start(chkopthbox, False, False, 8)
 
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
 
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
 
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
 
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
@@ -43,192 +43,192 @@
  (_('UI Language'), 'tortoisehg.ui.language', i18n.availablelanguages(),   _('Specify your preferred user interface language (restart needed)')),   (_('Three-way Merge Tool'), 'ui.merge', [], - _('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')),   (_('Visual Diff Tool'), 'tortoisehg.vdiff', [], - _('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.')),   (_('Visual Editor'), 'tortoisehg.editor', [],   _('Specify the visual editor used to view files, etc')),   (_('CLI Editor'), 'ui.editor', [], - _('The editor to use during a commit and other instances where' - ' Mercurial needs multiline input from the user. Used by' - ' command line commands, including patch import.')), + _('The editor to use during a commit and other instances where ' + 'Mercurial needs multiline input from the user. Used by ' + 'command line commands, including patch import.')),   (_('Tab Width'), 'tortoisehg.tabwidth', [], - _('Specify the number of spaces that tabs expand to in various' - ' TortoiseHg windows.' - ' Default: Not expanded')), + _('Specify the number of spaces that tabs expand to in various ' + 'TortoiseHg windows. ' + 'Default: Not expanded')),   (_('Max Diff Size'), 'tortoisehg.maxdiff', ['1024', '0'],   _('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)')),   (_('Bottom Diffs'), 'gtools.diffbottom', ['False', 'True'], - _('Show the diff panel below the file list in status, shelve, and' - ' commit dialogs.' - ' Default: False (show diffs to right of file list)')), + _('Show the diff panel below the file list in status, shelve, and ' + 'commit dialogs. ' + 'Default: False (show diffs to right of file list)')),   (_('Capture stderr'), 'tortoisehg.stderrcapt', ['True', 'False'], - _('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')),   (_('Fork hgtk'), 'tortoisehg.hgtkfork', ['True', 'False'], - _('When running hgtk from the command line, fork a background' - ' process to run graphical dialogs. Default: True')), + _('When running hgtk from the command line, fork a background ' + 'process to run graphical dialogs. Default: True')),   (_('Full Path Title'), 'tortoisehg.fullpath', ['False', 'True'], - _('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')),   ) + (gtklib.hasspellcheck() and   ((_('Spell Check Language'), 'tortoisehg.spellcheck', [], - _('Default language for spell check. System language is' - ' used if not specified. Examples: en, en_GB, en_US')),) or ())), + _('Default language for spell check. System language is ' + 'used if not specified. Examples: en, en_GB, en_US')),) or ())),    ({'name': 'commit', 'label': _('Commit'), 'icon': 'menucommit.ico'}, (   (_('Username'), 'ui.username', [],   _('Name associated with commits')),   (_('Summary Line Length'), 'tortoisehg.summarylen', ['0', '70'], - _('Maximum length of the commit message summary line.' - ' If set, TortoiseHg will issue a warning if the' - ' summary line is too long or not separated by a' - ' blank line. Default: 0 (unenforced)')), + _('Maximum length of the commit message summary line. ' + 'If set, TortoiseHg will issue a warning if the ' + 'summary line is too long or not separated by a ' + 'blank line. Default: 0 (unenforced)')),   (_('Message Line Length'), 'tortoisehg.messagewrap', ['0', '80'], - _('Word wrap length of the commit message. If' - ' set, the popup menu can be used to format' - ' the message and a warning will be issued' - ' if any lines are too long at commit.' - ' Default: 0 (unenforced)')), + _('Word wrap length of the commit message. If ' + 'set, the popup menu can be used to format ' + 'the message and a warning will be issued ' + 'if any lines are too long at commit. ' + 'Default: 0 (unenforced)')),   (_('Close After Commit'), 'tortoisehg.closeci', ['False', 'True'], - _('Close the commit tool after every successful' - ' commit. Default: False')), + _('Close the commit tool after every successful ' + 'commit. Default: False')),   (_('Push After Commit'), 'tortoisehg.pushafterci', ['False', 'True'], - _('Attempt to push to default push target after every successful' - ' commit. Default: False')), + _('Attempt to push to default push target after every successful ' + 'commit. Default: False')),   (_('Auto Commit List'), 'tortoisehg.autoinc', [], - _('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)')),   (_('Auto Exclude List'), 'tortoisehg.ciexclude', [], - _('Comma separated list of files that are automatically unchecked' - ' when the status, commit, and shelve dialogs are opened.' - ' Default: None (leave blank)')), + _('Comma separated list of files that are automatically unchecked ' + 'when the status, commit, and shelve dialogs are opened. ' + 'Default: None (leave blank)')),   (_('English Messages'), 'tortoisehg.engmsg', ['False', 'True'], - _('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')),   (_('Default Tab'), 'tortoisehg.statustab', ['0', '1', '2'], - _('The tab on which the status and commit tools will open.' - ' 0 - TextDiff, 1 - Hunk Selection, 2 - Commit Preview.' - ' Default: 0')), + _('The tab on which the status and commit tools will open. ' + '0 - TextDiff, 1 - Hunk Selection, 2 - Commit Preview. ' + 'Default: 0')),   )),    ({'name': 'log', 'label': _('Repository Explorer'),   'icon': 'menulog.ico'}, (   (_('Author Coloring'), 'tortoisehg.authorcolor', ['False', 'True'], - _('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')),   (_('Long Summary'), 'tortoisehg.longsummary', ['False', 'True'], - _('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')),   (_('Log Batch Size'), 'tortoisehg.graphlimit', ['500'], - _('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')),   (_('Dead Branches'), 'tortoisehg.deadbranch', [], - _('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)')),   (_('Branch Colors'), 'tortoisehg.branchcolors', [], - _('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)')),   (_('Hide Tags'), 'tortoisehg.hidetags', [], - _('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)')), + _('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)')),   (_('Use Expander'), 'tortoisehg.changeset-expander', ['False', 'True'],   _('Show changeset details with an expander')),   (_('Toolbar Style'), 'tortoisehg.logtbarstyle',   ['small', 'large', 'theme'], - _('Adjust the display of the main toolbar in the Repository' - ' Explorer. Values: small, large, or theme. Default: theme')), + _('Adjust the display of the main toolbar in the Repository ' + 'Explorer. Values: small, large, or theme. Default: theme')),  # (_('F/S Encodings'), 'tortoisehg.fsencodings', [], -# _('Comma separated list of encodings used for filenames' -# ' on this computer. Default: none')), +# _('Comma separated list of encodings used for filenames ' +# 'on this computer. Default: none')),   )),    ({'name': 'sync', 'label': _('Synchronize'), 'icon': 'menusynch.ico',   'extra': True}, (   (_('After Pull Operation'), 'tortoisehg.postpull',   ['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': 'web', 'label': _('Web Server'), 'icon': 'proxy.ico'}, (   (_('Name'), 'web.name', ['unknown'], - _('Repository name to use in the web interface.' - ' Default is the working directory.')), + _('Repository name to use in the web interface. ' + 'Default is the working directory.')),   (_('Description'), 'web.description', ['unknown'], - _("Textual description of the repository's purpose or" - ' contents.')), + _("Textual description of the repository's purpose or " + 'contents.')),   (_('Contact'), 'web.contact', ['unknown'], - _('Name or email address of the person in charge of the' - ' repository.')), + _('Name or email address of the person in charge of the ' + 'repository.')),   (_('Style'), 'web.style',   ['paper', 'monoblue', 'coal', 'spartan', 'gitweb', 'old'],   _('Which template map style to use')),   (_('Archive Formats'), 'web.allow_archive', ['bz2', 'gz', 'zip'], - _('Comma separated list of archive formats allowed for' - ' downloading')), + _('Comma separated list of archive formats allowed for ' + 'downloading')),   (_('Port'), 'web.port', ['8000'], _('Port to listen on')),   (_('Push Requires SSL'), 'web.push_ssl', ['True', 'False'], - _('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.')),   (_('Stripes'), 'web.stripes', ['1', '0'], - _('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.')),   (_('Max Files'), 'web.maxfiles', ['10'],   _('Maximum number of files to list per changeset.')),   (_('Max Changes'), 'web.maxchanges', ['10'],   _('Maximum number of changes to list on the changelog.')),   (_('Allow Push'), 'web.allow_push', ['*'], - _('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.')),   (_('Deny Push'), 'web.deny_push', ['*'], - _('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.')),   (_('Encoding'), 'web.encoding', ['UTF-8'],   _('Character encoding name')),   )),    ({'name': 'proxy', 'label': _('Proxy'), 'icon': 'general.ico'}, (   (_('Host'), 'http_proxy.host', [], - _('Host name and (optional) port of proxy server, for' - ' example "myproxy:8000"')), + _('Host name and (optional) port of proxy server, for ' + 'example "myproxy:8000"')),   (_('Bypass List'), 'http_proxy.no', [], - _('Optional. Comma-separated list of host names that' - ' should bypass the proxy')), + _('Optional. Comma-separated list of host names that ' + 'should bypass the proxy')),   (_('User'), 'http_proxy.user', [],   _('Optional. User name to authenticate with at the proxy server')),   (_('Password'), 'http_proxy.passwd', [], @@ -237,82 +237,82 @@
   ({'name': 'email', 'label': _('Email'), 'icon': gtk.STOCK_GOTO_LAST}, (   (_('From'), 'email.from', [], - _('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')),   (_('To'), 'email.to', [],   _('Comma-separated list of recipient email addresses')),   (_('Cc'), 'email.cc', [],   _('Comma-separated list of carbon copy recipient email addresses')),   (_('Bcc'), 'email.bcc', [], - _('Comma-separated list of blind carbon copy recipient' - ' email addresses')), + _('Comma-separated list of blind carbon copy recipient ' + 'email addresses')),   (_('method'), 'email.method', ['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.')),   (_('SMTP Host'), 'smtp.host', [], _('Host name of mail server')),   (_('SMTP Port'), 'smtp.port', ['25'], - _('Port to connect to on mail server.' - ' Default: 25')), + _('Port to connect to on mail server. ' + 'Default: 25')),   (_('SMTP TLS'), 'smtp.tls', ['False', 'True'], - _('Connect to mail server using TLS.' - ' Default: False')), + _('Connect to mail server using TLS. ' + 'Default: False')),   (_('SMTP Username'), 'smtp.username', [],   _('Username to authenticate to mail server with')),   (_('SMTP Password'), 'smtp.password', [],   _('Password to authenticate to mail server with')),   (_('Local Hostname'), 'smtp.local_hostname', [], - _('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': gtk.STOCK_JUSTIFY_FILL}, (   (_('Patch EOL'), 'patch.eol', ['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')),   (_('Git Format'), 'diff.git', ['False', 'True'], - _('Use git extended diff header format.' - ' Default: False')), + _('Use git extended diff header format. ' + 'Default: False')),   (_('No Dates'), 'diff.nodates', ['False', 'True'], - _('Do not include modification dates in diff headers.' - ' Default: False')), + _('Do not include modification dates in diff headers. ' + 'Default: False')),   (_('Show Function'), 'diff.showfunc', ['False', 'True'], - _('Show which function each change is in.' - ' Default: False')), + _('Show which function each change is in. ' + 'Default: False')),   (_('Ignore White Space'), 'diff.ignorews', ['False', 'True'], - _('Ignore white space when comparing lines.' - ' Default: False')), + _('Ignore white space when comparing lines. ' + 'Default: False')),   (_('Ignore WS Amount'), 'diff.ignorewsamount', ['False', 'True'], - _('Ignore changes in the amount of white space.' - ' Default: False')), + _('Ignore changes in the amount of white space. ' + 'Default: False')),   (_('Ignore Blank Lines'), 'diff.ignoreblanklines', ['False', 'True'], - _('Ignore changes whose lines are all blank.' - ' Default: False')), + _('Ignore changes whose lines are all blank. ' + 'Default: False')),   (_('Coloring Style'), 'tortoisehg.diffcolorstyle',   ['none', 'foreground', 'background'], - _('Adjust the coloring style of diff lines in the changeset' - ' viewer. Default: foreground')), + _('Adjust the coloring style of diff lines in the changeset ' + 'viewer. Default: foreground')),   )),    ({'name': 'font', 'label': _('Font'), 'icon': gtk.STOCK_SELECT_FONT,   'extra': True, 'width': 16}, (   (_('Commit Message'), 'gtools.fontcomment', [], - _('Font used in changeset viewer and commit log text.' - ' Default: monospace 10')), + _('Font used in changeset viewer and commit log text. ' + 'Default: monospace 10')),   (_('Diff Text'), 'gtools.fontdiff', [], - _('Font used for diffs in status and commit tools.' - ' Default: monospace 10')), + _('Font used for diffs in status and commit tools. ' + 'Default: monospace 10')),   (_('File List'), 'gtools.fontlist', [], - _('Font used in file lists in status and commit tools.' - ' Default: sans 9')), + _('Font used in file lists in status and commit tools. ' + 'Default: sans 9')),   (_('Command Output'), 'gtools.fontlog', [], - _('Font used in command output window.' - ' Default: monospace 10')), + _('Font used in command output window. ' + 'Default: monospace 10')),   )),    ({'name': 'extensions', 'label': _('Extensions'), 'icon': gtk.STOCK_EXECUTE,
 
158
159
160
161
 
162
163
164
 
158
159
160
 
161
162
163
164
@@ -158,7 +158,7 @@
  dialog = gtklib.MessageDialog(flags=gtk.DIALOG_MODAL)   dialog.set_title(_('Shelve'))   dialog.set_markup(_('<b>Shelve file exists!</b>')) - dialog.add_buttons(_('Overwrite'), 1, + dialog.add_buttons(_('Replace'), 1,   _('Append'), 2,   _('Cancel'), -1)   dialog.set_transient_for(self)
 
86
87
88
89
90
 
 
91
92
93
 
109
110
111
112
113
 
 
114
115
116
 
212
213
214
215
216
 
 
217
218
219
 
86
87
88
 
 
89
90
91
92
93
 
109
110
111
 
 
112
113
114
115
116
 
212
213
214
 
 
215
216
217
218
219
@@ -86,8 +86,8 @@
  self.expander.connect('notify::expanded', self.options_expanded)     ### force option (fixed) - self.forceopt = gtk.CheckButton(_('Discard local changes, no backup' - ' (-f/--force)')) + self.forceopt = gtk.CheckButton(_('Discard local changes, no backup ' + '(-f/--force)'))   table.add_row(self.expander, self.forceopt)     # signal handlers @@ -109,8 +109,8 @@
  self.butable.add_row(None, radio, ypad=0)   return radio   self.buopt_all = add_type(_('Backup all (default)')) - self.buopt_part = add_type(_('Backup unrelated changesets' - ' (-b/--backup)')) + self.buopt_part = add_type(_('Backup unrelated changesets ' + '(-b/--backup)'))   self.buopt_none = add_type(_('No backup (-n/--nobackup)'))     # layout group @@ -212,8 +212,8 @@
  else:   if not isclean():   ret = gdialog.CustomPrompt(_('Confirm Strip'), - _('Detected uncommitted local changes.\nDo' - ' you want to discard them and continue?'), + _('Detected uncommitted local changes.\nDo ' + 'you want to discard them and continue?'),   self, (_('&Yes (--force)'), _('&No')),   default=1, esc=1).run()   if ret == 0:
 
367
368
369
370
371
 
 
372
373
374
 
367
368
369
 
 
370
371
372
373
374
@@ -367,8 +367,8 @@
  self.copies = cpy   self.ui = repo.ui   - lbl = gtk.Label(_('Temporary files are removed when this dialog' - ' is closed')) + lbl = gtk.Label(_('Temporary files are removed when this dialog ' + 'is closed'))   self.vbox.pack_start(lbl, False, False, 2)     scroller = gtk.ScrolledWindow()
 
176
177
178
179
 
180
181
182
 
176
177
178
 
179
180
181
182
@@ -176,7 +176,7 @@
  return type, rawpath.split('/', 1)[-1]     files = {} - pf = open(self._path) + pf = open(self._path, 'rb')   try:   try:   # consume comments and headers
 
180
181
182
183
184
185
186
187
188
189
190
191
 
 
192
193
194
 
180
181
182
 
 
 
 
183
184
185
 
 
186
187
188
189
190
@@ -180,15 +180,11 @@
    if not self.rej:   return - if self.hunks != 1: - hunkstr = "s" - else: - hunkstr = ""     fname = self.fname + ".rej"   self.ui.warn( - _("%d out of %d hunk%s FAILED -- saving rejects to file %s\n") % - (len(self.rej), self.hunks, hunkstr, fname)) + _("%d out of %d hunks FAILED -- saving rejects to file %s\n") % + (len(self.rej), self.hunks, fname))   try: os.unlink(fname)   except:   pass