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

grep: use command line args as 'pattern' 'includes'

Changeset b6405f1d55be

Parent 0c5da0730e07

by Steve Borho

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

 
32
33
34
35
 
36
37
38
 
50
51
52
 
 
53
54
55
 
59
60
61
 
 
62
63
64
 
431
432
433
434
 
 
32
33
34
 
35
36
37
38
 
50
51
52
53
54
55
56
57
 
61
62
63
64
65
66
67
68
 
435
436
437
 
438
@@ -32,7 +32,7 @@
  loadComplete() - for progress bar   errorMessage(QString) - for status bar   ''' - def __init__(self, root=None, parent=None): + def __init__(self, pats, root=None, parent=None):   QWidget.__init__(self, parent)     self.thread = None @@ -50,6 +50,8 @@
  le = QLineEdit()   lbl.setBuddy(le)   lbl.setToolTip(_('Regular expression search pattern')) + if len(pats) >= 1: + le.setText(hglib.tounicode(pats[0]))   bt = QPushButton(_('Search'))   bt.setDefault(True)   chk = QCheckBox(_('Ignore case')) @@ -59,6 +61,8 @@
  hbox.addWidget(bt)     incle = QLineEdit() + if len(pats) > 1: + incle.setText(','.join(pats[1:]))   excle = QLineEdit()   working = QRadioButton(_('Working Copy'))   revision = QRadioButton(_('Revision')) @@ -431,4 +435,4 @@
  return self.rows[index.row()]    def run(ui, *pats, **opts): - return SearchWidget() + return SearchWidget(pats)