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

fogcreek quickop: prompt to add as bfiles

Changeset fe5430688149

Parent a76a17144067

by David Golub

Changes to one file · Browse files at fe5430688149 Showing diff from parent a76a17144067 Diff from another changeset...

 
12
13
14
15
 
16
17
18
 
152
153
154
 
 
 
155
156
157
 
184
185
186
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
187
188
189
 
12
13
14
 
15
16
17
18
 
152
153
154
155
156
157
158
159
160
 
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
@@ -12,7 +12,7 @@
   from tortoisehg.util import hglib, shlib  from tortoisehg.hgqt.i18n import _ -from tortoisehg.hgqt import qtlib, status, cmdui +from tortoisehg.hgqt import qtlib, status, cmdui, bfprompt    from PyQt4.QtCore import *  from PyQt4.QtGui import * @@ -152,6 +152,9 @@
  except EnvironmentError:   pass   files.remove(wfile) + elif self.command == 'add' and 'kbfiles' in self.repo.extensions(): + self.addWithPrompt(files) + return   if files:   cmdline.extend(files)   self.files = files @@ -184,6 +187,22 @@
  self.files = files   self.cmd.run(cmdline)   + def addWithPrompt(self, files): + result = bfprompt.promptForBfiles(self, self.repo.ui, self.repo, files) + if not result: + return + files, bfiles = result + if files: + cmdline = ['add'] + cmdline.extend(files) + self.files = files + self.cmd.run(cmdline) + if bfiles: + cmdline = ['add', '--bf'] + cmdline.extend(bfiles) + self.files = bfiles + self.cmd.run(cmdline) +  instance = None  class HeadlessQuickop(QWidget):   def __init__(self, repo, cmdline):