Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7, 0.7.1, and 0.7.2

commit: offer to save message at exit

Changeset b254149d601e

Parent 0beda4fad67b

by Steve Borho

Changes to one file · Browse files at b254149d601e Showing diff from parent 0beda4fad67b Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
3
4
5
 
6
7
8
 
192
193
194
195
196
 
 
 
 
 
197
198
199
 
3
4
5
6
7
8
9
 
193
194
195
 
 
196
197
198
199
200
201
202
203
@@ -3,6 +3,7 @@
 #  # Copyright 2007 Brad Schick, brad at gmail . com  # Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> +# Copyright (C) 2009 Steve Borho <steve@borho.org>  #    import os @@ -192,8 +193,11 @@
  begin, end = buffer.get_bounds()   cur_msg = buffer.get_text(begin, end)   if buffer.get_char_count() > 10 and cur_msg != self.qheader: - dialog = Confirm('Exit', [], self, 'Discard commit message and exit?') - if dialog.run() == gtk.RESPONSE_NO: + dialog = Confirm('Exit', [], self, 'Save commit message at exit?') + res = dialog.run() + if res == gtk.RESPONSE_YES: + self._update_recent_messages(cur_msg) + elif res != gtk.RESPONSE_NO:   live = True   return live