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

rename: reorder checks

Changeset 5cbe8052bc33

Parent 28360a44c590

by Johan Samyn

Changes to one file · Browse files at 5cbe8052bc33 Showing diff from parent 28360a44c590 Diff from another changeset...

 
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
 
272
273
274
 
 
 
 
 
 
 
 
 
 
 
275
276
277
 
248
249
250
 
 
 
 
 
 
 
 
 
 
 
251
252
253
 
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
@@ -248,17 +248,6 @@
  self.src_txt.setText(curr_name)   new_name = os.path.relpath(dest, start=self.root)   self.dest_txt.setText(new_name) - if src == dest: - qtlib.ErrorMsgBox(_('Rename Error'), - _('Please give a destination that differs from the source')) - return - if os.path.exists(dest) and os.path.isfile(dest): - res = qtlib.QuestionMsgBox(_('Rename'), '<p>%s</p><p>%s</p>' % - (_('Destination file already exists.'), - _('Are you sure you want to overwrite it ?')), - defaultbutton=QMessageBox.No) - if not res: - return   if not os.path.exists(src):   qtlib.WarningMsgBox(_('Rename'), _('Source does not exists.'))   return @@ -272,6 +261,17 @@
  qtlib.ErrorMsgBox(_('Rename Error'),   _('The destination must be within the repository tree.'))   return + if src == dest: + qtlib.ErrorMsgBox(_('Rename Error'), + _('Please give a destination that differs from the source')) + return + if os.path.exists(dest) and os.path.isfile(dest): + res = qtlib.QuestionMsgBox(_('Rename'), '<p>%s</p><p>%s</p>' % + (_('Destination file already exists.'), + _('Are you sure you want to overwrite it ?')), + defaultbutton=QMessageBox.No) + if not res: + return     # prepare command line   #cmdline, vcl = self.compose_command(self.get_src(), self.get_dest())