Commits

Anonymous committed 74e38d3

commit: only do cleanup when commit is successful

Comments (0)

Files changed (1)

         dialog.hide()
 
         # refresh overlay icons and commit dialog
-        self.text.set_buffer(gtk.TextBuffer())
-        self._update_recent_messages(self.opts['message'])
-        shell_notify([self.cwd] + files)
-        self._last_commit_id = self._get_tip_rev(True)
-        self.reload_status()
+        if dialog.return_code() == 0:
+            self.text.set_buffer(gtk.TextBuffer())
+            self._update_recent_messages(self.opts['message'])
+            shell_notify([self.cwd] + files)
+            self._last_commit_id = self._get_tip_rev(True)
+            self.reload_status()
 
     def _get_tip_rev(self, refresh=False):
         if refresh: