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

sync: send safe command lines to log widget

Changeset 7dad5c211fc2

Parent a1ee04e99254

by Steve Borho

Changes to one file · Browse files at 7dad5c211fc2 Showing diff from parent a1ee04e99254 Diff from another changeset...

 
20
21
22
23
24
25
26
 
274
275
276
277
 
278
279
280
281
282
 
 
 
 
 
 
 
283
284
285
286
287
288
289
 
290
291
292
293
294
295
296
 
297
298
299
300
301
302
303
 
304
305
306
 
20
21
22
 
23
24
25
 
273
274
275
 
276
277
278
279
 
 
280
281
282
283
284
285
286
287
288
 
 
 
 
 
289
290
291
 
 
 
 
 
292
293
294
 
 
 
 
 
295
296
297
298
@@ -20,7 +20,6 @@
 from tortoisehg.hgqt import qtlib, cmdui, hgemail    # TODO -# Send (secret-safe) command lines to log widget  # cmdui/thread must log plain text output, for query  # Write keyring help, connect to help button  # Ini file locking for sync.py and settings.py @@ -274,33 +273,26 @@
  if dialog.exec_() == QDialog.Accepted:   self.curuser, self.curpw = '', ''   - def inclicked(self): + def run(self, cmdline):   if self.cmd.core.is_running():   return   url = self.currentUrl(False) - cmdline = ['--repository', self.root, 'incoming', url] - self.cmd.run(cmdline) + safeurl = self.currentUrl(True) + display = ' '.join(['hg'] + cmdline + [safeurl]) + '\n' + cmdline.append(url) + self.cmd.run(cmdline, display=display) + + def inclicked(self): + self.run(['--repository', self.root, 'incoming'])     def pullclicked(self): - if self.cmd.core.is_running(): - return - url = self.currentUrl(False) - cmdline = ['--repository', self.root, 'pull', url] - self.cmd.run(cmdline) + self.run(['--repository', self.root, 'pull'])     def outclicked(self): - if self.cmd.core.is_running(): - return - url = self.currentUrl(False) - cmdline = ['--repository', self.root, 'outgoing', url] - self.cmd.run(cmdline) + self.run(['--repository', self.root, 'outgoing'])     def pushclicked(self): - if self.cmd.core.is_running(): - return - url = self.currentUrl(False) - cmdline = ['--repository', self.root, 'push', url] - self.cmd.run(cmdline) + self.run(['--repository', self.root, 'push'])     def emailclicked(self):   try: