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

stable merge with stable

Changeset fd01a9e93088

Parents 48b3beacadef

Parents ab212f172fb0

by Giampaolo Fadel

Changes to 3 files · Browse files at fd01a9e93088 Showing diff from parent 48b3beacadef ab212f172fb0 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​hgtk.py Stacked
 
658
659
660
661
 
662
663
664
 
685
686
687
688
 
689
690
691
 
658
659
660
 
661
662
663
664
 
685
686
687
 
688
689
690
691
@@ -658,7 +658,7 @@
  [('l', 'limit', '', _('limit number of changes displayed'))],   _('hgtk log [OPTIONS] [FILE]')),   "^merge": (merge, - [('r', 'rev', '', _('revision to update'))], + [('r', 'rev', None, _('revision to merge with'))],   _('hgtk merge')),   "^recovery|rollback|verify": (recovery, [], _('hgtk recovery')),   "^shelve|unshelve": (shelve, [], _('hgtk shelve')), @@ -685,7 +685,7 @@
  ('', 'all', None, _('udpate all repos in current dir')) ],   _('hgtk thgstatus [OPTION]')),   "^update|checkout|co": (update, - [('r', 'rev', '', _('revision to update'))], + [('r', 'rev', None, _('revision to update'))],   ('hgtk update')),   "^vdiff": (vdiff,   [('c', 'change', '', _('changeset to view in diff tool')),
Change 1 of 1 Show Changes Only hggtk/​update.py Stacked
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
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
 # update.py - TortoiseHg's dialog for updating repo  #  # Copyright 2007 TK Soh <teekaysoh@gmail.com>  # Copyright 2007 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  import gtk  import gobject    from mercurial import hg, ui    from thgutil.i18n import _  from thgutil import hglib, paths    from hggtk import hgcmd, gtklib    _branch_tip_ = _('= Current Branch Tip =')    class UpdateDialog(gtk.Window):   """ Dialog to update Mercurial repo """   def __init__(self, rev=None):   """ Initialize the Dialog """   gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)   gtklib.set_tortoise_icon(self, 'menucheckout.ico')   gtklib.set_tortoise_keys(self)     self.set_default_size(350, 120)   self.notify_func = None     try:   repo = hg.repository(ui.ui(), path=paths.find_root())   except hglib.RepoError:   gobject.idle_add(self.destroy)   return     title = _('Update - %s') % hglib.toutf(os.path.basename(repo.root))   self.set_title(title)     vbox = gtk.VBox()   self.add(vbox)     hbox = gtk.HBox()   lbl = gtk.Label(_('Update to:'))   hbox.pack_start(lbl, False, False, 2)     # revisions editable combo box   combo = gtk.combo_box_entry_new_text()   hbox.pack_start(combo, True, True, 2)   vbox.pack_start(hbox, False, False, 10) - if rev: + if rev != None:   combo.append_text(str(rev))   else:   combo.append_text(_branch_tip_)   combo.set_active(0)   for b in repo.branchtags():   combo.append_text(b)   tags = list(repo.tags())   tags.sort()   tags.reverse()   for t in tags:   combo.append_text(t)     self.overwrite = gtk.CheckButton(_('Overwrite local changes (--clean)'))   vbox.pack_start(self.overwrite, False, False, 10)     hbbox = gtk.HButtonBox()   hbbox.set_layout(gtk.BUTTONBOX_END)   vbox.pack_start(hbbox, False, False, 2)   close = gtk.Button(_('Close'))   close.connect('clicked', lambda x: self.destroy())     accelgroup = gtk.AccelGroup()   self.add_accel_group(accelgroup)   key, modifier = gtk.accelerator_parse('Escape')   close.add_accelerator('clicked', accelgroup, key, 0,   gtk.ACCEL_VISIBLE)   hbbox.add(close)     update = gtk.Button(_('Update'))   update.connect('clicked', self.update, combo, repo)   mod = gtklib.get_thg_modifier()   key, modifier = gtk.accelerator_parse(mod+'Return')   update.add_accelerator('clicked', accelgroup, key, modifier,   gtk.ACCEL_VISIBLE)   hbbox.add(update)   update.grab_focus()     entry = combo.child   entry.connect('activate', self.entry_activated, update, combo, repo)     def entry_activated(self, entry, button, combo, repo):   self.update(button, combo, repo)     def update(self, button, combo, repo):   overwrite = self.overwrite.get_active()   rev = combo.get_active_text()     cmdline = ['hg', 'update', '--verbose']   if rev != _branch_tip_:   cmdline.append('--rev')   cmdline.append(rev)   if overwrite:   cmdline.append('--clean')   dlg = hgcmd.CmdDialog(cmdline)   dlg.run()   dlg.hide()   if self.notify_func:   self.notify_func(self.notify_args)   if dlg.returncode == 0:   self.destroy()     def set_notify_func(self, func, *args):   self.notify_func = func   self.notify_args = args    def run(ui, *pats, **opts):   return UpdateDialog(opts.get('rev'))
 
517
518
519
 
520
 
 
 
 
521
522
523
 
517
518
519
520
521
522
523
524
525
526
527
528
@@ -517,7 +517,12 @@
  }   else if (uFlags == GCS_VERBW || uFlags == GCS_VERBA)   { +#if 0   psz = iter->second.name.c_str(); +#else + // bugfix: don't provide verbs ("rename" conflicted with rename of explorer) + psz = ""; +#endif   res = S_OK;   }   else if (uFlags == GCS_VALIDATEW || uFlags == GCS_VALIDATEA)