Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1.2 and tip

stable revert: throw a ValueError, rather than crashing, when reverting to the None rev

Changeset 19d3c7906d7b

Parent 114eceb11118

by Angel Ezquerra

Changes to one file · Browse files at 19d3c7906d7b Showing diff from parent 114eceb11118 Diff from another changeset...

 
18
19
20
 
 
 
 
 
 
 
21
22
23
 
18
19
20
21
22
23
24
25
26
27
28
29
30
@@ -18,6 +18,13 @@
   class RevertDialog(QDialog):   def __init__(self, repo, wfiles, rev, parent): + if rev is None: + qtlib.WarningMsgBox(_('Cannot revert to working directory'), + _('Reverting to the working directory revision ' + 'does not make sense'), + parent=parent) + raise ValueError(_('Cannot revert to working directory')) +   super(RevertDialog, self).__init__(parent)   self.setWindowTitle(_('Revert - %s') % repo.displayname)