Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc2, 0.4rc3, and 0.4rc4

hggtk/commit: fix error in committing merged repo

SF bug #1939794: Unable to Merge changes with builtin commit UI

Changeset 48135894ad8b

Parent 08eca2607f01

by TK Soh

Changes to one file · Browse files at 48135894ad8b Showing diff from parent 08eca2607f01 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​commit.py Stacked
 
188
189
190
191
192
193
194
 
 
 
 
 
 
 
 
 
 
 
195
196
197
198
199
200
 
 
 
 
 
201
202
203
 
188
189
190
 
 
 
 
191
192
193
194
195
196
197
198
199
200
201
202
 
 
 
 
 
203
204
205
206
207
208
209
210
@@ -188,16 +188,23 @@
  if not self._ready_message():   return True   - commitable = 'MAR' - addremove_list = self._relevant_files('?!') - if len(addremove_list) and self._should_addremove(addremove_list): - commitable += '?!' + if len(self.repo.workingctx().parents()) > 1: + msg = 'The repo contains merges, you must commit all files.\n\n' \ + 'Proceed with commit?' + response = Confirm('Commit Merges', [], self, msg).run() + if response == gtk.RESPONSE_YES: + self._hg_commit([]) + else: + commitable = 'MAR' + addremove_list = self._relevant_files('?!') + if len(addremove_list) and self._should_addremove(addremove_list): + commitable += '?!'   - commit_list = self._relevant_files(commitable) - if len(commit_list) > 0: - self._hg_commit(commit_list) - else: - Prompt('Nothing Commited', 'No committable files selected', self).run() + commit_list = self._relevant_files(commitable) + if len(commit_list) > 0: + self._hg_commit(commit_list) + else: + Prompt('Nothing Commited', 'No committable files selected', self).run()   return True