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

stable add support for bundle:<path>[+<bundlefile>] repository paths

When a bundle is set like that, the history command displays it as per
the 'Add Bundle...' menu item, except the bundle is automatically rejected
when leaving the program, if not previously accepted by the user.

Changeset e1b2424eb65f

Parent 49abd92a79da

by Sune Foldager

Changes to 2 files · Browse files at e1b2424eb65f Showing diff from parent 49abd92a79da Diff from another changeset...

 
212
213
214
215
216
 
 
 
 
 
 
 
 
 
 
217
218
219
 
212
213
214
 
 
215
216
217
218
219
220
221
222
223
224
225
226
227
@@ -212,8 +212,16 @@
  elif not cmd:   return help_(ui, 'shortlist')   - if options['repository']: - path = ui.expandpath(options['repository']) + 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['nofork']:
 
53
54
55
 
56
57
58
 
70
71
72
73
 
74
75
76
 
476
477
478
479
 
 
 
 
 
480
481
482
 
1193
1194
1195
1196
 
1197
1198
1199
 
1242
1243
1244
1245
 
1246
1247
 
1248
1249
1250
 
53
54
55
56
57
58
59
 
71
72
73
 
74
75
76
77
 
477
478
479
 
480
481
482
483
484
485
486
487
 
1198
1199
1200
 
1201
1202
1203
1204
 
1247
1248
1249
 
1250
1251
1252
1253
1254
1255
1256
@@ -53,6 +53,7 @@
  self.useproxy = None   self.revrange = None   self.forcepush = False + self.bundle_autoreject = False   os.chdir(self.repo.root)     # Load extension support for commands which need it @@ -70,7 +71,7 @@
    def should_live(self, widget=None, event=None):   live = False - if self.bfile: + if self.bfile and not self.bundle_autoreject:   t = _('New changesets from the preview bundle are still pending.'   '\n\nAccept or reject the new changesets?')   # response: 0=Yes, 1=No, 2=Cancel @@ -476,7 +477,11 @@
  self.filtercombo.set_active(1)   self.filterentry.set_text(', '.join(self.pats))   opts['pats'] = self.pats - self.reload_log(**opts) + if 'bundle' in opts: + self.set_bundlefile(opts['bundle']) + self.bundle_autoreject = True + else: + self.reload_log(**opts)     self.filterbox.set_property('visible', self.show_filterbar)   self.filterbox.set_no_show_all(True) @@ -1193,7 +1198,7 @@
  if dlg.return_code() == 0 and os.path.isfile(bfile):   self.set_bundlefile(bfile)   - def set_bundlefile(self, bfile): + def set_bundlefile(self, bfile, **kwopts):   self.origurl = self.urlcombo.get_active()   self.pathentry.set_text(bfile)   @@ -1242,9 +1247,10 @@
  if hasattr(self, 'mqwidget'):   self.mqwidget.set_repo(self.repo)   self.npreviews = len(self.repo) - oldtip - self.reload_log() + self.reload_log(**kwopts)     self.stbar.set_idle_text(_('Bundle Preview')) + self.bundle_autoreject = False     def add_bundle_clicked(self, button):   result = gtklib.NativeSaveFileDialogWrapper(