Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.1.9, and 1.1.9.1

stable merge: hide dummy merge capability (closes #1721)

Make "Discard all changes from merge target" (aka. debugsetparents, "Dummy Merge")
harder to accidentally do.

Changeset 8fdd76d3421a

Parent 4f1848374e43

by daniel.atallah@gmail.com

Changes to one file · Browse files at 8fdd76d3421a Showing diff from parent 4f1848374e43 Diff from another changeset...

 
81
82
83
84
85
86
87
88
89
90
91
92
93
 
 
 
 
 
 
 
 
 
 
 
 
94
95
96
 
206
207
208
 
 
 
 
 
 
 
209
210
211
 
81
82
83
 
 
 
 
 
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
 
213
214
215
216
217
218
219
220
221
222
223
224
225
@@ -81,16 +81,23 @@
  self.otherframe = info   self.otherrev = str(info.get_data('revnum'))   - discard = gtk.CheckButton(_('Discard all changes from merge target ' - '(other) revision')) - self.discard = discard - self.vbox.pack_start(discard, False, False) -   info = factory(rev0, style={'label': _('Current revision (local)')})   self.vbox.pack_start(info, False, False)   self.localframe = info   self.localrev = str(info.get_data('revnum'))   + # expander for advanced options + expander = gtk.Expander(_('Advanced options')) + self.vbox.pack_start(expander, False, False) + + # layout table for advanced options + table = gtklib.LayoutTable() + expander.add(table) + discard = gtk.CheckButton(_('Discard all changes from merge target ' + '(other) revision')) + self.discard = discard + table.add_row(discard) +   vlist = gtk.ListStore(str, # tool name   bool) # separator   combo = gtk.ComboBoxEntry(vlist, 0) @@ -206,6 +213,13 @@
  return   # '.' 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' + 'Are you sure this is what you want to do?') + % (self.otherframe.get_data('revid'))).run() + if ret != gtk.RESPONSE_YES: + return   cmdline = ['hg', 'debugsetparents', '.', self.otherrev]   else:   tool = hglib.fromutf(self.mergetool.child.get_text())