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

Merge with Yuki

Changeset 79e07253b822

Parents 209a98577d93

Parents 0b48ab113179

by Steve Borho

Changes to 7 files · Browse files at 79e07253b822 Showing diff from parent 209a98577d93 0b48ab113179 Diff from another changeset...

 
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
 
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
@@ -15,196 +15,253 @@
 from tortoisehg.util.i18n import _  from tortoisehg.util import hglib, paths   -from tortoisehg.hgtk import hgcmd, gtklib +from tortoisehg.hgtk import hgcmd, gtklib, gdialog   -_working_dir_parent_ = _('= Working Directory Parent =') +WD_PARENT = _('= Working Directory Parent =') +MODE_NORMAL = 'normal' +MODE_WORKING = 'working'   -class ArchiveDialog(gtk.Window): +class ArchiveDialog(gtk.Dialog):   """ Dialog to archive a Mercurial repo """ +   def __init__(self, rev=None):   """ Initialize the Dialog """ - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) + gtk.Dialog.__init__(self)   gtklib.set_tortoise_icon(self, 'menucheckout.ico')   gtklib.set_tortoise_keys(self) + self.set_resizable(False) + self.set_has_separator(False) + self.connect('response', self.dialog_response)   - self.set_default_size(550, 120) - self.notify_func = None + # buttons + self.archivebtn = self.add_button(_('Archive'), gtk.RESPONSE_OK) + self.closebtn = self.add_button(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)     try:   repo = hg.repository(ui.ui(), path=paths.find_root())   except hglib.RepoError:   gobject.idle_add(self.destroy)   return + self.set_title(_('Archive - %s') % hglib.get_reponame(repo))   - title = _('Archive - %s') % hglib.toutf(os.path.basename(repo.root)) - self.set_title(title) + # layout table + self.table = table = gtklib.LayoutTable() + self.vbox.pack_start(table, True, True, 2)   - vbox = gtk.VBox() - self.add(vbox) - - hbox = gtk.HBox() - lbl = gtk.Label(_('Archive revision:')) - 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) + ## revision combo + self.combo = gtk.combo_box_entry_new_text() + self.combo.child.set_width_chars(24) + self.combo.child.connect('activate', + lambda b: self.response(gtk.RESPONSE_OK))   if rev: - combo.append_text(str(rev)) + self.combo.append_text(str(rev))   else: - combo.append_text(_working_dir_parent_) - combo.set_active(0) + self.combo.append_text(WD_PARENT) + self.combo.set_active(0)   for b in repo.branchtags(): - combo.append_text(b) + self.combo.append_text(b)   tags = list(repo.tags())   tags.sort()   tags.reverse()   for t in tags: - combo.append_text(t) + self.combo.append_text(t)   - vbox.add(self.get_destination_container(self.get_default_path())) - vbox.add(self.get_type_container()) + table.add_row(_('Archive revision:'), self.combo)   - 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) - - archive = gtk.Button(_('Archive')) - archive.connect('clicked', self.archive, combo, repo) - mod = gtklib.get_thg_modifier() - key, modifier = gtk.accelerator_parse(mod+'Return') - archive.add_accelerator('clicked', accelgroup, key, modifier, - gtk.ACCEL_VISIBLE) - hbbox.add(archive) - archive.grab_focus() - - entry = combo.child - entry.connect('activate', self.entry_activated, archive, combo, repo) - - def get_type_container(self): - """Return a frame containing the supported archive types""" - frame = gtk.Frame(_('Archive type')) - vbox = gtk.VBox() - - self.filesradio = gtk.RadioButton(None, _('Directory of files')) - self.tarradio = gtk.RadioButton(self.filesradio, _('Uncompressed tar archive')) - self.tbz2radio = gtk.RadioButton(self.filesradio, _('Tar archive compressed using bzip2')) - self.tgzradio = gtk.RadioButton(self.filesradio, _('Tar archive compressed using gzip')) - self.uzipradio = gtk.RadioButton(self.filesradio, _('Uncompressed zip archive')) - self.zipradio = gtk.RadioButton(self.filesradio, _('Zip archive compressed using deflate')) - - vbox.pack_start(self.filesradio, True, True, 2) - vbox.pack_start(self.tarradio, True, True, 2) - vbox.pack_start(self.tbz2radio, True, True, 2) - vbox.pack_start(self.tgzradio, True, True, 2) - vbox.pack_start(self.uzipradio, True, True, 2) - vbox.pack_start(self.zipradio, True, True, 2) - frame.add(vbox) - frame.set_border_width(2) - return frame - - def get_destination_container(self, default_path): - """Return an hbox containing the widgets for the destination path""" - hbox = gtk.HBox() - lbl = gtk.Label(_('Destination Path:')) - - # create drop-down list for source paths - self.destlist = gtk.ListStore(str) - destcombo = gtk.ComboBoxEntry(self.destlist, 0) + ## dest combo & browse button + destcombo = gtk.combo_box_entry_new_text()   self.destentry = destcombo.get_child() - self.destentry.set_text(default_path) - self.destentry.set_position(-1) - - # replace the drop-down widget so we can modify it's properties - destcombo.clear() - cell = gtk.CellRendererText() - cell.set_property('ellipsize', pango.ELLIPSIZE_MIDDLE) - destcombo.pack_start(cell) - destcombo.add_attribute(cell, 'text', 0) + self.destentry.set_width_chars(46)     destbrowse = gtk.Button(_('Browse...'))   destbrowse.connect('clicked', self.browse_clicked) - hbox.pack_start(lbl, False, False) - hbox.pack_start(destcombo, True, True, 2) - hbox.pack_end(destbrowse, False, False, 5) - return hbox   - def get_default_path(self): - """Return the default destination path""" - return hglib.toutf(os.getcwd()) + table.add_row(_('Destination path:'), destcombo, 0, destbrowse)   - def get_save_file_dialog(self, filter): - """Return a configured save file dialog""" - return gtklib.NativeSaveFileDialogWrapper( - InitialDir=self.destentry.get_text(), - Title=_('Select Destination File'), - Filter=filter) + ## archive types + self.filesradio = gtk.RadioButton(None, _('Directory of files')) + self.filesradio.connect('toggled', self.type_changed) + table.add_row(_('Archive types:'), self.filesradio) + def add_type(label): + radio = gtk.RadioButton(self.filesradio, label) + radio.connect('toggled', self.type_changed) + table.add_row(None, radio) + return radio + self.tarradio = add_type(_('Uncompressed tar archive')) + self.tbz2radio = add_type(_('Tar archive compressed using bzip2')) + self.tgzradio = add_type(_('Tar archive compressed using gzip')) + self.uzipradio = add_type(_('Uncompressed zip archive')) + self.zipradio = add_type(_('Zip archive compressed using deflate')) + + # register signal handlers + self.combo.connect('changed', lambda c: self.update_path()) + + # prepare to show + self.update_path(hglib.toutf(repo.root)) + self.archivebtn.grab_focus() + gobject.idle_add(self.after_init) + + def after_init(self): + # CmdWidget + self.cmd = hgcmd.CmdWidget() + self.cmd.show_all() + self.cmd.hide() + self.vbox.pack_start(self.cmd, True, True, 6) + + # abort button + self.abortbtn = self.add_button(_('Abort'), gtk.RESPONSE_CANCEL) + self.abortbtn.hide() + + def dialog_response(self, dialog, response_id): + def abort(): + self.cmd.stop() + self.cmd.show_log() + self.switch_to(MODE_NORMAL, cmd=False) + # Archive button + if response_id == gtk.RESPONSE_OK: + self.archive() + # Close button or dialog closing by the user + elif response_id in (gtk.RESPONSE_CLOSE, gtk.RESPONSE_DELETE_EVENT): + if self.cmd.is_alive(): + ret = gdialog.Confirm(_('Confirm Abort'), [], self, + _('Do you want to abort?')).run() + if ret == gtk.RESPONSE_YES: + abort() + else: + self.destroy() + return # close dialog + # Abort button + elif response_id == gtk.RESPONSE_CANCEL: + abort() + else: + raise _('unexpected response id: %s') % response_id + + self.run() # doesn't close dialog + + def type_changed(self, radio): + if not radio.get_active(): + return + self.update_path() + + def update_path(self, path=None): + def remove_ext(path): + for ext in ('.tar', '.tar.bz2', '.tar.gz', '.zip'): + if path.endswith(ext): + return path.replace(ext, '') + return path + def remove_rev(path): + model = self.combo.get_model() + for rev in ['_' + rev[0] for rev in model]: + if path.endswith(rev): + return path.replace(rev, '') + return path + def add_rev(path): + rev = self.combo.get_active_text() + return '%s_%s' % (path, rev) + def add_ext(path): + select = self.get_selected_archive_type() + if select['type'] != 'files': + path += select['ext'] + return path + if path is None: + path = self.destentry.get_text() + path = remove_ext(path) + path = remove_rev(path) + path = add_rev(path) + path = add_ext(path) + self.destentry.set_text(path)     def get_selected_archive_type(self):   """Return a dictionary describing the selected archive type""" - dict = {}   if self.tarradio.get_active(): - dict['type'] = 'tar' - dict['filter'] = ((_('Tar archives'), '*.tar'),) + return {'type': 'tar', 'ext': '.tar', + 'label': _('Tar archives')}   elif self.tbz2radio.get_active(): - dict['type'] = 'tbz2' - dict['filter'] = ((_('Bzip2 tar archives'), '*.tbz2'),) + return {'type': 'tbz2', 'ext': '.tar.bz2', + 'label': _('Bzip2 tar archives')}   elif self.tgzradio.get_active(): - dict['type'] = 'tgz' - dict['filter'] = ((_('Gzip tar archives'), '*.tgz'),) + return {'type': 'tgz', 'ext': '.tar.gz', + 'label': _('Gzip tar archives')}   elif self.uzipradio.get_active(): - dict['type'] = 'uzip' - dict['filter'] = ((_('Uncompressed zip archives'), '*.uzip'),) + return {'type': 'uzip', 'ext': '.zip', + 'label': ('Uncompressed zip archives')}   elif self.zipradio.get_active(): - dict['type'] = 'zip' - dict['filter'] = ((_('Compressed zip archives'), '*.zip'),) - else: - dict['type'] = 'files' - - return dict - - def entry_activated(self, entry, button, combo, repo): - self.update(button, combo, repo) + return {'type': 'zip', 'ext': '.zip', + 'label': _('Compressed zip archives')} + return {'type': 'files', 'ext': None, 'label': None}     def browse_clicked(self, button):   """Select the destination directory or file""" - archive_type = self.get_selected_archive_type() - if archive_type['type'] == 'files': + dest = hglib.fromutf(self.destentry.get_text()) + if not os.path.exists(dest): + dest = os.path.dirname(dest) + select = self.get_selected_archive_type() + if select['type'] == 'files':   response = gtklib.NativeFolderSelectDialog( - initial=self.destentry.get_text(), - title=_('Select Destination Folder')).run() + initial=dest, + title=_('Select Destination Folder')).run()   else: - filter = archive_type['filter'] - response = self.get_save_file_dialog(filter).run() - + ext = '*' + select['ext'] + label = '%s (%s)' % (select['label'], ext) + response = gtklib.NativeSaveFileDialogWrapper( + InitialDir=dest, + Title=_('Select Destination File'), + Filter=((label, ext), + (_('All Files (*.*)'), '*.*'))).run()   if response:   self.destentry.set_text(response)   - def archive(self, button, combo, repo): - rev = combo.get_active_text() + def switch_to(self, mode, cmd=True): + if mode == MODE_NORMAL: + normal = True + self.closebtn.grab_focus() + elif mode == MODE_WORKING: + normal = False + self.abortbtn.grab_focus() + else: + raise _('unknown mode name: %s') % mode + working = not normal + + self.table.set_sensitive(normal) + self.archivebtn.set_property('visible', normal) + self.closebtn.set_property('visible', normal) + if cmd: + self.cmd.set_property('visible', working) + self.abortbtn.set_property('visible', working) + + def archive(self): + # verify input + type = self.get_selected_archive_type()['type'] + dest = self.destentry.get_text() + if os.path.exists(dest): + if type != 'files': + ret = gdialog.Confirm(_('Confirm Overwrite'), [], self, + _('The destination "%s" already exists!\n\n' + 'Do you want to overwrite it?') % dest).run() + if ret != gtk.RESPONSE_YES: + return False + elif len(os.listdir(dest)) > 0: + ret = gdialog.Confirm(_('Confirm Overwrite'), [], self, + _('The directory "%s" isn\'t empty!\n\n' + 'Do you want to overwrite it?') % dest).run() + if ret != gtk.RESPONSE_YES: + return False     cmdline = ['hg', 'archive', '--verbose'] - if rev != _working_dir_parent_: + rev = self.combo.get_active_text() + if rev != WD_PARENT:   cmdline.append('--rev')   cmdline.append(rev) + cmdline.append('-t') + cmdline.append(type) + cmdline.append(hglib.fromutf(dest))   - cmdline.append('-t') - cmdline.append(self.get_selected_archive_type()['type']) - cmdline.append(hglib.fromutf(self.destentry.get_text())) - - dlg = hgcmd.CmdDialog(cmdline) - dlg.run() - dlg.hide() + def cmd_done(returncode): + self.switch_to(MODE_NORMAL, cmd=False) + if returncode == 0 and not self.cmd.is_show_log(): + self.response(gtk.RESPONSE_CLOSE) + self.switch_to(MODE_WORKING) + self.cmd.execute(cmdline, cmd_done)    def run(ui, *pats, **opts):   return ArchiveDialog(opts.get('rev'))
 
