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 f0acd74b033f

Parents f44365aa3947

Parents 864d59f56d26

by Steve Borho

Changes to 4 files · Browse files at f0acd74b033f Showing diff from parent f44365aa3947 864d59f56d26 Diff from another changeset...

 
42
43
44
 
45
 
46
47
48
 
50
51
52
53
 
54
55
56
 
69
70
71
72
73
 
74
75
76
77
78
79
 
80
81
82
83
84
 
85
86
87
88
 
89
90
91
 
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
 
42
43
44
45
46
47
48
49
50
 
52
53
54
 
55
56
57
58
 
71
72
73
 
 
74
75
76
77
78
79
 
80
81
82
83
84
 
85
86
87
88
 
89
90
91
92
 
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
@@ -42,7 +42,9 @@
  except hglib.RepoError:   gobject.idle_add(self.destroy)   return + self.repo = repo   self.set_title(_('Archive - %s') % hglib.get_reponame(repo)) + self.prevtarget = None     # layout table   self.table = table = gtklib.LayoutTable() @@ -50,7 +52,7 @@
    ## revision combo   self.combo = gtk.combo_box_entry_new_text() - self.combo.child.set_width_chars(24) + self.combo.child.set_width_chars(28)   self.combo.child.connect('activate',   lambda b: self.response(gtk.RESPONSE_OK))   if rev: @@ -69,23 +71,22 @@
  table.add_row(_('Archive revision:'), self.combo)     ## dest combo & browse button - destcombo = gtk.combo_box_entry_new_text() - self.destentry = destcombo.get_child() + self.destentry = gtk.Entry()   self.destentry.set_width_chars(46)     destbrowse = gtk.Button(_('Browse...'))   destbrowse.connect('clicked', self.browse_clicked)   - table.add_row(_('Destination path:'), destcombo, 0, destbrowse) + table.add_row(_('Destination path:'), self.destentry, 0, destbrowse)     ## archive types   self.filesradio = gtk.RadioButton(None, _('Directory of files'))   self.filesradio.connect('toggled', self.type_changed) - table.add_row(_('Archive types:'), self.filesradio) + table.add_row(_('Archive types:'), self.filesradio, ypad=0)   def add_type(label):   radio = gtk.RadioButton(self.filesradio, label)   radio.connect('toggled', self.type_changed) - table.add_row(None, radio) + table.add_row(None, radio, ypad=0)   return radio   self.tarradio = add_type(_('Uncompressed tar archive'))   self.tbz2radio = add_type(_('Tar archive compressed using bzip2')) @@ -150,27 +151,40 @@
  return path   def remove_rev(path):   model = self.combo.get_model() - for rev in ['_' + rev[0] for rev in model]: + revs = [rev[0] for rev in model] + revs.append(wdrev) + if not self.prevtarget is None: + revs.append(self.prevtarget) + for rev in ['_' + rev for rev in revs]:   if path.endswith(rev):   return path.replace(rev, '')   return path - def add_rev(path): - rev = self.combo.get_active_text() - if rev == WD_PARENT: - rev = 'tip' + def add_rev(path, rev):   return '%s_%s' % (path, rev)   def add_ext(path):   select = self.get_selected_archive_type()   if select['type'] != 'files':   path += select['ext']   return path + text = self.combo.get_active_text() + if len(text) == 0: + return + wdrev = str(self.repo['.'].rev()) + if text == WD_PARENT: + text = wdrev + else: + try: + self.repo[text] + except (hglib.RepoError, hglib.LookupError): + return   if path is None:   path = self.destentry.get_text()   path = remove_ext(path)   path = remove_rev(path) - path = add_rev(path) + path = add_rev(path, text)   path = add_ext(path)   self.destentry.set_text(path) + self.prevtarget = text     def get_selected_archive_type(self):   """Return a dictionary describing the selected archive type"""
 
215
216
217
218
 
219
220
221
 
226
227
228
229
230
 
231
232
233
234
 
 
235
236
237
 
