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

clone: use blank dict as default value of 'opts'

Changeset 59f63488d7b5

Parent 4b83e874a9d6

by Yuki KODAMA

Changes to one file · Browse files at 59f63488d7b5 Showing diff from parent 4b83e874a9d6 Diff from another changeset...

 
22
23
24
25
 
26
27
28
 
143
144
145
146
 
 
147
148
149
150
151
 
 
 
 
152
153
154
 
22
23
24
 
25
26
27
28
 
143
144
145
 
146
147
148
 
 
 
 
149
150
151
152
153
154
155
@@ -22,7 +22,7 @@
   class CloneDialog(QDialog):   - def __init__(self, args=None, opts=None): + def __init__(self, args=None, opts={}):   super(CloneDialog, self).__init__()   self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint)   self.ui = ui.ui() @@ -143,12 +143,13 @@
  self.rev_text.setDisabled(True)   self.remote_text.setDisabled(True)   - if opts.get('rev'): + rev = opts.get('rev') + if rev:   self.rev_chk.setChecked(True) - self.rev_text.setText(hglib.tounicode(', '.join(opts['rev']))) - self.noupdate_chk.setChecked(bool(opts['noupdate'])) - self.pproto_chk.setChecked(bool(opts['pull'])) - self.uncomp_chk.setChecked(bool(opts['uncompressed'])) + self.rev_text.setText(hglib.tounicode(', '.join(rev))) + self.noupdate_chk.setChecked(bool(opts.get('noupdate'))) + self.pproto_chk.setChecked(bool(opts.get('pull'))) + self.uncomp_chk.setChecked(bool(opts.get('uncompressed')))     self.src_combo.setFocus()   self.src_combo.lineEdit().selectAll()