337
338
339
340
341
342
343
344
345
346
 
347
348
349
 
337
338
339
 
 
 
 
 
 
 
340
341
342
343
@@ -337,13 +337,7 @@
  return self.menuitems.get(label, None)     def get_reponame(self): - if self.repo.ui.config('tortoisehg', 'fullpath', False): - name = self.repo.root - elif self.repo.ui.config('web', 'name', False): - name = self.repo.ui.config('web', 'name') - else: - name = os.path.basename(self.repo.root) - return hglib.toutf(name) + return hglib.get_reponame(self.repo)     def helpcontents(self, item):   'User selected Help->Contents from menu bar'
 
24
25
26
 
27
28
29
 
37
38
39
40
41
42
43
 
44
45
46
 
24
25
26
27
28
29
30
 
38
39
40
 
 
 
 
41
42
43
44
@@ -24,6 +24,7 @@
  gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)   gtklib.set_tortoise_icon(self, 'menumerge.ico')   gtklib.set_tortoise_keys(self) + self.set_default_size(350, 120)   self.notify_func = None     if not rev: @@ -37,10 +38,7 @@
  except hglib.RepoError:   gobject.idle_add(self.destroy)   return - - title = _("Merging in ") + hglib.toutf(os.path.basename(repo.root)) - self.set_title(title) - self.set_default_size(350, 120) + self.set_title(_('Merging in %s') % hglib.get_reponame(repo))     vbox = gtk.VBox()   self.add(vbox)
 