267
268
269
270
271
 
272
273
274
275
276
277
 
 
278
279
280
 
322
323
324
 
325
326
327
 
350
351
352
 
353
354
355
 
215
216
217
 
218
219
220
221
 
226
227
228
 
 
229
230
231
232
 
233
234
235
236
237
 
267
268
269
 
 
270
271
272
273
274
275
 
276
277
278
279
280
 
322
323
324
325
326
327
328
 
351
352
353
354
355
356
357
@@ -215,7 +215,7 @@
    self.unktree.get_selection().connect('changed', self.unknown_sel_change)   self.cantree.connect('row-activated', lambda b: self.accept_match()) - self.cantree.get_selection().connect('changed', self.show_diff, self.buf) + self.cantree.get_selection().connect('changed', self.show_diff)   self.connect('delete-event', lambda *a: self.save_settings())   gobject.idle_add(self.refresh)   @@ -226,12 +226,12 @@
  q = Queue.Queue()   unkmodel = self.unktree.get_model()   unkmodel.clear() - thread = thread2.Thread(target=self.unknown_thread, - args=(self.repo.root, q)) + thread = thread2.Thread(target=self.unknown_thread, args=(q,))   thread.start()   gobject.timeout_add(50, self.unknown_wait, thread, q)   - def unknown_thread(self, root, q): + def unknown_thread(self, q): + hglib.invalidaterepo(self.repo)   matcher = match.always(self.repo.root, self.repo.root)   status = self.repo.status(node1=self.repo.dirstate.parents()[0],   node2=None, match=matcher, ignored=False, @@ -267,14 +267,14 @@
  return   tgts = [ umodel[p][0] for p in upaths ]   q = Queue.Queue() - thread = thread2.Thread(target=self.search_thread, - args=(self.repo.root, q, tgts)) + thread = thread2.Thread(target=self.search_thread, args=(q, tgts))   thread.start()   self.stbar.begin()   self.stbar.set_status_text(_('finding source of ') + ', '.join(tgts))   gobject.timeout_add(50, self.search_wait, thread, q)   - def search_thread(self, root, q, tgts): + def search_thread(self, q, tgts): + hglib.invalidaterepo(self.repo)   srcs = []   audit_path = util.path_auditor(self.repo.root)   m = cmdutil.match(self.repo) @@ -322,6 +322,7 @@
    def accept_match(self):   'User pressed "accept match" button' + hglib.invalidaterepo(self.repo)   canmodel, upaths = self.cantree.get_selection().get_selected_rows()   for path in upaths:   row = canmodel[path] @@ -350,6 +351,7 @@
    def show_diff(self, selection):   'User selected a row in the candidate tree' + hglib.invalidaterepo(self.repo)   model, cpaths = selection.get_selected_rows()   sensitive = cpaths and True or False   self.acceptbtn.set_sensitive(sensitive)
 
215
216
217
 
218
219
220
 
215
216
217
218
219
220
221
@@ -215,6 +215,7 @@
  self.notify_func = func     def refresh(self): + hglib.invalidaterepo(self.repo)   matcher = match.always(self.repo.root, self.repo.root)   changes = self.repo.dirstate.status(matcher, ignored=False,   clean=False, unknown=True)
 
123
124
125
126
 
127
128
129
 
134
135
136
137
 
138
139
140
 
123
124
125
 
126
127
128
129
 
134
135
136
 
137
138
139
140
@@ -123,7 +123,7 @@
    # summary of new revision   hb, label = new_label() - table.add_row('Target:', hb) + table.add_row(_('Target:'), hb)   self.new_rev_label = label     # summary of current revision(s) @@ -134,7 +134,7 @@
  if len(self.ctxs) == 2:   table.add_row(_('Parent 1:'), hb)   hb, label = new_label() - table.add_row('Parent 2:', hb) + table.add_row(_('Parent 2:'), hb)   self.current_rev_label2 = label   else:   table.add_row(_('Parent:'), hb)