26
27
28
 
 
 
29
30
31
32
33
34
35
36
37
38
 
 
 
 
 
 
 
 
39
40
41
 
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
 
165
166
167
168
 
169
170
171
 
26
27
28
29
30
31
32
 
 
 
 
 
 
 
 
 
33
34
35
36
37
38
39
40
41
42
43
 
120
121
122
 
123
124
125
 
 
 
 
 
 
126
127
128
129
130
131
 
132
133
134
135
 
136
137
138
139
 
162
163
164
 
165
166
167
168
@@ -26,16 +26,18 @@
  gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)   gtklib.set_tortoise_icon(self, 'general.ico')   gtklib.set_tortoise_keys(self) + self.set_default_size(600, 400) + self.connect('delete-event', self._delete) + self.hgthread = None   - self.root = paths.find_root() - self.selected_path = None - self.hgthread = None - self.connect('delete-event', self._delete) - - self.set_default_size(600, 400) - - name = os.path.basename(os.path.abspath(self.root)) - self.set_title(_('TortoiseHg Recovery - ') + hglib.toutf(name)) + try: + repo = hg.repository(ui.ui(), path=paths.find_root()) + except hglib.RepoError: + gobject.idle_add(self.destroy) + return + self.repo = repo + self.reponame = hglib.get_reponame(repo) + self.set_title(_('Recovery - %s') % self.reponame)     # toolbar   self.tbar = gtk.Toolbar() @@ -118,25 +120,20 @@
    def _clean_clicked(self, toolbutton, data=None):   response = gdialog.Confirm(_('Confirm clean repository'), [], self, - _("Clean repository '%s' ?") % os.path.basename(self.root)).run() + _("Clean repository '%s' ?") % self.reponame).run()   if response != gtk.RESPONSE_YES:   return - try: - repo = hg.repository(ui.ui(), path=self.root) - except hglib.RepoError: - self.write(_('Unable to find repo at %s\n') % (self.root), False) - return - pl = repo.parents() + pl = self.repo.parents()   cmd = ['update', '--clean', '--rev', str(pl[0].rev())]   self._exec_cmd(cmd, postfunc=self._notify)     def _notify(self, ret, *args):   time.sleep(0.5) # give fs some time to pick up changes - shlib.shell_notify([self.root]) + shlib.shell_notify([self.repo.root])     def _rollback_clicked(self, toolbutton, data=None):   response = gdialog.Confirm(_('Confirm rollback repository'), [], self, - _("Rollback repository '%s' ?") % os.path.basename(self.root)).run() + _("Rollback repository '%s' ?") % self.reponame).run()   if response != gtk.RESPONSE_YES:   return   cmd = ['rollback'] @@ -165,7 +162,7 @@
  cmdline = cmd   cmdline.append('--verbose')   cmdline.append('--repository') - cmdline.append(self.root) + cmdline.append(self.repo.root)     # show command to be executed   self.write("", False)
 
23
24
25
26
27
28
 
 
29
 
30
31
32
33
 
 
34
35
36
 
44
45
46
47
48
49
50
51
 
23
24
25
 
 
 
26
27
28
29
30
31
32
33
34
35
36
37
38
 
46
47
48
 
 
49
50
51
@@ -23,14 +23,16 @@
  """ Dialog to add tag to Mercurial repo """   def __init__(self, repo, tag='', rev=''):   """ Initialize the Dialog """ - root = hglib.toutf(os.path.basename(repo.root)) - gtk.Dialog.__init__(self, title=_('TortoiseHg Tag - %s') % root, - buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) + gtk.Dialog.__init__(self, + buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE))   gtklib.set_tortoise_keys(self) + self.set_title(_('Tag - %s') % hglib.get_reponame(repo))   self.set_resizable(False)   self.set_has_separator(False)   self.connect('response', self.dialog_response)   + self.repo = repo +   # add Add button   addbutton = gtk.Button(_('Add'))   addbutton.connect('clicked', lambda b: self._do_add_tag()) @@ -44,8 +46,6 @@
  # persistent settings   self.settings = settings.Settings('tagadd')   - self.repo = repo -   # top layout table   table = gtklib.LayoutTable()   self.vbox.pack_start(table, True, True, 2)
 
36
37
38
39
40
41
42
43
44
45
 
 
46
47
48
 
36
37
38
 
39
40
41
 
 
 
42
43
44
45
46
@@ -36,13 +36,11 @@
    try:   repo = hg.repository(ui.ui(), path=paths.find_root()) - self.repo = repo   except hglib.RepoError:   gobject.idle_add(self.destroy)   return - - reponame = hglib.toutf(os.path.basename(repo.root)) - self.set_title(_('Update - %s') % reponame) + self.repo = repo + self.set_title(_('Update - %s') % hglib.get_reponame(repo))     # add dialog buttons   self.updatebtn = self.add_button(_('Update'), gtk.RESPONSE_OK)
 
194
195
196
 
 
 
 
 
 
 
 
 
197
198
199
 
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
@@ -194,6 +194,15 @@
  u.setconfig('defaults', k, '')   return dispatch._dispatch(u, list(args))   +def get_reponame(repo): + if repo.ui.config('tortoisehg', 'fullpath', False): + name = repo.root + elif repo.ui.config('web', 'name', False): + name = repo.ui.config('web', 'name') + else: + name = os.path.basename(repo.root) + return toutf(name) +  def displaytime(date):   return util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2')